[mythtv-users] Recording IPTV?

Stephen Worthington stephen_agent at jsw.gen.nz
Sun Feb 2 02:47:11 UTC 2020


On Sun, 2 Feb 2020 00:42:52 +0100, you wrote:

>On Sat, Feb 01, 2020 at 03:24:06PM +1300, Stephen Worthington wrote:
>> On Fri, 31 Jan 2020 23:49:50 +0100, you wrote:
>> 
>> >I was in contact with the IPTV provider today but according to them
>> >the only available option to watch TV on a computer was to use a
>> >browser and use their Play service.
>> 
>> That could be made to work in MythTV as long as the credentials are
>> sent as part of the URL, rather than negotiated separately.  If they
>> are separately negotiated, then you would probably need to write code
>> (eg in Python) to create an external recorder for mythbackend.
>
>That sounds encouraging.
>
>I did a quick test with curl and it seems to work to provide the
>credentials in the call.
>
>Do you have any pointer to where I can read up on creating an
>external recorder for the mythbackend?

If it works with curl, then there is no need for an external recorder.
But just in case, here is the documentation on external recorders:

https://www.mythtv.org/wiki/ExternalRecorder

and here is an example of one written in Python 3:

https://github.com/garybuhrmaster/mythhdhrrecorder

To use MythTV directly with IPTV URLs, the documentation I worked from
for my SAT>IP URLs is here:

https://www.mythtv.org/wiki/IPTV_Encoders_as_a_Capture_Device

Basically, you just create a .m3u file in the correct format for
MythTV and load it in a new IPTV video source.  That sets up all the
channels.  There is no automatic scanning to create the .m3u file -
you have to do that yourself, and keep updating the channels as things
change in the future.  Here is an excerpt of my playlist.m3u file, to
show you exactly what a working one looks like:

#EXTM3U

#EXTINF:0,4004 - PRIME HD
#EXTMYTHTV:xmltvid=prime.freeviewnz.tv
#EXTVLCOPT:program=1211
rtsp://satip.jsw.gen.nz:554/?src=1&freq=12295&msys=dvbs&plts=off&fec=34&pol=h&ro=0.35&sr=22500&mtype=qpsk&pids=0,307,1007,1107,1907

#EXTINF:0,4091 - CNBC
#EXTMYTHTV:xmltvid=cnbc.sky.co.nz
#EXTVLCOPT:program=1095
rtsp://satip.jsw.gen.nz:554/?src=1&freq=12394&msys=dvbs&plts=off&fec=34&pol=h&ro=0.35&sr=22500&mtype=qpsk&pids=0,310,1010,1110

#EXTINF:0,4110 - MTV Hits
#EXTMYTHTV:xmltvid=mtv-hits.sky.co.nz
#EXTVLCOPT:program=1180
rtsp://satip.jsw.gen.nz:554/?src=1&freq=12421&msys=dvbs&plts=off&fec=34&pol=h&ro=0.35&sr=22500&mtype=qpsk&pids=0,302,1002,1102,1902

#EXTINF:0,4071 - Crime & Investigation
#EXTMYTHTV:xmltvid=crime-investigation.sky.co.nz
#EXTVLCOPT:program=1049
rtsp://satip.jsw.gen.nz:554/?src=1&freq=12421&msys=dvbs&plts=off&fec=34&pol=h&ro=0.35&sr=22500&mtype=qpsk&pids=0,303,1003,1103,1903

#EXTINF:0,4104 - Nick Jr
#EXTMYTHTV:xmltvid=nickjr.sky.co.nz
#EXTVLCOPT:program=1184
rtsp://satip.jsw.gen.nz:554/?src=1&freq=12421&msys=dvbs&plts=off&fec=34&pol=h&ro=0.35&sr=22500&mtype=qpsk&pids=0,304,1004,1104

#EXTINF:0,4074 - BBC Knowledge
#EXTMYTHTV:xmltvid=documentary.sky.co.nz
#EXTVLCOPT:program=1059
rtsp://satip.jsw.gen.nz:554/?src=1&freq=12421&msys=dvbs&plts=off&fec=34&pol=h&ro=0.35&sr=22500&mtype=qpsk&pids=0,306,1006,1106,1906


Your URLs would presumably be normal http or https, where mine are
rtsp, but any URL that mythbackend can use will work.  I put in the
#EXTVLCOPT:program= lines with the service ID values for my channels,
even though they are not used when tuning via my SAT>IP server, so you
would not have those lines.  The xmltv ID values used have to match
your source of XMLTV EPG data.  In my case, I get that from scanning a
DVB-S2 multiplex using a modified version of tv_grab_dvb_plus, so I
have control of the values used to create the EPG data.  If you are
able to use Webgrab+Plus, then you will need to match the XMLTV IDs it
outputs for the channels.  To create my playlist.m3u file, I wrote
some Python code to extract the data from scanning files I created by
scanning my satellite channels.  You could do the same from the XMLTV
data from your EPG source, and then add the URLs to that data.


More information about the mythtv-users mailing list