I have a 24 fps video. First, I split it into frames:
ffmpeg -i input.mp4 frame%06d.png
Secondly, I joined these frames, and compressed the result in another command:
ffmpeg -r 24 -i frame%06d.png -c:v libx264rgb -crf 0 -preset ultrafast all.mp4
ffmpeg -i all.mp4 -c:v libx264 -pix_fmt yuv420p -crf 27 -preset veryslow allcompressed.mp4
Thirdly, I deleted every second frame (the ones with an even digit at the end), and renamed them so that they have continuous numbers.
Finally, I joined and compressed them with the previous commands but with 12 fps:
ffmpeg -r 12 -i frame%06d.png -c:v libx264rgb -crf 0 -preset ultrafast odds.mp4
ffmpeg -i odds.mp4 -c:v libx264 -pix_fmt yuv420p -crf 27 -preset veryslow oddscompressed.mp4
What I don't understand, is that allcompressed.mp4 is 296 741 kB and oddscompressed.mp4 is 322 369 kB. How is this possible? I did not expect to get half of the original size but getting a bigger file from less information is surprising.
Another anomaly:
Earlier (before deleting every second .png), I set the fps - wrongly - to 10: ffmpeg -r 10 -i frame%06d.png -c:v libx264rgb -crf 0 -preset ultrafast all10.mp4 ffmpeg -i all.mp4 -c:v libx264 -pix_fmt yuv420p -crf 27 -preset veryslow allcompressed10.mp4
I thought that allcompressed10.mp4 and allcompressed.mp4 should be of about the same size because they contain the same number of frames. However, the latter is 296 741 kB, while the former is 758 740 kB (now mistake, it is 2.5 times larger)
How is this possible?