[FFmpeg-devel] [PATCH] FFPlay on a HLS stream skips audio from time to time.

Adrian Cruceru adrian.cruceru at adswizz.com
Wed Jun 8 11:06:02 CEST 2016



On Tue Jun 7 Marton Balint wrote:
> On Wed, 1 Jun 2016, Adrian Cruceru wrote:
>
> >/Hi, />//>/Patch is attached, />//>/Quick notes: />/- Playing HLS streams - FFPlay stalls a bit before each segment download />/- Stalls accumulate and FFPlay falls behind />/- We get log warning and segment skip. />//>/Fix: />/- Just make sure HLS is marked as a real time stream. /
> I guess using -infbuf fixes your usecase as well, right? Without -infbuf
> ffplay buffers 25 frames, so for 25 fps video content, if playing stops,
> this means that it is unable to acquire the first few packets of a
> new segment within 1 second. Is this really the case?
>
> Do you have a public test stream where this can be tested?
>
> Thanks,
> Marton

Hi Marton,

You are correct in both items:
1) "-infBuf" fixes the issue - the patch just adds code to avoid 
manually setting flag.

2) "unable to acquire first few packets" - yes, that's the case:
- if download takes longer then the 25 frames then we skip a bit at each 
download.
- the skips accumulate over time
- the streaming server will eventually age out old frames and cause a 
full segment skip (as detailed in initial email).

You can find some public streams here: 
http://www.addictradio.net/en/labs/ but takes a while to reproduce

Let me know if I can help with any logs / if you want me to test out 
other patches or look into a different area for a fix

Thanks,
Adrian




More information about the ffmpeg-devel mailing list