[MPlayer-users] Flash Video over HTTP issues

Daniel Svensson dsvensson at gmail.com
Thu Mar 1 10:58:32 CET 2007


Hi,

I've noticed a problem with playing Flash Video (.flv) files over
HTTP. It seems that if the server doesn't have 'Accept-Ranges' header
mplayer fail to play the file. This is very odd because to remedy this
I wrote a proxy in python that sets the 'Accept-Ranges' header, this
makes mplayer play the file correctly, but it never sends any 'range'
requests to the proxy so it doesn't really use any features made
available by 'Accept-Ranges'.
To prove my point I edited streams/http.c to always set the seekable
flag to 1 and now mplayer could play all the streams without any
problems. (this is _obviously_ not a fix, just a demonstration)

Here is the critical log output of mplayer failing:
LAVF_check: flv format
libavformat file format detected.
cache_stream_seek: WARNING! Can't seek to 0xFFFFFFFFFFFFFFFF !
cache_stream_seek: WARNING! Can't seek to 0xFFFFFFFFFFFFFFFC !
Stream not seekable!
cache_stream_seek: WARNING! Can't seek to 0xFFFFFFFFB9B3A9FC !
Stream not seekable!
[flv @ 0x8814fa8]skipping flv packet: type 74, size 16658666, flags 0
Stream not seekable!
(where the last two messages are repeated with diffrent values, "forever")

And the same point where it works:
LAVF_check: flv format
libavformat file format detected.
cache_stream_seek: WARNING! Can't seek to 0xFFFFFFFFFFFFFFFF !
cache_stream_seek: WARNING! Can't seek to 0xFFFFFFFFFFFFFFFC !
Resolving v129.youtube.com for AF_INET6...
Couldn't resolve name for AF_INET6: v129.youtube.com
Resolving v129.youtube.com for AF_INET...
Connecting to server v129.youtube.com[72.51.34.229]: 80...
Content-Type: [video/flv]
Content-Length: [7079076]
(regular playback later starts)

To reproduce the problem here are two urls:
This file is hosted by lighttpd and has no 'Accept-Ranges' in its header.
http://v129.youtube.com/get_video?video_id=M23If6Sqe-Q (this one breaks)

This file is hosted by apache and has the 'Accept-Ranges' in its header.
http://youtube-673.vo.llnwd.net/d1/01/C1/M23If6Sqe-Q.flv (this one works)

They are both the same file, and if you download the files to disk
they both play without problems.

However, none of these are playable over HTTP with mplayer svn. The
file hosted by the Apache server is playable by MPlayer
2:1.0~rc1-0ubuntu3, and the file hosted by lighttpd is playable by
MPlayer 2:1.0~rc1-0ubuntu3 with the seekable=1 hack.

Mplayer svn has the same issue with the file from lighttpd without
'Accept-Ranges', and the file hosted by Apache seems to get cought in
an endless redirection loop. I haven't investigated when this issue
occured yet. When setting seekable=1 the file from lighttpd also get
cought in the endless redirection loop.

-- 
Daniel Svensson, <dsvensson at gmail.com>



More information about the MPlayer-users mailing list