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: HLS: Two hour delay with internal decoder on specific streams. (Read 1976 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

HLS: Two hour delay with internal decoder on specific streams.

I've encountered a strange bug/behaviour with HLS streams from the Swedish national radio, e.g. this one (hope this one works outside Sweden):
https://live.sr.se/pool1/p4kristianstad/p4kristianstad.isml/p4kristianstad-audio=192000.m3u8

If I play it with the internal decoder it will play the audio from two hours ago, while if I use FFmpeg through the FFmpeg rrapper it will output the correct audio, confirmed with the official site (www.sverigesradio.se/kristianstad, the "Lyssna direkt" button).
I'm using 1.6.7 beta 13.

Re: HLS: Two hour delay with internal decoder on specific streams.

Reply #1
That would be because their stream playlist starts at a certain checkpoint of buffering, but there's some sort of metadata that indicates where the "live" position should be relative to the start of the list. Hopefully your HLS stream isn't geoblocked, that should help with Peter implementing this functionality, assuming he hasn't started something already, having seen this before I did.

(Incidentally, my seeing it doesn't benefit the development anyway, since I'm not involved in core development. I really only just keep the forums relatively tidy, and occasionally poke into my own dev stuff.)

Re: HLS: Two hour delay with internal decoder on specific streams.

Reply #2
Yes, I guessed it was something like that. I hope it gets implemented, I suspect that more streams than these use this feature. A side note that may or may not be of help is that it works in VLC.
A nice bonus would of course be the ability to seek in streams like these, but that might be hard to implement.

Re: HLS: Two hour delay with internal decoder on specific streams.

Reply #3
Seeking in streams with backlog available would require inputs to be able to report their "current" playback position. I admit, this would also be a nice thing to have for formats that support looping, to report the "actual" stream position as they loop indefinitely.

Re: HLS: Two hour delay with internal decoder on specific streams.

Reply #4
Any progress on this issue?

Re: HLS: Two hour delay with internal decoder on specific streams.

Reply #5
The issue persists in v1.6.9.

Re: HLS: Two hour delay with internal decoder on specific streams.

Reply #6
It may be a short while, as Peter told me he's currently busy with a backlog of paid work he was putting off or something. It may be interesting work to Mac users.

Re: HLS: Two hour delay with internal decoder on specific streams.

Reply #7
I also hear 30 minutes of time shift back in time when listening to HLS streams from Danish Radio using internal HLS decoder. One example: DR P4 Fyn

Re: HLS: Two hour delay with internal decoder on specific streams.

Reply #8
This requires parsing the HLS playlist for a tag indicating the current playback position. And starting at a non-zero playback position would also require that inputs be able to report an arbitrary file decode position. For instance, parsing the HLS playlists periodically and detecting when the older entries are removed and thus change the available backlog.

 

Re: HLS: Two hour delay with internal decoder on specific streams.

Reply #9
Problem acknowledged and being addressed, thanks for reporting.
Microsoft Windows: We can't script here, this is bat country.

Re: HLS: Two hour delay with internal decoder on specific streams.

Reply #10
Fixed in 1.6.10 beta 1
https://www.foobar2000.org/download
Microsoft Windows: We can't script here, this is bat country.

Re: HLS: Two hour delay with internal decoder on specific streams.

Reply #11
Thanks a lot! Tried 1.6.10 and it works, however, I get a short pause after 6 seconds of playing the streams and sometimes more random pauses after that. This was not an issue before and the streams still work fine using the FFmpeg decoder. Would be great if others could confirm with streams that are not from Swedish Radio since they are the only ones I know that had this problem.

Re: HLS: Two hour delay with internal decoder on specific streams.

Reply #12
Sorry, but for Danish HLS stations playing just stops after about 5 seconds with 1.6.10 HLS decoding.

Re: HLS: Two hour delay with internal decoder on specific streams.

Reply #13
Thanks for reporting, investigating.
Microsoft Windows: We can't script here, this is bat country.

Re: HLS: Two hour delay with internal decoder on specific streams.

Reply #14
Improved in beta 2.
Microsoft Windows: We can't script here, this is bat country.

Re: HLS: Two hour delay with internal decoder on specific streams.

Reply #15
Works fine here now, I let a few streams run for at least a minute and no skips. Thanks a lot!

Re: HLS: Two hour delay with internal decoder on specific streams.

Reply #16
Also works fine here. Thank you