robvdpol / RaceControl

Race Control is a standalone, open source F1TV client for Windows, written in C# on the .NET platform.
GNU General Public License v3.0
1.19k stars 95 forks source link

[BUG] DRM Enabled on Live Sessions and Instant VOD #413

Open anthonylavado opened 2 years ago

anthonylavado commented 2 years ago

Describe the bug Attempting to play the race for the Saudi Arabian GP results in a garbled feed, if it plays at all. The error persists with MPV, VLC, and the built in player.

To Reproduce Steps to reproduce the behavior:

  1. Open RaceControl and log in.
  2. Select 2022 Season, Saudi Arabian Grand Prix, and Race session.
  3. Click button to watch any of the listed feeds.
  4. See error, or no playback.

Expected behavior The video feed should playback as it normally would.

Screenshots playbackissue

Desktop (please complete the following information):

F1TV account

Additional context Clicking the Copy button to get a URL for the race session is a link to an MPD as opposed to an M3U. In the web player, it's currently known that Saudi Arabia is the first race replay to keep the DRM active, as opposed to Bahrain. All other sessions seem to work and return M3U URLs, but not the race.

Update: DRM appears to also be active on the Post-Race Show as well.

robvdpol commented 2 years ago

I was afraid this would happen sooner or later. I guess the MPD-file is needed for DRM and they are gradually implementing it. As far as I know FFMpeg does not (or can not) support DRM, so we're kind of screwed here.

One option I have been playing around with in the past is using an Edge webbrowser control that contains a VideoJS control. It seemed to work fine so I might have to look into it again. This should be able to support DRM as well.

anthonylavado commented 2 years ago

Random spontaneous update - it seems to be working now. I'm not sure why. The DRM has been turned off and now an M3U URL is being returned.

Edit: So the DRM has been disabled on the race session, but it's still present on the Post-Race Show. I'm trying to save the network calls now to have something to compare with.

destroy-everything commented 2 years ago

To whom it may concern **** you. Seriously I know F1 is reading this, at least before you do this make the IOS app workable , its so terrible I will be happy if you get rid of the adaptive quality that never works even on my 10Gig connection. When I use custom players I can watch in 4k without a hitch.

Creativesz commented 2 years ago

Uh-Oh, the DRM seems to be back for the Australian race. I'm unable to watch via RaceControl and get a black screen with glitches.

D3XX3R commented 2 years ago

As far as I know FFMpeg does not (or can not) support DRM, so we're kind of screwed here.

If I've seen it correctly certain builds of ffmpeg have configuration called "--decryption_key". Might be worth looking into it.

morgun commented 2 years ago

--demux-lavf-o=decryption_key=<key> this should fix it for mpv i think

rvdeijk commented 2 years ago

One option I have been playing around with in the past is using an Edge webbrowser control that contains a VideoJS control. It seemed to work fine so I might have to look into it again. This should be able to support DRM as well.

I did install the Microsoft Edge WebView2 Runtime on my system and use RC 2.6.4. But todays race I had this DRM issue, any thoughts if I can do something about it? IMG_20220410_085122

Spexxel commented 2 years ago

Is still still persistent right now? I had it this morning but could watch normally after a bit. Only things I did were:

BeanXOfficial commented 2 years ago

I had the same this morning, ended up watching the race in webbrowser

sidewinder94 commented 2 years ago

Just as an information, I tried to cast the International stream for the race of the Australian GP. The chromecast never started the playback.

However, since Chromecasts actually supports Widevine, you might be able to fix it more easily than Desktop playback.

rickschwarz commented 2 years ago

Hi Rob, Maybe this helps you.

widevine-l3-decryptor https://github.com/cryptonek/widevine-l3-decryptor

Widevine in MPV https://github.com/mpv-player/mpv/issues/8286 Digital Rights Management (DRM) content --demux-lavf-o=decryption_key= should work.

mhil70 commented 2 years ago

Hi @robvdpol , Leonardoxh seems to have found a solution for the DRM issue. https://github.com/leonardoxh/race-control-tv/releases/tag/v2.6.2

At least in the AndroidTV app. Perhaps this solution could put you in the direction of a solution for DRM issue in RaceControl.

Edit: update! Seems that https://github.com/leonardoxh/race-control-tv/releases/tag/v2.6.2 als still has DRM issues. Only FP1 on friday worked fine (possibly without DRM from the side of F1TV?), but since Sprint on friday live sessions don't show in RaceControl.

SamPro910 commented 2 years ago

Damn, FOM really removed Widevine there quickly. Already giving an .m3u8 for me, both Post-Race show, AND GP

chrcoluk commented 2 years ago

I am guessing this is the right thread, as a bunch of others reference this one.

Basically right now i cannot watch the pre qualy live show for miami, is no error, just no stream starts neither sound or video, empty video window.

However I can watch VOD's fine, using 2.6.4. and webview is installed.

rickschwarz commented 2 years ago

Any luck yet for an update for the DRM issue ?

knokerwt commented 2 years ago

Ok so F1TV killed the app that made it all worth it. Too bad, If I have to screw around with browsers to achieve the same I can stick with viaplay and cancel the subscription.

rglastra commented 2 years ago

For what it's worth, I raised this in chat with F1TV support and received this in response:

The information you provided is actually accurate and I truly apologize for the inconveniences you are currently experiences in watching F1 live races. Our technical team are working on some improvements and coordinating with certain people to somehow let our customers still access in F1 in different devices as well as race control. This is for us to continue to protect our services F1 recently implemented measures to ensure we are well protected against bot attacks.

