[mythtv-users] Recording IPTV?
maillist.peter at home.se
Sat Feb 22 23:05:27 UTC 2020
On Fri, Feb 21, 2020 at 06:20:42PM +1300, Stephen Worthington wrote:
> On Thu, 20 Feb 2020 21:49:30 +0000, you wrote:
> >On Thu, 20 Feb 2020 at 21:24, Peter Carlsson <maillist.peter at home.se> wrote:
> >> I did a first attempt with some free Play services that does not require
> >> any credentials but it did not work and it looks like this:
> >> #EXTM3U
> >> #EXTINF:0,4004 - SVT1 HD
> >> #EXTMYTHTV:xmltvid=svt1.svt.se
> >> #EXTVLCOPT:program=1234
> >> https://www.svtplay.se/kanaler/svt1?start=auto
> >> #EXTINF:0,4096 - SVT2 HD
> >> #EXTMYTHTV:xmltvid=svt2.svt.se
> >> #EXTVLCOPT:program=1235
> >> https://www.svtplay.se/kanaler/svt2?start=auto
> >> Compared to your example I don't really know what to fill in for the
> >> different fields. The URLs are copied exactly as they look at the Play
> >> service page but do I also have to enter some additional parameters like
> >> you have (src, freq, msys, etc.) and with what?
> >The URLs you're using above are for website access via a browser. You need
> >streaming URLs here.
> Yes, you need a URL that you can put into VLC and have it play, rather
> than a URL that a browser can play. Also, I believe that MythTV can
> not handle URLs that get redirected, where VLC may be able to do that.
> What you need is the URL after all the redirections are done. There
> are often redirections done so that the actual URL goes to a content
> delivery network such as Akamai, and the final URL will be to the
> local server for the CDN, so it will change depending on your IP
> Finding the URLs can be a real problem - especially when they use
> HTTPS, as the encryption stops you from just using Wireshark to look
> at the IP packets used to open the connection. With HTTPS, Wireshark
> will show you the IP address (and domain name) of the site you get
> connected to, but is unable to tell you the rest of the URL you need.
> The URLs you need will not need any of the parameters mine have like
> freq, msys and so on - those are specific to SAT>IP URLs and tell the
> SAT>IP tuner what to tune to. Your URLs will be normal Internet URLs.
> >I notice the streamlink project [https://streamlink.github.io/] has a
> >plugin for SVT. If you can install that and then by using either of the
> >URLs you're using above, to get a video stream played, then you could look
> >at using streamlink in conjunction with MythTV's external recorder
> >functionality [https://www.mythtv.org/wiki/ExternalRecorder]. That seems
> >like a reasonable way forward to me.
> I tried running streamlink with full debug output, but unfortunately
> it does not display the URLs even when set to trace level output. As
> it is all written in Python 3 it may be able to be made to display the
> URLs, but you would need to be able to modify it to do that.
I also tried streamlink and had some success with it:
peter at server:~$ streamlink https://www.svtplay.se/kanaler/svt1?start=auto -l trace
[23:23:36,925][cli][debug] Python: 3.7.3
[23:23:36,925][cli][debug] Streamlink: 1.3.1
[23:23:36,925][cli][debug] Requests(2.21.0), Socks(1.6.7), Websocket(0.53.0)
[23:23:36,925][cli][info] Found matching plugin svtplay for URL https://www.svtplay.se/kanaler/svt1?start=auto
[23:23:38,358][utils.l10n][debug] Language code: sv_SE
Available streams: 288p_alt2 (worst), 288p_alt, 288p, 432p, 720p_alt, 720p (best)
peter at server:~$ streamlink https://www.svtplay.se/kanaler/svt1?start=auto 720p
[cli][info] Found matching plugin svtplay for URL https://www.svtplay.se/kanaler/svt1?start=auto
[cli][info] Available streams: 288p_alt2 (worst), 288p_alt, 288p, 432p, 720p_alt, 720p (best)
[cli][info] Opening stream: 720p (hls)
[cli][info] Starting player: /usr/bin/vlc
[cli][info] Player closed
[cli][info] Stream ended
[cli][info] Closing currently open stream...
At my first attempt VLC did not play any audio but maybe that is
perhaps solved by adding an argument to streamlink.
> I can not use your https://www.svtplay.se URLs to test with from here
> in New Zealand - it looks like they are geolocked to only be
> accessible from your part of the world. I just get a 404 error.
According to streamlink: "Streams may be geo-restricted to Sweden."
> Getting www.svtplay.se to work is not your ultimate aim here though.
> You primarily want your Telia channels, and the URLs for them may not
> be so hard to get if you can just ask their tech support for them.
> After all, you are paying them to use their service, so they may be
> fine with just telling you the URLs. Then you would have to add your
> username/password authentication to the URLs and hopefully they would
> work. Test them in VLC first, then try MythTV.
I have been in contact with both Telia and SVT and they both responded
something similar to:
"Unfortunately, there is nothing we can help with. According to our
agreements on rights and retransmission, the channels can only be
viewed through the platforms we offer."
So I guesss my best option would be to use streamlink together with a
MythTV external recorder?
Would a "Generic" External Recorder be enough or do I need some more
Thanks to all of you who are helping me out!
More information about the mythtv-users