[MPlayer-advusers] [BUG] mencoder floating point exception with -of lavf

Michael Niedermayer michaelni at gmx.at
Sun Nov 6 20:17:34 CET 2005


Hi

On Sun, Nov 06, 2005 at 11:04:16AM +0100, Nico Sabbi wrote:
> Corey Hickey wrote:
> 
> >Michael Niedermayer wrote:
> > 
> >
> >>i wouldnt be so sure about that, my guess would rather be that mplayer
> >>extracts them from the video stream for mpeg4 and store 0x0 in the avi 
> >>header, but maybe iam wrong, the only sure thing is that the dimensions
> >>must be valid when av_write_header() is called
> >>   
> >>
> >
> >I'm not sure about anything, just doing my best to poke around in the
> >dark. :)
> >
> >According to gdb both st->codec->width and st->codec->height are set to
> >0 when av_write_header is called. Do you know where they should be set
> >to the correct values? I'll keep looking, but I have a feeling you could
> >fix this in a few seconds while it'll be a hit-and-miss process for me.
> >
> >-Corey
> >
> >
> > 
> >
> 
> the problem is that muxer->fix_parameters() (that calls av_write_header())
> is called before video width and height are really known, parameters that
> are known only after the first video frame is decoded and filtered.
> 
> So, I guess that mencoder should either
> - decode and filter the first frame
> - or pre-init (assuming it's possible) the video filters chain to probe 
> the characteristics
> of the final frame

whichever way its solved, not knowing the width/height when writing the header
is a serious problem independant of lavf, just think of nut where width/height
are variable length, so seeking back and filling it in wont work without some
hacks, and if i understand correctly we cant just write the header at the 
first video frame as an audio frame might have been written before?

[...]
-- 
Michael




More information about the MPlayer-advusers mailing list