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

Waldemar waldemar4u at gmail.com
Mon Sep 23 12:09:50 CEST 2013


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.

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'

So this is my feedback, I hope it is useful for you.
Thank you for your attention.

Have a nice day.
Waldemar

2013/9/19 Waldemar <waldemar4u at gmail.com>:
> Hello list,
> when playing m3u8 live streams (hls-protocol), Mplayer dosen't use
> cache. This leads to a delay when MPlayer jumps from one segment of
> the playlist to the next and the hole stream becomes 'stutter'.
>
> Here my use case:
>
> $ mplayer -cache 1000 -cache-min 99
> ffmpeg://http://webtv-aarh-8.stofa.dk/182_01.m3u8
> MPlayer SVN-r36449-4.6 (C) 2000-2013 MPlayer Team
>
> Playing ffmpeg://http://webtv-aarh-8.stofa.dk/182_01.m3u8.
> libavformat version 55.18.100 (internal)
> Using network protocols without global network initialization. Please
> use avformat_network_init(), this will become mandatory later.
> Using network protocols without global network initialization. Please
> use avformat_network_init(), this will become mandatory later.
> Cache fill:  0.04% (395 bytes)
>
> libavformat file format detected.
> Using network protocols without global network initialization. Please
> use avformat_network_init(), this will become mandatory later.
> Using network protocols without global network initialization. Please
> use avformat_network_init(), this will become mandatory later.
> [hls,applehttp @ 0xb74f1680]Estimating duration from bitrate, this may
> be inaccurate
> [lavf] stream 0: video (h264), -vid 0
> [lavf] stream 1: audio (aac), -aid 0
> LAVF: Program 0
> VIDEO:  [H264]  854x480  0bpp  25.000 fps    0.0 kbps ( 0.0 kbyte/s)
> Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared
> object file: No such file or directory
> [vdpau] Error when calling vdp_device_create_x11: 1
> ==========================================================================
> Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
> libavcodec version 55.31.101 (internal)
> Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
> ==========================================================================
> ==========================================================================
> Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
> AUDIO: 48000 Hz, 2 ch, floatle, 134.6 kbit/4.38% (ratio: 16828->384000)
> Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
> ==========================================================================
> [AO OSS] audio_setup: Can't open audio device /dev/dsp: No such file
> or directory
> AO: [alsa] 48000Hz 2ch floatle (4 bytes per sample)
> Starting playback...
> [VD_FFMPEG] Trying pixfmt=0.
> [VD_FFMPEG] XVMC-accelerated MPEG-2.
> The selected video_out device is incompatible with this codec.
> Try appending the scale filter to your filter list,
> e.g. -vf spp,scale instead of -vf spp.
> [VD_FFMPEG] Trying pixfmt=0.
> [VD_FFMPEG] XVMC-accelerated MPEG-2.
> The selected video_out device is incompatible with this codec.
> Try appending the scale filter to your filter list,
> e.g. -vf spp,scale instead of -vf spp.
> Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
> VO: [xv] 854x480 => 854x480 Planar YV12
> A:50954.1 V:50954.1 A-V:  0.000 ct:  0.047   0/  0 20%  2%  0.9% 0 0 0%
>
> Exiting... (Quit)
>
>
>
>
> Note: the 395 bytes in this line 'Cache fill:  0.04% (395 bytes)'  is
> the size of the m3u8-file. You can verify this by using '-dumpstream'
> paramenter.
>
> Here what I get:
>
> $ mplayer -cache 1000 -dumpstream -dumpfile stream.ts -cache-min 99
> ffmpeg://http://webtv-aarh-8.stofa.dk/182_01.m3u8
> MPlayer SVN-r36449-4.6 (C) 2000-2013 MPlayer Team
>
> Playing ffmpeg://http://webtv-aarh-8.stofa.dk/182_01.m3u8.
> libavformat version 55.18.100 (internal)
> Using network protocols without global network initialization. Please
> use avformat_network_init(), this will become mandatory later.
> Using network protocols without global network initialization. Please
> use avformat_network_init(), this will become mandatory later.
> Using network protocols without global network initialization. Please
> use avformat_network_init(), this will become mandatory later.
> dump: 395 bytes written to 'stream.ts'.
> Core dumped ;)
>
> Exiting... (End of file)
>
> $ cat stream.ts
> #EXTM3U
> #EXT-X-VERSION:3
> #EXT-X-TARGETDURATION:11
> #EXT-X-MEDIA-SEQUENCE:734893
> #EXTINF:10,
> /182/20130626T074944-182_01-734893.ts
> #EXTINF:10,
> /182/20130626T074944-182_01-734894.ts
> #EXTINF:10,
> /182/20130626T074944-182_01-734895.ts
> #EXTINF:10,
> /182/20130626T074944-182_01-734896.ts
> #EXTINF:10,
> /182/20130626T074944-182_01-734897.ts
> #EXTINF:10,
> /182/20130626T074944-182_01-734898.ts
> $
>
> So my question is are there any parameters I can tweak to enable
> cache? Or is it a bug in MPlayer?
>
> Thank you in advance.
>
> Bye
> Waldemar


More information about the MPlayer-users mailing list