Difference between revisions of "Multiple Recordings with VLC"

From MythTV Official Wiki
Jump to: navigation, search
(First I defined my VLC config file.)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
{{note box|MythTV is now capable of recording multiple channels from a single multiplex natively and without the need for external applications.}}
 
== About This Page ==
 
== About This Page ==
This page is to document how I setup MythTV and VLC to record multiple channels from a single multplex on a single DVB card.
+
This page is to document how I setup MythTV and VLC to record multiple channels from a single multiplex on a single DVB card.
 
YMMV but overall this works very well for me in the few days I've been using it.
 
YMMV but overall this works very well for me in the few days I've been using it.
  
This allowed me to record 8 seperate channels from the single card and lucky for me 7 of 8 are my main recording channels.
+
This allowed me to record 8 separate channels from the single card and lucky for me 7 of 8 are my main recording channels.
  
 
While I know that work is ongoing enabling this type of recording directly in mythtv  but one night I had a thought on how I might do it using VLC and decided to try it out with happy results.
 
While I know that work is ongoing enabling this type of recording directly in mythtv  but one night I had a thought on how I might do it using VLC and decided to try it out with happy results.
Line 14: Line 15:
  
 
== Requirements ==
 
== Requirements ==
For this I used VLC 0.8.6b and MythTV svn head revision #13447. I don't see any reason this wouldn't work with earlier revisions,
+
For this I used VLC 0.8.6b and MythTV svn head revision {{changeset|13447}}. I don't see any reason this wouldn't work with earlier revisions,
 
I've just never tested those. On my backend (XP2500+) vlc used about 13% cpu in this role and the backend used almost none.
 
I've just never tested those. On my backend (XP2500+) vlc used about 13% cpu in this role and the backend used almost none.
  
 
For this to work your version of VLC must be compiled with --enable-dvb and the linux dvb headers installed. Unfortunately in my case the vlc package for Slackware didn't include DVB support so I had to compile my own.
 
For this to work your version of VLC must be compiled with --enable-dvb and the linux dvb headers installed. Unfortunately in my case the vlc package for Slackware didn't include DVB support so I had to compile my own.
 
  
 
== Getting Started ==
 
== Getting Started ==
Line 70: Line 70:
 
of the mythtv specific EXTMYTHTV tag to specify the XMLTVID for each station since I wanted to  
 
of the mythtv specific EXTMYTHTV tag to specify the XMLTVID for each station since I wanted to  
 
make sure I got proper program guide data.
 
make sure I got proper program guide data.
 +
 +
In this example I used channels 881 through 888, and configured myth to listen on 192.168.0.11 port 1231 through 1238 for each
 +
  
 
<pre>
 
<pre>

Latest revision as of 22:02, 29 March 2008

Important.png Note: MythTV is now capable of recording multiple channels from a single multiplex natively and without the need for external applications.

About This Page

This page is to document how I setup MythTV and VLC to record multiple channels from a single multiplex on a single DVB card. YMMV but overall this works very well for me in the few days I've been using it.

This allowed me to record 8 separate channels from the single card and lucky for me 7 of 8 are my main recording channels.

While I know that work is ongoing enabling this type of recording directly in mythtv but one night I had a thought on how I might do it using VLC and decided to try it out with happy results.

The Theory

Basically I setup VLC to access the DVB card, reading in the entire multiplex and breaking it out into 8 seperate IPTV streams which I then configure mythtv's IPTV recorder to record. In my case the DVB source is in the same machine as the slave backend I'm recording this on, but there is no reason this wouldn't work across hosts over a network as well.


Requirements

For this I used VLC 0.8.6b and MythTV svn head revision [13447]. I don't see any reason this wouldn't work with earlier revisions, I've just never tested those. On my backend (XP2500+) vlc used about 13% cpu in this role and the backend used almost none.

For this to work your version of VLC must be compiled with --enable-dvb and the linux dvb headers installed. Unfortunately in my case the vlc package for Slackware didn't include DVB support so I had to compile my own.

Getting Started

First I defined my VLC config file.

