[FFmpeg-user] MJPEG/avi encoding to H.264/mp4 and retaining original frame times

Aviv Hurvitz aviv.hurvitz at gmail.com
Mon Oct 30 16:27:35 EET 2017


Carl - you are right! mkv works.


On Wed, Oct 25, 2017 at 11:40 PM, Carl Eugen Hoyos <ceffmpeg at gmail.com>
wrote:

> 2017-10-25 22:59 GMT+02:00 Aviv Hurvitz <aviv.hurvitz at gmail.com>:
> > I have an USB3 camera module that outputs an MJPEG stream.
> >
> > I recorded it with “-v:c copy” argument  to an avi file.
>
> This records a variable frame rate file because your camera -
> most likely - is unable to keep constant frame rate.
>
> > Now I want to reencode it to a more compact file in h264/mp4
> > format.  If I do that with default arguments, I get a file with more
> > frames than the original!
>
> FFmpeg is unable to write - valid - variable frame rate mp4 files, I
> suggest you output to mkv.
>
> > Also the FPS – as reported by VLC – is 40 fps whereas I know I
> > was recording at about 15 fps (approximately, it varies based on
> > lighting in this camera)
>
> Yes, it varies indicating variable frame rate.
>
> Carl Eugen
>
> (Yes, of course: avi does record timestamps, if it would not, you
> would not see duplicated frames)
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-user mailing list