I'm using FFMPEG to do the following two things:
- create an mp4 given a set of images
- compile mp4s to create a longer video (mp4)
To create mp4s from images, I use the following command:
ffmpeg -r 5 -i 'img%03d.jpg' output.mp4
As far as I know, this creates a video with a framerate of 5fps.
But when I try to compile mp4s, it seems like frames within each mp4 are being dropped.
To create the compiled footage, I create a text file that points to all the mp4s that should be included in the compilation, e.g.
file 'set1/output.mp4'
file 'set2/output.mp4'
file 'set3/output.mp4'
file 'set4/output.mp4'
file 'set5/output.mp4'
file 'set6/output.mp4'
file 'set7/output.mp4'
Then I run the following command:
ffmpeg -f concat -i input.txt -codec copy compilation.mp4
The resulting video seems to drop 2-3 frames from each of the output videos.
How do I ensure that the compiled video doesn't drop any frames?
(For reference, I used the following tutorial: https://trac.ffmpeg.org/wiki/Concatenate)