[MPlayer-dev-eng] [PATCH] using mplayer with ffmpeg asf stream

Bertrand Baudet bertrand_baudet at yahoo.com
Wed Oct 29 22:42:39 CET 2003


Hi,

I'm not sure it's ok!

Did you try to connect to a server that redirect you by sending the same mime 
type? I'm not sure it's going to work with your patch.

In addition, I haven't seen a MS WMS that is sending this mime type for a live 
stream.
Did you try to connect a MS WMP to this stream? did it work?

Please verify that all cases are handled properly.

Bertrand

On Wednesday 29 October 2003 12:53, Dominique Andre Gunia wrote:
> Hi!
>
> I set up a stream with ffmpeg/ffserver (ffmpeg.sourceforge.net). It
> creates an asf stream that I would like to view with mplayer. The
> problem is, that mplayer thinks the asf file would be a playlist because
> of an unknown Content-Type. Details follow:
>
> When started, I get the following result
>
> > dom at tng:/tmp$ mplayer -nocache http://schuntille:8090/test.asf
> > [...]
> > Playing http://schuntille:8090/test.asf
> > Resolving schuntille ...
> > Connecting to server schuntille[134.169.169.6]:8090 ...
> > Resolving schuntille ...
> > Connecting to server schuntille[134.169.169.6]:8090 ...
> > =====> ASF Redirector
> > Connected to server: schuntille
> >
> >
> > MPlayer interrupted by signal 2 in module: handle_playlist
>
> The http-protocol is something like this:
> > dom at tng:/tmp/MPlayer-0.92$ telnet schuntille 8090
> > Trying 134.169.169.6...
> > Connected to schuntille.schunter.etc.tu-bs.de.
> > Escape character is '^]'.
> > GET /test.asf HTTP/1.0
> > Host: schuntille
> >
> > HTTP/1.0 200 OK
> > Pragma: no-cache
> > Server: Cougar 4.1.0.3923
> > Cache-Control: no-cache
> > Pragma: client-id=1908046342
> > Pragma: features="broadcast"
> > Content-Type: video/x-ms-asf
>
> As you can see the Content-Type is video/x-ms-asf but mplayer expects
>
> one of these (defined in libmpdemux/asf_stream.c):
> > if(!strcasecmp(content_type, "application/octet-stream") ||
> > !strcasecmp(content_type, "application/vnd.ms.wms-hdr.asfv1") ||
> > !strcasecmp(content_type, "application/x-mms-framed") )
>
> Since this content type is not defined, it uses the default behaviour,
> which thinks this is a redirector for some browser and tries to parse it
> as playlist, which is simply wrong.
>
> When I patch the file like this:
>
> --- main/libmpdemux/asf_streaming.c     2003-09-25 02:36:04.000000000 +0200
> +++ main.patched/libmpdemux/asf_streaming.c     2003-10-29
> 12:44:32.000000000 +0100 @@ -421,7 +421,8 @@
>         if( content_type==NULL ) return ASF_Unknown_e;
>         if(     !strcasecmp(content_type, "application/octet-stream") ||
>                 !strcasecmp(content_type,
> "application/vnd.ms.wms-hdr.asfv1") ||        // New in Corona, first
> request -               !strcasecmp(content_type,
> "application/x-mms-framed") ) {               // New in Corana, second
> request +               !strcasecmp(content_type,
> "application/x-mms-framed") ||                // New in Corana, second
> request +               !strcasecmp(content_type, "video/x-ms-asf")) {
>
>                 if( strstr(features, "broadcast") ) {
>                         mp_msg(MSGT_NETWORK,MSGL_V,"=====> ASF Live
> stream\n");
>
>
> everything is fine. The output is
>
> > Playing http://schuntille:8090/test.asf
> > Resolving schuntille ...
> > Connecting to server schuntille[134.169.169.6]:8090 ...
> > Resolving schuntille ...
> > Connecting to server schuntille[134.169.169.6]:8090 ...
> > Resolving schuntille ...
> > Connecting to server schuntille[134.169.169.6]:8090 ...
> > Cache size set to 0 KBytes
> > Connected to server: schuntille
> > Stream not seekable!
> > ASF file format detected.
>
> Is this a bug in ffmpeg or in mplayer? If it is a bug in mplayer, could
> you please use this patch for further versions? I found serveral users
> having this problem and no one knew a solution.
>
> Thanks very much!
>
> Regards,
> Dominique



More information about the MPlayer-dev-eng mailing list