[MPlayer-users] There is no cache when playing m3u8 stream (hls-protocol)

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Sep 29 16:20:18 CEST 2013


On Mon, Sep 23, 2013 at 12:09:50PM +0200, Waldemar wrote:
> Hello guys,
> sorry for the silence but I was off-line over the weekend.
> 
> First I have to say I'm not a developer, I have only some basic
> knowledge in C/C++, so I can't relly help you, sorry for that.
> 
> I applied  'if (vpacks < 100) demux_fill_buffer(demux, ds);' to
> 'demuxer.c', as suggested by Reimar and it seems to be better but
> unfortunately I can still see some lags.

Yes, it's unlikely to be good enough.
First because even 100 would only be (depending on
frame-rate/interlacing) 1.5 - 5 seconds, secondly
because it probably never ends up buffering actually that much.
It is also problematic in case the demuxer itself hangs.

> I tried also to play this stream with ffplay and it seems ffplay
> dosen't have such a problem, it plays just fine, at least for the time
> I tested it. I don't know if ffplay uses some cache, because I
> couldn't see any information about cache or 'cache fill...' even with
> '-loglevel debug'

caching in the traditional sense is not possible with the implementation
FFmpeg chose.
Though two things that FFmpeg does probably helps:
buffering a few frames and trying to fetch more frames in parallel with
decoding those buffered ones.
Doing it that way isn't easily done in MPlayer.


More information about the MPlayer-users mailing list