[FFmpeg-devel] MJPEG format and framerate

Stefano Sabatini stefano.sabatini-lala
Sun Jul 5 15:11:10 CEST 2009


On date Sunday 2009-07-05 12:51:10 +0200, Reimar D?ffinger encoded:
> On Sun, Jul 05, 2009 at 12:21:18PM +0200, Stefano Sabatini wrote:
> > For example it could fail with something like this:
> > stefano at geppetto ~/s/ffmpeg> ffmpeg -i tmp.avi -y out.mjpeg
> > [...]
> > Input #0, avi, from 'tmp.avi':
> >   Duration: 00:00:03.70, start: 0.000000, bitrate: 304 kb/s
> >     Stream #0.0: Video: h263, yuv420p, 176x144, 10 tbr, 10 tbn, 10 tbc
> > Output #0, mjpeg, to 'out.mjpeg':
> >     Stream #0.0: Video: mjpeg, yuvj420p, 176x144, q=2-31, 200 kb/s, 90k tbn, 10 tbc
> > ...
> > [mjpeg @ 0x9e72920]Only a framerate value of 25 is valid.
> > 
> > Or maybe this is just wrong, and the playback application should be
> > able to define which is the assumed framerate to use (so not
> > necessarily 25).
> 
> Yes, the 25 is an arbitrary default chosen by FFmpeg, raw MJPEG does not
> store any timing information nor is there any reason to assume any
> specific one (25 fps is just the default that FFmpeg uses for almost
> everything).
> This is why AVFMT_NOTIMESTAMPS is set for this muxer. You might make
> ffmpeg.c print a warning whenever transcoding into such a format that
> all timing information might be lost or something like that.

Thanks that makes sense, now what I'm missing is an option in ffplay
to set the input format framerate, I already proposed a patch for that
but it used the deprecated AVFormatParameters, so Michael rejected it
(BTW has anyone a plan to get rid of AVFormatParameters?).

Regards.
-- 
FFmpeg = Foolish and Fundamental Majestic Plastic EntanGlement



More information about the ffmpeg-devel mailing list