Bolded sounds of interest if true. I know the Race Control User-Agent used to be exempted from some checks (I don't recall which, exactly) and perhaps they're working with @robvdpol on something? Here's hoping..

rickschwarz commented 2 years ago

Hi Rob, sounds promisses !

rickschwarz commented 2 years ago

Promissing

JustJoostNL commented 2 years ago

For what it's worth, I raised this in chat with F1TV support and received this in response:

The information you provided is actually accurate and I truly apologize for the inconveniences you are currently experiences in watching F1 live races. Our technical team are working on some improvements and coordinating with certain people to somehow let our customers still access in F1 in different devices as well as race control. This is for us to continue to protect our services F1 recently implemented measures to ensure we are well protected against bot attacks.

Bolded sounds of interest if true. I know the Race Control User-Agent used to be exempted from some checks (I don't recall which, exactly) and perhaps they're working with @robvdpol on something? Here's hoping..

Any further information about this?

f1multiviewer commented 2 years ago

disclosure: I'm the developer of MultiViewer for F1, hope this is ok to post here

Since other 3rd-party apps were rendered useless for live broadcasts, I started working on my own application, which uses Electron (with content decryption module, from CastLabs). It uses the same player as F1TV, but it uses a different configuration that leads to a better sync, less stalling/buffering, and a more pleasant viewing experience overall. I was also able to add Live Timing overlays (on live sessions for now) that can be synced with the driver on-boards to show live telemetry on top of the OBC player. Still working on a better sync during replays and to allow live-timing to work on replays.

I hope to open-source it at some point, but it's already available to try (and many have tried last race):

https://beta.f1mv.com https://www.reddit.com/r/F1TV/comments/v35muj/sneak_peak_of_f1_multiviewer_a_desktop_app/ https://www.reddit.com/r/F1MultiViewer/

I'm also on Discord (invite on the beta site), to help other 3rd-party apps if they are using the same (web-based) approach.

mhil70 commented 2 years ago

@robvdpol The DRM issue (playing 'live' sessions) is resolved by @leonardoxh in : https://github.com/leonardoxh/race-control-tv/releases/tag/2.7.0 https://github.com/leonardoxh/race-control-tv/issues/119

Perhaps the solution there is usable for RaceControl as well?

Vallesuski commented 2 years ago

This is really great. I hope f1viewer (Linux) and RaceControl (Windows) gets the proper updates to bypass DRM.

Hopefully f1viewer and RaceControl developers are still available to continue upgrading these great tools.

f1multiviewer commented 2 years ago

I hope f1viewer (Linux) and RaceControl (Windows) gets the proper updates to bypass DRM.

I just want to make sure we're clear here, neither MultiViewer nor Race Control TV "bypass" DRM. These players both just support DRM-protected playback, because they both use Widevine CDM. They added the needed configuration for Widevine here. This requires the player to have a way to playback DRM-protected content in the first place. MultiViewer uses electron-ecs to be able to do that, and I think Android includes it by default (since Google is the owner of Widevine, that makes sense).

@leonardoxh if you want to talk or exchange information, on the website I've got a Discord invite and a #technical channel. If you're interested. I might not have open sourced anything yet, but I don't have anything to hide either :)

leonardoxh commented 2 years ago

In all honesty the configuration with Android exo player was a breeze I just had to set the correct URL and headers in order to make it work.

What I understood from this project is that there is a need to swap the player because the current one doesn't support it, so going to a web player seems the way.

@f1multiviewer sure, I can join the discord channel and help where needed (if I can)

f1multiviewer commented 2 years ago

@leonardoxh awesome! If you do consider adding similar functionality as F1MV, such as live timing overlays, let me know, happy to share all the info I've gathered so far :)

zierbeek commented 2 years ago

hi all, isn't there any progress on racecontrol anymore?

Spexxel commented 2 years ago

I was planning on taking a crack at it this or next week to see if we can get a temp workaround

robvdpol commented 2 years ago

hi all, isn't there any progress on racecontrol anymore?

Not at the moment, I don't really have much time to work on it right now. I did some fiddling around with an Edge Webview2 control but I couldn't get it to work.

If @Spexxel can come up with a solution that would be very welcome of course.

f1multiviewer commented 2 years ago

Let me know if I can help, and feel free to join the #technical channel on Discord (https://discord.gg/HwnFWCf8Ht) to discuss more technically. @robvdpol does Webview2 ship with a Widevine CDM?

Spexxel commented 2 years ago

Hi all,

I said I would take a crack at it and I did try some things. Unfortunately I did not manage to implement a succesful fix yet. Details as to where I stranded are below. That being said I did create something that could serve as a temporary workaround to at least give a better viewing experience than the default F1TV in browser.

The possible temporary workaround In short this really is nothing more than a stripped down F1TV site. If a stream is encrypted it will use Webview to navigate to the actual stream instead of trying to use Flyleaf. It strips all of the webpage (and CSS) except for the actual video player.

Pros:

Cons:

What I have tried

I still want to try some things but I'm also limited on spare time at the moment. So to atleast give some possibility to watch F1 live streams with RaceControl I quickly created the stripped down version.

If this is deemed a worthy temporary workaround I will gladly create a pullrequest.

Below is an example of the workaround. (Photo because due to DRM is wasn't even able to make a normal screenshot)

rc-strip

morgun commented 2 years ago

Below is an example of the workaround. (Photo because due to DRM is wasn't even able to make a normal screenshot)

Firefox allows to capture screenshots

marcovtwout commented 1 year ago

@robvdpol Maybe pin this issue so it prevents duplicate reports?