[MPlayer-dev-eng] [PATCH]Allow longer url in demux_lavf.c

Lu, Ran hephooey at gmail.com
Fri May 20 00:07:34 CEST 2016


Hi all,

I noticed when playing some live stream from twitch mplayer cannot update the 
m3u8 playlist. The reason is the size of the mp_filename array is only 256 
byte, so url like
"http://video-edge-2aa234.iad02.hls.ttvnw.net/hls-835268/luzbelheim_21377489200_454740786/chunked/index-live.m3u8?token=id=7800187502285523477,bid=21377489200,exp=1463625667,node=video-edge-2aa234-1.iad02.hls.justin.tv,nname=video-edge-2aa234.iad02,fmt=chunked&sig=b511bc935cde4806c9412b53b1bc5c7c24eb416d"
is truncated and the demuxer reports a "403 forbidden" error because the auth 
code is incomplete.

The patch in the attachment simply increase the size of mp_filename to 2048. I 
pick this to match the size used in ffmpeg url.

With this patch mplayer can play the stream without the help of other programs 
like livestream. But it is still imperfect. I think mplayer apply the cache 
mechanism to the initial m3u8 playlist instead of the real stream. As the 
result the cache is always 0%, and every time the stream move to a new ts 
chunk or update the m3u8 playlist there is a slight but noticeable pause, and 
mplayer drop 3-4 frames depends on the speed of the internet. I had a quick 
look at the source code but did not find a place I can wire the ffmpeg stream to 
mplayer cache. Any suggestions?

-- 
Best Regards,
LR
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mp_filename.patch
Type: text/x-patch
Size: 424 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20160519/8631e762/attachment.bin>


More information about the MPlayer-dev-eng mailing list