How to Combine an Image and Audio File to Video File

Motivation:

  • You have a JPG and WAV file. You want to combine them to a FLV file in order to upload it to YouTube without losing audio quality.
  • You have a JPG and MP3 file. You want to combine them to a MP4 file in order to upload it to YouTube.

Combining JPG and WAV to FLV:

  1. Download ffmpeg.
  2. Unzip the downloaded package to C:\Users\admin\Downloads\ffmpeg-7.0.1-essentials_build folder.
  3. Copy your image.jpg and audio.wav file to C:\Users\admin\Downloads\ffmpeg-7.0.1-essentials_build/bin folder.
  4. Open Command Prompt.
  5. Execute the commands below.
    cd C:\Users\admin\Downloads\ffmpeg-7.0.1-essentials_build\bin
    ffmpeg -r 1 -loop 1 -i image.jpg -i audio.wav -acodec copy -r 1 -shortest -vf scale=1280:720 output.flv
  6. Open output.flv file to verify result.
  7. Upload ouput.flv file to YouTube.

Combining JPG and MP3 to MP4:

  1. Download ffmpeg.
  2. Unzip the downloaded package to C:\Users\admin\Downloads\ffmpeg-7.0.1-essentials_build folder.
  3. Copy your image.jpg and audio.mp3 file to C:\Users\admin\Downloads\ffmpeg-7.0.1-essentials_build/bin folder.
  4. Open Command Prompt.
  5. Execute the commands below.
    ffmpeg -loop 1 -framerate 1 -i image.jpg -i audio.mp3 -map 0 -map 1:a -c:v libx264 -preset ultrafast -tune stillimage -vf fps=10,format=yuv420p -c:a copy -shortest output.mp4
  6. Open output.mp4 file to verify result.
  7. Upload output.mp4 file to YouTube.

 

 

 

(Visited 13 times, 1 visits today)

Leave a Reply