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.2k stars 95 forks source link

[BUG] Data / Live Timing can not be fast forwarded - Always crashes player #260

Open WololoW opened 3 years ago

WololoW commented 3 years ago

Describe the bug Any time you try to fast forward the Live Timing / Data channel, it will freeze the player or just not work. This also happens when attempting to sync the streams too.

To Reproduce Steps to reproduce the behavior:

  1. Go to any race - Mexico for instance
  2. Play stream Live Timing (Or, Main Feed, Live Timing, and Driver Tracker.
  3. Press button to seek forward a minute multiple times, or seek ahead using the timing bar.
  4. See error

Steps to reproduce the behavior:

  1. Go to any race - Mexico for instance
  2. Play stream Main Feed, Live Timing, and Driver Tracker
  3. Fast forward the main feed 30 mins. Press Sync.
  4. See error - Live Timings will either not sync at all and stop playing, or it will sync to the correct time and stop playing / become unresponsive.

Expected behavior Ability to seek ahead, or sync the Live Timing stream.

Desktop (please complete the following information):

F1TV account

RickyNotaro commented 3 years ago

I have the same issue on 2.3.4 and 2.5.1, 2.5.2. It might be specific to Mexico. The issue doesn't occurs on other races (ie: Monaco Race 2021)

It's always the same video feed that freeze. In the case of Mexico 2021, I've found out that :

feeds are unable to be "Seeked / fast-forwarded".

When a feed is in a "Frozen State", interacting with any other Feed. (ie: Pause), will corrupt the stream that was interacted with: It will loose audio. Also, the interactions seems delayed for a 3-4 seconds when one of the stream is in a frozen states.

I've looked up the logs but it was not logging anything about my actions after opening the different streams.

RickyNotaro commented 3 years ago

I don't think it's usefull but the app crash when closing another player while it's "Frozen"

System.AccessViolationException
  HResult=0x80004003
  Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
  Source=<Impossible d'évaluer la source de l'exception>
  Arborescence des appels de procédure :
<Impossible d'évaluer l'arborescence des appels de procédure de l'exception>
robvdpol commented 3 years ago

Yes, there seems to be something wrong with the Lewis Hamilton and Live Timing streams from Mexico. The seeking seems to be broken.

@SuRGeoNix it seems to be Flyleaf (or FFMpeg) related, I can reproduce it in Flyleaf standalone player as well. Maybe we can look into it this week.

SuRGeoNix commented 3 years ago

@robvdpol Is this happening on specific live or non-live streams? Have you already tested with other players or from web and it works generally? Can you drop me an email with a m3u8 URL to re-produce it?

robvdpol commented 3 years ago

@SuRGeoNix These are non-live streams, but it's only a couple of specific streams that have the issue. I did some testing with other players, in VLC it works fine but MPV has the same issue. I can send you an m3u8 url but it might expire soon so probably not very useful. Will probably have to do it on skype.

SuRGeoNix commented 3 years ago

@robvdpol Yes, can't use the URL probably requires the cookie as well. It would help to check audio/video stream info details. I would try to disable audio and check if that still crashes on seek (maybe it's a weird audio stream). But as you said probably this is an ffmpeg issue and VLC uses custom demuxer instead of ffmpeg's thats why it works. Can you find maybe a public m3u8 to reproduce it? If not we can tested together as you said.

Was happening on all prev versions that you used for Flyleaf I guess, right?

chrcoluk commented 3 years ago

Not sure if this is same issue but will post what happened here.

I just watched last race pit lane channel, data channel no isues, no skipping just start to finish.

Then loaded world feed vod, tried also post race show, and tried to skip to interviews, it worked but no audio, this is for all languages.

I was running 2.3.0

I then upgraded to latest and tried the same again, this time it doesnt even skip, just frozen picture and no response to media player controls (internal).

I then tried on pit lane channel, skip works fine, also works fine for previous race.

So to me it seems the vod's are corrupt for world feed and post race show in today's race, and the older f1 race control handles the audio corruption better.

robvdpol commented 3 years ago

Yes, the Qatar World Feed has the seeking issue as well.

SuRGeoNix commented 3 years ago

Unfortunately it is an HLS ffmpeg issue can't do much about it. The debugging shows me that when you seek (especially far away from the beginning of the stream) it will not bring audio packets at all and generally has delays and strange behavior. If you disable audio (not sure if you can do it from RC, I did it with code) seems to work fine. FFmpeg's trac (bug report) has a number of issues with HLS, I will try to find more info and see if I have to report a new one :(

I will also try to update to latest ffmpeg libs 4.4.1 (but I will need to patch them again for another HLS issue and live seek support)

WololoW commented 3 years ago

… If you disable audio (not sure if you can do it from RC, I did it with code) seems to work fine. …

That option would be welcomed, as no one that I can think of would want to have audio on for every single video stream they are watching simultaneously. Would be a workaround, but a very useful one.

SuRGeoNix commented 3 years ago

Think I found the related bug and possible patch https://trac.ffmpeg.org/ticket/8334