I defined the adapter I wanted to use (dvb1 in my case),
The fact that I wanted to use QAM256,
The Frequency of the multiplex I wanted,
The program ID's of each channel I wanted to be made available,
And finally I defined what I wanted to be done with each stream.(repackaged as MPEG2TS and streamed to a specific IP/PORT),

The Frequency information and program ID's can either be gathered from the mythtv database if you have previously scanned the channels or from a channels.conf. I'll leave that as a project for you to figure out.

Below is my file for reference

~$ cat dvb2iptv.vlm
new QAM2IPTV broadcast enabled

setup QAM2IPTV input "dvb://"
setup QAM2IPTV option dvb-adapter=1
setup QAM2IPTV option dvb-frequency=681000000
setup QAM2IPTV option dvb-modulation=256
setup QAM2IPTV option programs=11,12,13,14,15,16,17,18
#18,13,14,11
setup QAM2IPTV option ts-es-id-pid

#### These are the lines from my channels.conf I used to get the program ID (last column) and Frequency (3rd column)
#2048204914:s000ee:681000000:QAM_256:2048:2049:14
#2304230518:s0012e:681000000:QAM_256:2304:2305:18
#2368236919:s0013e:681000000:QAM_256:2368:2369:19
#2432243311:s000be:681000000:QAM_256:2432:2433:11
#2176217716:s0010e:681000000:QAM_256:2176:2177:16
#2112211315:s000fe:681000000:QAM_256:2112:2113:15
#2240224117:s0011e:681000000:QAM_256:2240:2241:17
#2496249712:s000ce:681000000:QAM_256:2496:2497:12
#2560256113:s000de:681000000:QAM_256:2560:2561:13



setup QAM2IPTV output #duplicate{dst=standard{access=udp,mux=ts,url=192.168.0.11:1231,sap,group="MyStation",name="WCVB"},select="program=11",dst=standard{access=udp,mux=ts,url=192.168.0.11:1232,sap,group="MyStation",name="WBZ"},select="program=12",dst=standard{access=udp,mux=ts,url=192.168.0.11:1233,sap,group="MyStation",name="WHDH"},select="program=13",dst=standard{access=udp,mux=ts,url=192.168.0.11:1234,sap,group="MyStation",name="WUHF"},select="program=14",dst=standard{access=udp,mux=ts,url=192.168.0.11:1235,sap,group="MyStation",name="CJCH"},select="program=15",dst=standard{access=udp,mux=ts,url=192.168.0.11:1236,sap,group="MyStation",name="ASN"},select="program=16",dst=standard{access=udp,mux=ts,url=192.168.0.11:1237,sap,group="MyStation",name="CBHT"},select="program=17",dst=standard{access=udp,mux=ts,url=192.168.0.11:1238,sap,group="MyStation",name="CIHF"},select="program=18"}


control QAM2IPTV play

Define our IPTV channels list for MythTV

Here is the M3U file I defined for each of the channels I wanted to use. I also took advantage of the mythtv specific EXTMYTHTV tag to specify the XMLTVID for each station since I wanted to make sure I got proper program guide data.

In this example I used channels 881 through 888, and configured myth to listen on 192.168.0.11 port 1231 through 1238 for each


~$ cat .mythtv/iptv.m3u
#EXTM3U
#EXTINF:0,881 - WCVB
#EXTMYTHTV:xmltvid=11369
udp://192.168.0.11:1231
#EXTINF:0,882 - WBZ
#EXTMYTHTV:xmltvid=11325
udp://192.168.0.11:1232
#EXTINF:0,883 - WHDH
#EXTMYTHTV:xmltvid=11502
udp://192.168.0.11:1233
#EXTINF:0,884 - WUHF
#EXTMYTHTV:xmltvid=11938
udp://192.168.0.11:1234
#EXTINF:0,885 - CJCH
#EXTMYTHTV:xmltvid=14863
udp://192.168.0.11:1235
#EXTINF:0,886 - ASN
#EXTMYTHTV:xmltvid=12892
udp://192.168.0.11:1236
#EXTINF:0,887 - CBHT
#EXTMYTHTV:xmltvid=14724
udp://192.168.0.11:1237
#EXTINF:0,888 - CIHF
#EXTMYTHTV:xmltvid=17936
udp://192.168.0.11:1238