How to change framerate with ffmpeg without re-encoding? I have lots of large mjpeg timelapse videos, and I would like to speed them up with ffmpeg without loosing quality, dropping or creating frames.

Video: mjpeg (MJPG / 0x47504A4D), yuvj420p(pc, bt470bg/unknown/unknown), 1280x720, 605 kb/s, 1 fps, 1 tbr, 1 tbn, 1 tbc


The only way I got it working is ffmpeg -r 10 -i video.avi -vsync 0 output.mp4, but this encodes the output with mpeg4. If I use -vcodec copy, the -r 10 looses its power. The PTS rescaling method creates and drops frames. I do not care about timestamps, I want a file with all of the input frames at a fixed (higher) frame rate. 
Is there a simpler solution than this? Maybe with image2pipe?
This can't normally be done, but luckily for you, MJPEG is a codec for which streamcopy + piping can work

ffmpeg -i in.avi -c copy -f image2pipe - | ffmpeg -f image2pipe -framerate 50 -i - -c copy out.mp4




The JPEG frames in your input are malformed. For such streams, it's a two step process

ffmpeg -i in.avi -c copy frames%d.jpg

ffmpeg -framerate 50 -i frames%d.jpg -c copy out.mp4