Mailing List Archive

Using the External Recorder with streamlink
Hello!

I use the Generic External Recorder with streamlink to record some free
channels from a streaming service and it works excellent.

I have now written a Python plugin for streamlink to record some non-free
channels from another streaming service that I am paying for.

So far I have managed to get my streamlink plugin to:
- Successfully authenticate to the streaming service
- Get an Access Token
- Get the MPEG-DASH MPD file
- Return the MPD file to streamlink which successfully starts to stream
the content

However, according to the MPD file the content is DRM content protected
by Widevine and PlayReady. Even if I am successfully authenticated to
the streaming service I also need to contact a Widevine License Server
to verify the DRM license.

What are my options on that?

Chrome and Firefox (and more?) have built in support for Widevine but
would it be possible for streamlink to output to Chrome/Firefox/etc
which could store the stream on disk?

Best regards,
Peter Carlsson
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Using the External Recorder with streamlink [ In reply to ]
On Mon, 18 May 2020 at 21:52, Peter Carlsson <maillist.peter@home.se> wrote:

> Chrome and Firefox (and more?) have built in support for Widevine but
> would it be possible for streamlink to output to Chrome/Firefox/etc
> which could store the stream on disk?
>

For the record, I'm not that clued up on the Widevine CDM, but I very much
suspect not in the way in which you're thinking. My understanding is that
the Widevine CDM is a black-box and plays video in an HTML5 video element
within supported browsers or via approved apps only.

On desktop browsers, given the path isn't entirely secure, they tend to be
certified for L3 (the least secure level). Under L3, content providers may
limit the streaming resolution. Android devices on the other hand have
secure hardware and can enforce disabling of user screen/audio capture for
example, so are more usually certified for L1 (the highest level with full
access to premium HD content granted).

What I think/understand this means is that you can potentially screen/audio
capture Widevine protected content playing in a browser window. In this
scenario, it's probably easier to do it via browser automation though,
either through something like xdotool or perhaps via Selenium. The only
reason I'm suggesting that is because if you need to pass cookies or tokens
to the back-end CDN as well, they're already there in the browser, whereas
if you're starting via streamlink, you've got to somehow pass them across
to the browser from the streamlink plugin.

I did do some experimentation with screen/audio capture of video playing
in-browser under a virtual X server a while back, but I did have issues
with getting the colours right. I'm not if it was the virtual X server
settings or what, but as I've been recording IPTV streams with streamlink
(from non content protected sources), I have not pursued the browser
screen/audio capture method for a long time now.

I'll certainly be interested to see what other people might have to say in
this thread.

--
Cheers, Ian
Re: Using the External Recorder with streamlink [ In reply to ]
On Tue, 19 May 2020 at 00:09, Ian Cameron <mkbloke@gmail.com> wrote:

> I did do some experimentation with screen/audio capture of video playing
> in-browser under a virtual X server a while back, but I did have issues
> with getting the colours right. I'm not if it was the virtual X server
> settings or what, but as I've been recording IPTV streams with streamlink
> (from non content protected sources), I have not pursued the browser
> screen/audio capture method for a long time now.
>

Hmm, what a difference a day makes...
https://github.com/streamlink/streamlink/issues/2983

It looks like I might have to revisit the screen/audio capture solution
sooner rather than later if things carry on like this. :-(

--
Cheers, Ian
Re: Using the External Recorder with streamlink [ In reply to ]
On Wed, May 20, 2020 at 12:01 AM Ian Cameron <mkbloke@gmail.com> wrote:

> Hmm, what a difference a day makes...

Please respect item #5 at:
https://www.mythtv.org/wiki/Mailing_List_etiquette#Anything_else_I_should_be_aware_of.3F

(i.e. what you do in the privacy of your residence is
between you and your controlling legal authorities,
but circumvention of protected content requirements
should never, ever, be discussed on *this* list).
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Using the External Recorder with streamlink [ In reply to ]
On Wed, 20 May 2020 at 01:09, Gary Buhrmaster <gary.buhrmaster@gmail.com>
wrote:

> Please respect item #5 at:
>
> https://www.mythtv.org/wiki/Mailing_List_etiquette#Anything_else_I_should_be_aware_of.3F
>
> (i.e. what you do in the privacy of your residence is
> between you and your controlling legal authorities,
> but circumvention of protected content requirements
> should never, ever, be discussed on *this* list).
>

Oops, sorry about that...

--
Cheers, Ian