With one billion viewers every month, YouTube is a distribution channel you don't want to miss out on. From codecs to bit rates, this in-depth look at the best way to encode your videos for YouTube can help you become a YouTube encoding expert.
Your video production is finally ready for the world to see. You've spent hours fine-tuning your edits, dialing in your color grade, and mixing your sound track. When you upload your video to YouTube, you want it looking its best. But what compression settings should you use? Which file format should you export your video to, and what bit rate will give you the highest video quality while still playing back smoothly online?To answer these questions, it helps to know how YouTube processes your video once it’s been uploaded to its video servers. When you know what's going on behind the scenes, you'll understand the best settings to use, and why you should use them.
Inside YouTube
When you upload your video to YouTube, its video servers kick into action and start transcoding your file into a set of optimized video streams. This allows your video to playback smoothly on everything from mobile phones to desktop computers. The individual video streams range in resolution and video quality from tiny postage stamp sized videos all the way up to 1080p, and even 4k.The important thing to remember is that anything you upload to YouTube will be transcoded. So you don't want to upload a highly compressed, low bit rate video. It's just going to get compressed again. Instead, you always want to upload a high quality video to YouTube.
Codecs in Use at YouTube
So what video format does YouTube transcode your video to? Maybe you can match its settings and keep it in the same format so your video doesn’t need to be transcoded. Well, it's a good idea, but it doesn't exactly work that way. For starters, YouTube uses more than just one codec, and each codec is encoded to multiple resolutions and bit rates.H.264 is the codec used by most of YouTube’s video streams right now, but there are also other codecs in use such as VP8. Some codecs are still in use for compatibility with older cellphones, and newer codecs are in development such as VP9, which promises to deliver even higher video quality than H.264. (See the sidebar for details.)
Video Formats Accepted by YouTube
You can upload just about any kind of video to YouTube, from the video you just shot with your mobile phone, to your latest HD video production. YouTube's list of supported video formats includes MOV, MP4, AVI, WMV and many others. You may be surprised to find out that YouTube will even accept high quality video formats like ProRes, DNxHD and uncompressed 10-bit HD video.Now just because you can upload uncompressed HD doesn't mean you should. For one thing, it will take a lot longer to upload your file. But even if time isn't an issue, there are a few conversion details you have to watch out for. If you've got an interlaced HDV timeline, for example, you don't want to just export a movie and upload it. First you need to deinterlace the video, scale it to the right resolution, and decide how much time you want to spend uploading it.
Quality Versus Upload Time
If video quality is your number one priority, then by all means, upload ProRes, DNxHD or uncompressed HD video files. You'll get fewer video compression artifacts on YouTube when you upload high quality video formats, as opposed to low bit rate files. So if you've got the time, upload the best video you've got. At some point though, the visual difference between a ProRes file and an uncompressed file is indiscernible, the only real difference being file size. So don’t spend more time uploading than you have to.Whatever you upload to YouTube is locked in. You can’t change out the file to increase its video quality later on, without also losing your viewer count information.
If time is of the essence, an H.264 video with the MP4 file format is the way to go. This is YouTube's recommendation. Keep in mind however, that whatever you upload to YouTube is locked in. You can't change out the file to increase its video quality later on, without also losing your viewer count information, along with any links to your movie. The best you can do is remove your video entirely and upload a new one.If YouTube starts using a new codec like VP9, they'll transcode your video using your original upload. If you uploaded an H.264, that's as good as it's going to get. But, before you go running off to upload all of your uncompressed HD 1080p files, there are a few things you'll want to keep in mind.
File Size and Duration
You'll need to keep an eye on the file size and length of your video. With a standard account, the video you're uploading to YouTube can't be any more than 15 minutes in duration. So if your video is longer than that, you'll have to get your status verified, or split your video into shorter pieces.Verifying your account status is fairly straightforward. You'll need to enter your mobile phone number, and as long as your account is in good standing you'll be sent an activation code that will allow you to upload longer videos. Once you've verified your account you'll need one of the very latest Web browsers if you're going to upload anything that's more than 20GB in size.
Getting the Format Right
Anytime your video doesn't match the video stream YouTube is trying to encode, YouTube will have to do a format conversion. The simplest example is resolution. YouTube starts with your HD video and then scales it down to each of the smaller resolutions it will be streaming.If your editing format is already progressive, with one of the recommended square pixel resolutions, then you can just export your timeline and start uploading your file immediately. For example if you're exporting a progressive ProRes 1080P timeline, then you're good to go. If your editing format doesn't match, for example, if your timeline is interlaced or it's using a non-square pixel aspect ratio like DV, then you'll have to do a format conversion by exporting a new video file.Resolution and Pixel Aspect Ratio
You want all of your videos to have a square pixel aspect ratio when you're uploading them to YouTube. For SD 4:3 video, use a resolution of 640x480. For SD 16:9 widescreen video use 854x480, and for HD video use either 1280x720 or 1920x1080.Deinterlacing
The video you upload to YouTube should be progressive. If your timeline is interlaced, be sure to deinterlace the video when exporting. For example, selecting motion compensated deinterlacing in Apple’s Compressor will result in significantly longer render times, but can produce far better results.Bit Rate
YouTube doesn't set a bit rate limit for H.264. They recommend 8,000 Kbps for 1080P video, or 50,000 Kbps if you have a really good upload connection and don’t mind waiting. You can get fairly high quality video using H.264 at the higher bit rates, but the file size will increase and at some point you’ll do just as well to upload a ProRes video.Codec
To reiterate, you want to use the highest quality codec you can. If your timeline is ProRes, but it's interlaced, you don't have to export an H.264. Instead, you can deinterlace to a ProRes file on export, and maintain your image quality. The only reason to export an H.264 is to make the upload and processing speeds faster. But remember, once your file is uploaded, it's locked in and you can't change it. It may be worth a few more hours of upload time if your video is going to remain online for years to come.Tools of the Trade
Both Adobe Media Encoder and Compressor, as well as Sorenson Squeeze, Handbrake, MPEG Streamclip and ffmpeg are all capable of encoding H.264 files. Most encoding software comes with a YouTube preset that serves as a good starting point. But remember that YouTube doesn't specify an upper limit for the H.264 bit rate, so you can raise the quality in exchange for upload time.Some of the more advanced features to look for if you're trying to get a high quality encode at a low data rate, are noise reduction, multiple passes and banding reduction. Noise reduction plays an especially large role when trying to maximize low bit rate video.
The Bottom Line
When exporting your videos for YouTube, use high quality video formats. It will take longer to upload, but your videos will continue to be at the highest possible quality for years to come. If speed is of the essence, then export an H.264 MP4 using the YouTube preset in your compression software. You now have all the tools you need to create great looking video on YouTube, use them wisely.Sidebar
The Future of YouTube
Currently, YouTube's main video player is built on Adobe Flash, but the future is HTML5. There's an opt-in HTML5 website that you can check out right now, that can stream video without a plugin on supported browsers like Chrome.There's still a lot that the Flash Player can do that HTML5 can't, especially with regard to securely streaming copy-protected video, so Flash isn’t going away any time soon. But the new VP9 codec is making significant progress and should be nearing completion soon. VP9 is targeted to be the new codec for use at YouTube, with visual quality exceeding H.264 at the same bit rate. The future is changing quickly but if you’ve uploaded high quality videos to YouTube, you’ll be ready.
Paul Morris is an award winning video editor with 20 years experience in the industry.
No comments:
Post a Comment