[FFmpeg-devel] MJPEG format and framerate

Reimar Döffinger Reimar.Doeffinger
Sun Jul 5 12:51:10 CEST 2009

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
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.

More information about the ffmpeg-devel mailing list