I have a long video with only a few still images and occasional transitions. Is there a format or encoding option that saves space on the repeated frames without dropping the whole video to a low frame rate?
Can I make a slideshow video smaller without making transitions choppy?
Answers
Try a regular H.264 or H.265 encode first. Both can compress repeated frames efficiently, so you don't necessarily need to lower the frame rate. The transitions can keep their original timing and smoothness.
How small it gets depends on the encoder settings and the audio. If you want to preserve the audio quality, copy the audio stream rather than re-encoding it, provided it's compatible with your output container.
Reply to this answer
FFmpeg has an mpdecimate filter that can remove duplicate or near-duplicate frames, then preserve the timing with variable frame rate output. For example:
ffmpeg -i input.mp4 -vf mpdecimate -fps_mode vfr -c:v libx265 -crf 20 -c:a copy output.mp4
Check the result, especially the transitions. The filter can remove frames that are similar but not identical, and its thresholds can be adjusted if it removes too much. Variable frame rate playback support also varies, so test it on the device you plan to use.
Reply to this answer
If the transitions don't matter much, lowering the frame rate is the simpler option. It'll affect the whole video though, so fades and other movement may look noticeably choppy. That might be fine for an audio-focused file, but less useful for other projects.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions