[MPlayer-dev-eng] [PATCH] make lavf demuxer and mplayer demuxer return same format extradata.

Roberto Togni r_togni at tiscali.it
Thu Nov 2 22:31:19 CET 2006


On Wed, 1 Nov 2006 21:35:00 +0100
"elupus" <elupus at ecce.se> wrote:

> Hi, 
> 
> Here's a patch that partially fixes invalid_fps_broken_video_lavc.rm in
> incomming. 
> 

File not found.

> The file in question won't play correctly unless external video codec is
> used and mplayer real demuxer, no other combination. There was a mismatch in
> the byteorder of extradata between lavf and mplayer real demuxer. This is
> changed to keep extradata in same order as was read from file (this is how
> lavf does it).
> 

Will look into it, i assume you mean RV10 and/or RV20 here, since
RV30/RV40 are supported by binary only.

> Secondly, there was another mismatch between lavf and internal demuxer on
> the idea of how packets look. Internal real demuxer prepends a header wich
> gives information on video slices. It doesn't look like lavf does this, (or
> it's in some different format). By skipping the setup of slice_offset in
> avctx (when demuxing with lavf) it decodes the video without complaining all
> too much. It's not a complete solution since having two methods for passing
> packets that differ depending on demuxer isn't a good idea, but rewriting
> this in demux_real.c is out of my liege.
> 

The demuxer can't know what kind of decoder will be used, so if that
data is required by the binary codec it's not possible to remove it.
Maybe it can be recreated from other data by vd_realvid.c, like it's
done for "flavour" for sipro decoder in vd_realaud.c

> There is still a third problem here and that is vd_realvid.c can't decode
> any data as demuxed by lavf. Since it expects that extra header in the data
> to give to decoder, it just segfaults when it's fed data from lavf.
> 

I'll see what can be done, but i'm not much interested in making the
binary codecs work with lavf rm demuxer now.

> So this patch gives us.
> lavf,         lavc   -> slow and choppy
> lavf,         dll    -> segfault
> demux_real.c  lavc   -> choppy but correct speed (default)
> demux_real.c  dll    -> choppy but correct speed
> 
> There is also another problem with that file, it has a fps of 30 as given by
> mplayer and 12 as given by lavf, but actually has a fps of 15 if one go by
> it's timestamps. mplayer's demuxer almost get's it right with very choppy
> playback, -fps 15 fixes that. Lavf on the other had seem to mess up the
> timestamps royally, but I suppose that will be for another mailing list. 
> 

Try -mc 10 or -autosync, Real files should be playable using timestamps
only without knowing fps.

Ciao,
 Roberto



More information about the MPlayer-dev-eng mailing list