I have an USB3 camera module that outputs an MJPEG stream.

I recorded it with “-v:c copy” argument  to an avi file.



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! 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)



If I issue a -r 15 to the input stream when encoding MJPEG to the mp4, then
I do get exactly the right frame count. In fact I get the right frame count
with -r N for any N. It is wrong, however, to set a fixed rate when I know
the camera was working at a variable rate.  For our application, we really
need to keep the original frames with their original timestamps.





My questions are:

(1) Does my MJPEG/avi file even contain the time stamps per frame or is
this information lost? I know the file has the right total time length, so
hoping every frame is also stamped properly.

(2) How do transfer the correct time stamps in the reencoded file?
_______________________________________________
ffmpeg-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to