Answers.Body: <p>The best I could find was adding the <code>-r 1</code> parameter, to indicate a lower frame rate. This helped quite a bit, though the output file size is still larger than I'd have expected it to be.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-08-25T13:19:21.017Z
Answers.LastActivityDate: 2022-08-25T13:19:21.017Z
Answers.UserDisplayName: user976850
Body: <p>I have a 329MB MP3 file and a 200K JPEG image, which I'd like to combine into an MP4 file which simply plays the MP3 with the image in the background.</p>
  <p>The way I go about it today is by using FFMPEG with the following command:</p>
  <p><code>ffmpeg -loop 1 -i &quot;$image&quot; -i &quot;$audio&quot; -c:a copy -c:v libx264 -shortest output.mp4</code></p>
  <p>This, however, generates a 818MB MP4 file - Taking a long time to encode, network bandwidth to upload later on, etc.</p>
  <p>What's a more efficient way of creating the file, so the output is also of a smaller size? Surely there must be a way to get a video file which doesn't need to inflate the overall size by that much?</p>
  
Tags: <ffmpeg>
Title: How to efficiently create a video from an mp3 and a single jpeg using ffmpeg?
UserDisplayName: user976850
ThreadText: # How to efficiently create a video from an mp3 and a single jpeg using ffmpeg?
  
  (Asked by: username_0 on 2022-08-24)
  
  I have a 329MB MP3 file and a 200K JPEG image, which I'd like to combine into an MP4 file which simply plays the MP3 with the image in the background.
  
  The way I go about it today is by using FFMPEG with the following command:
  
  `ffmpeg -loop 1 -i "$image" -i "$audio" -c:a copy -c:v libx264 -shortest output.mp4`
  
  This, however, generates a 818MB MP4 file - Taking a long time to encode, network bandwidth to upload later on, etc.
  
  What's a more efficient way of creating the file, so the output is also of a smaller size? Surely there must be a way to get a video file which doesn't need to inflate the overall size by that much?
  
  **Tags:** ffmpeg
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2022-08-25. Score: 0
  
  The best I could find was adding the `-r 1` parameter, to indicate a lower frame rate. This helped quite a bit, though the output file size is still larger than I'd have expected it to be.
  
  
  ---
  
  