Upload an MP4 file with H.264 video and AAC sound, at the same resolution and frame rate you filmed in. That's what YouTube itself recommends, and almost every phone, editor and converter can make it. YouTube re-encodes every upload anyway, so the aim isn't a small file: it's handing YouTube a clean, high-quality copy to work from.

The quick answer

Setting What to use
Container (file type) MP4, with "fast start" on (some apps call it "Web optimized")
Video codec H.264, progressive (not interlaced)
Resolution Whatever you filmed: 1080p and 4K are both fine
Frame rate The same as the original. Don't convert it
Video bitrate At least 8 Mbps for 1080p at 30 fps; more is fine
Audio AAC, stereo, 48 kHz, around 384 kbps

If your editor has a "YouTube" or "High quality 1080p" export preset, it will be close to this already.

What YouTube actually recommends

YouTube publishes its preferred settings on its recommended upload encoding settings page. In plain terms:

  • MP4, with the file's index (the "moov atom") at the start rather than the end. That's what "fast start" means.
  • H.264 video, High profile, progressive scan, 4:2:0 colour. The page also lists finer details such as two B-frames and a closed GOP; normal export presets take care of those, so you don't need to set them by hand.
  • AAC-LC audio at 48 kHz (Opus is also accepted). Stereo or 5.1.
  • Variable bitrate with no upper limit required.

The bitrates YouTube suggests for ordinary (SDR) video, in megabits per second:

Resolution 24, 25 or 30 fps 48, 50 or 60 fps
4K (2160p) 35 to 45 53 to 68
1440p 16 24
1080p 8 12
720p 5 7.5

Treat these as a floor, not a target. A file at a higher bitrate just takes longer to upload; one below it gives YouTube less detail to work with. Our guide to video bitrate explains how bitrate turns into file size.

Why YouTube re-encodes your video anyway

YouTube never streams the file you upload. It converts it into a ladder of versions, from 144p up to your upload's resolution, in several codecs (H.264, VP9 and AV1, depending on the viewer's device), so the player can switch quality as the viewer's connection changes.

That has three practical consequences:

  • Your upload is the master copy. Every blemish in it gets compressed a second time. Give YouTube more quality than you think viewers need.
  • Don't shrink the file before uploading. Each extra round of compression loses a little detail, and you gain nothing because YouTube compresses again. Upload the best export you have.
  • HD shows up last. Right after upload, a video may only play in low resolution. The 1080p and 4K versions appear when processing finishes, which can take a while for long or 4K videos. Waiting fixes it.

Codecs are compared in more depth in H.264 vs H.265 vs AV1.

You may not need to convert at all

YouTube's supported file formats include MOV, MP4, MPEG-1, MPEG-2, MPG, AVI, WMV, MPEG-PS, FLV, 3GPP, WebM, ProRes, DNxHR, CineForm and HEVC (H.265). So an iPhone's HEVC .MOV can go up exactly as it is, and that's often the best choice because it skips a round of compression.

Making an MP4 first still makes sense when:

  • You have several clips. YouTube takes one file per video, so they need joining first.
  • The file isn't on the list. MKV isn't, and OBS is often set to record MKV. Remux those recordings to MP4 in OBS with File › Remux Recordings, which changes the container without re-encoding.
  • The original is enormous. A ProRes or uncompressed export can be many times bigger than a high-bitrate H.264 file that looks the same after YouTube's processing.
  • It's interlaced. Camcorder 1080i footage should be deinterlaced before upload. YouTube's own example is turning 1080i60 into 1080p30.

Resolution and shape

The YouTube player on computers and TVs is 16:9, and the player adapts to vertical and square videos too. Upload in the resolution you filmed. Upscaling 1080p footage to 4K doesn't add detail.

Two shape rules to know:

  • Don't add black bars yourself. A 4:3 or vertical video should be uploaded in its own shape. The player adds bars where needed, and bars baked into the file look like a box inside a box on phones.
  • Vertical and square videos up to 3 minutes become Shorts. If that's not what you want, the video needs to be landscape. See YouTube Shorts format.

Frame rate: keep what you filmed

YouTube asks for the frame rate the video was recorded at. Common rates are 24, 25, 30, 48, 50 and 60 fps. Converting 30 fps to 60 just repeats frames, and converting 60 to 30 throws away the smoothness you filmed. If clips with different rates have to be joined, pick one rate for the finished video. Frame rates explained covers which rate suits what.

How to export a YouTube-ready MP4

iMovie on a Mac

  1. Choose File › Share › File.
  2. Set Resolution to the size you filmed (1080p or 4K).
  3. Set Quality to High, and Compress to Better Quality.
  4. Choose Next, name the file and save.

HandBrake (Mac, Windows, Linux)

  1. Open your video in HandBrake.
  2. From Presets, choose Web › Creator 1080p60 (or Creator 2160p60 4K for 4K footage). HandBrake describes these presets as made for uploading to sites like YouTube, with higher quality than its general ones.
  3. The "60" is a maximum: a 30 fps clip stays at 30.
  4. On the Summary tab, make sure the format is MP4 and Web Optimized is ticked.
  5. Choose where to save it, then Start (Start Encode on Windows).

FFmpeg

ffmpeg -i input.mov -c:v libx264 -preset slow -crf 18 -pix_fmt yuv420p -c:a aac -b:a 384k -ar 48000 -movflags +faststart youtube.mp4
  • -crf 18 is a high quality level (lower numbers mean higher quality and bigger files).
  • -pix_fmt yuv420p gives the 4:2:0 colour YouTube asks for, which matters if the source is 10-bit or ProRes.
  • -movflags +faststart puts the index at the front.

This command is for ordinary video. For HDR footage, such as an iPhone's HDR clips, upload the original file instead.

Joining several clips first

If your video is a handful of clips, join them before uploading. A full editor works, as does FFmpeg's concat feature. A browser tool like ClipMerge joins clips and photos in the order you drag them into one MP4, which in almost every browser is H.264 video with AAC sound: the format above. Its frame rate follows your first clip. The watermark is optional. ClipMerge Pro lifts the clip length limits.

Common problems

"Invalid file format." The file isn't one of the supported formats, or it's an editor's project file rather than an exported video. Export a video file from your editor, then upload that.

The video looks blurry straight after uploading. YouTube is still processing the HD versions. Check again later before re-uploading anything.

The upload is painfully slow. That's the cost of a high-quality file. Upload over a wired or fast Wi-Fi connection and leave it running. Shrinking the file below the bitrates above saves time but costs quality on every view.

You can't upload anything longer than 15 minutes. By default, YouTube limits uploads to 15 minutes until you verify your account. The overall limit is 256 GB or 12 hours, whichever is less, according to YouTube Help.