I'm trying to use Ubuntu Linux 19.04 to convert an OpenShot video into a more efficient file-size.

The video only contains two still images, and 20 minutes of audio, but for each file-type I save-as, the output-file is larger than 600MB.

Apparently I'm choosing the wrong lossless output file-type; you'd think a video like this would only be 10MB, since almost all the frames, in the entire video, are one of two frames.

Using ffmpeg, how can I convert this video to a format that understands how to compress all the duplicate frames efficiently?


Your question is answered in the ffmpeg examples. You can use something like this:

ffmpeg -loop 1 -framerate 1 -i banner.png -i audio.wav -map 0 -map 1 -c:v libx264 -crf 16 -c:a aac -b:a 92k -shortest -movflags +faststart ready_to_upload.mp4

Detailed explanation:

  • -loop 1 repeat image potentially forever
  • -framerate 1 have a low frame-rate
  • -i banner.png -i audio.wav input image and audio
  • -map 0 -map 1 use both stream
  • -c:v libx264 -crf 16 have high-quality image
  • -c:a libfdk_aac -b:a 92k have high-quality
  • -shortest stop repeating banner image when audio is finished
  • -movflags +faststart include index at beginning of MP4 container for early start

It compresses to approximately 1 MB per minute.

Note: YouTube is likely (but not guaranteed) to re-encode your video. Image quality will degrade.

  • Sorry, my mistake, there are actually two images in the video. The image changes near the end. – Lonniebiz Aug 10 '19 at 23:10
  • 1
    Same thing, do two videos, one for each image, and concatenate them... – xenoid Aug 10 '19 at 23:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.