Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: BUG: ffmpeg decoder wrapper freezes playback for version higher than 0.7.1 (Read 3401 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

BUG: ffmpeg decoder wrapper freezes playback for version higher than 0.7.1

Description of the bug:
When using ffmpeg decoder wrapper to play HLS streams of the German WDR, playback freezes roughly every 5.5 seconds, while CPU utilization for foobar and ffmpeg spike. Initial wait time when starting the stream is also unusually long.

Affected software versions:
The bug affects several foobar versions, I tested 2.24, 2.24.1, and 2.24.2 in 32 and 64 bit. They are all affected.
I also tested versions 0.8.1, 0.8, and 0.7.1 of ffmpeg decoder wrapper. Version 0.7.1 is NOT affected, it plays the streams without issue in 32 bit foobar, but both 0.8 and 0.8.1 are affected.

  • ffplay 7.1 itself will play the same stream URL without issue.
  • ffmpeg 7.1 itself will happily transcode the stream URL to a file on the disk without issue.
  • foobar's native HLS decoder will play the stream without the freezes, but it plays from as far in the past as the stream will allow, which means it is not a suitable alternative for streams that allow rewinding.
  • I conclude that the issue must lie with ffmpeg decoder wrapper itself, in a change that occured from v0.7.1 to v0.8

Here is a test stream URL that is affected:
https://wdrhf.akamaized.net/hls/live/2027955-b/1live/192/seglist.m3u8

Re: BUG: ffmpeg decoder wrapper freezes playback for version higher than 0.7.1

Reply #1
Thanks for the report, both issues - bad behavior of built-in HLS reader and FFmpeg wrapper - are being investigated.
Microsoft Windows: We can't script here, this is bat country.

Re: BUG: ffmpeg decoder wrapper freezes playback for version higher than 0.7.1

Reply #2
FFmpeg wrapper bug fixed in version 0.8.2.

Bugs in internal HLS reader will be addressed in the next update.
Microsoft Windows: We can't script here, this is bat country.

Re: BUG: ffmpeg decoder wrapper freezes playback for version higher than 0.7.1

Reply #3
Thank you very much!

Re: BUG: ffmpeg decoder wrapper freezes playback for version higher than 0.7.1

Reply #4
Timing bugs in internal HLS decoder should be fixed in newly released foobar2000 v2.24.3 preview.
Microsoft Windows: We can't script here, this is bat country.

Re: BUG: ffmpeg decoder wrapper freezes playback for version higher than 0.7.1

Reply #5
Thank you, I am using the HLS decoder from the preview version.

The WDR streams seem to have a new issue now. Not a big one, luckily:

After starting the stream, typically 0x - 1x (and rarely 2x), there will be a short pause in playback, on the order of 1 second. I am assuming it is buffering, and once this has happened, it will then (almost always) have enough delay to never need buffering again. Indications that this is indeed a case of buffering:
  • Play the same stream in 2 foobar instances side by side. Instance A is the native HLS decoder, instance B is ffmpeg decoder wrapper
  • Initially, the native HLS decoder is ahead of ffmpeg by about a second, very close to how long the pauses are
  • After the pause has happened, the two instances are much closer to each other
  • In cases of multiple pauses, the streams become more synchronous every time
  • It makes intuitive sense given how HLS works: If the native decoder always plays the newest available segment from the start, there will be a variable delay to "live"
  • ---> If by chance the delay is large at the start, there will be no buffer pauses
  • ---> If by chance the delay is small at the start, there will be 1 or 2 buffering breaks

I also noticed that BBC 6 streams are wildly out of sync between native decoder and ffmpeg wrapper, though in this case, ffmpeg is ahead of native by anywhere from 10 to 45 seconds.

Sorry for opening this can of worms  O:)

Re: BUG: ffmpeg decoder wrapper freezes playback for version higher than 0.7.1

Reply #6
New build out, this time I made it start playback a few seconds in the past to avoid buffer underruns.
Microsoft Windows: We can't script here, this is bat country.