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. --- ffplay.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ffplay.c b/ffplay.c index 11c5091..ed001cc 100644 --- a/ffplay.c +++ b/ffplay.c @@ -2801,6 +2801,7 @@ static int is_realtime(AVFormatContext *s) if( !strcmp(s->iformat->name, "rtp") || !strcmp(s->iformat->name, "rtsp") || !strcmp(s->iformat->name, "sdp") + || !strcmp(s->iformat->name, "hls,applehttp") ) return 1; -- 2.7.4 Thank you, Adrian
>From cf7d13397b996eb0d4b97dadbf9b7250fd96e598 Mon Sep 17 00:00:00 2001 From: Adrian Cruceru <adrian.cruc...@adswizz.com> Date: Wed, 1 Jun 2016 16:05:25 +0300 Subject: [PATCH] FFPlay on a HLS stream skips audio from time to time. Log warning: "skipping %d segments ahead, expired from playlists" is displayed (hls.c:1290) Online reports: http://ffmpeg.gusari.org/viewtopic.php?f=26&t=1444 Actual problem: - FFPlay ends up with audio way behind streaming server - This is because HLS works as a real time protocol using: - - Large segments - download takes some time. - - ffplay.c queues up at most 25 frames (lines 3068-3078) - which may be insufficient and cause slight stall in audio playback until next segment is downloaded. - - stalls above accumulate to the point where ffplay does a skip-to-correct segment and jumps over some data. (This is done as server may remove segments as expired) Fix: - Quick option - and one in patch - just make sure we use infinite_buffer for hls as well. (mark it as real time) - Alternative - increase buffer size to be larger then time it takes to download a segment. --- ffplay.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ffplay.c b/ffplay.c index 11c5091..ed001cc 100644 --- a/ffplay.c +++ b/ffplay.c @@ -2801,6 +2801,7 @@ static int is_realtime(AVFormatContext *s) if( !strcmp(s->iformat->name, "rtp") || !strcmp(s->iformat->name, "rtsp") || !strcmp(s->iformat->name, "sdp") + || !strcmp(s->iformat->name, "hls,applehttp") ) return 1; -- 2.7.4
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel