[MPlayer-users] Seekable http streams are not reporting stream length. Can they?
Brian L.
zorander at gmail.com
Sun Aug 3 11:20:16 CEST 2008
I am using mplayer to play audio files over http. I was immediately
impressed that seeking in the media file was supported out of the box
using http ranges.
Unfortunately, the http stream implementation doesn't report the
stream length back to mplayer, even when the stream length is known
based on a Content-Length header, so streams appear with
unknown/zero/bad lengths, like this:
A: 6.1 (06.1) of -0.3 (unknown) 0.0% 45%
The same file played from the local filesystem shows up like this:
A: 2.0 (01.9) of 237.0 (03:57.0) 0.1%
It seems like adding something to stream/http.c like this:
char *tmp = http_get_field(http_hdr, "Content-Length");
if (tmp)
{
stream->end_pos = atoi(tmp);
}
in nop_streaming_start in the case 200: // OK case would cause the
information to be reported back and (presumably) show up in the
feedback on mplayer's stdout.
Is there a reason not to do this? Can this feature be added?
Thanks,
Brian
More information about the MPlayer-users
mailing list