Back to guides

How to Add Music to a Photo for YouTube, TikTok & Instagram (Specs & FFmpeg)

Aspect ratios (16:9, 9:16, 1:1), audio codecs, and FFmpeg still-image MP4 commands for combining a JPG or PNG photo with MP3, WAV, or M4A audio.

Nov 29, 2026AI FFmpeg

Image formats like JPG and PNG cannot store a playable audio track. To share a song, beat, or voice clip alongside artwork on YouTube, TikTok, Instagram, or WhatsApp, combine the still image and soundtrack into an MP4 (H.264 + AAC) video.

You can do this locally with zero uploads using Add Music to Photo Online (when you have a JPG/PNG photo) or MP3 to MP4 Converter (when a cover image is optional).

Recommended Aspect Ratios by Platform

PlatformAspect RatioResolutionBest Audio Codec
YouTube Landscape16:91280×720 or 1920×1080AAC 128–192 kbps
TikTok / YouTube Shorts / Reels9:16720×1280AAC 128–192 kbps
Instagram Square / Album Art1:1720×720AAC 128–192 kbps

Exact FFmpeg Command (Still Image + Audio to MP4)

ffmpeg -loop 1 -framerate 1 -i photo.jpg -i music.mp3 \
  -vf "scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:(ow-iw)/2:(oh-ih)/2,setsar=1,format=yuv420p" \
  -c:v libx264 -preset veryfast -tune stillimage -crf 23 -c:a aac -b:a 192k \
  -shortest -movflags +faststart output.mp4

Why These Settings Matter

  • -framerate 1 & -tune stillimage: Keeps static-photo videos tiny and fast to encode even inside a browser tab.
  • format=yuv420p: Required so Safari, iPhones, WhatsApp, and older players decode the video without a black screen.
  • -movflags +faststart: Enables instant web playback without waiting for full download.

Want to Trim or Enhance the Music First?

Before building your MP4, you can trim a hook with Audio Cutter, make a track louder with Volume Booster, or create a dreamy edit with Slowed + Reverb.