Tuesday, 17 December 2013

Encoding YouTube Videos at the Highest Quality

Encoding YouTube Videos at the Highest Quality

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.

Cell phone text message showing YouTube account verification code.
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

YouTube player quality settings showing various available resolutions.
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.

10 Video Editing Habits to Give Up

10 Video Editing Habits to Give Up

It's easy to get into a routine when video editing and as a result form some habits, and not necessarily good ones. Video editing is an art form with rules, or more realistically guidelines, that help define the difference between what's good and what's bad. Even though what is considered good or bad for video editing is subjective and somewhat arbitrary, there are some basic principles that can be followed to help make a video successful. When bad habits break the rules there's trouble to be found. Here are 10 video editing habits to give up as the New Year rolls around.

1. Winging It

A lot of creative people like to wing it, take things serendipitously and let a project unfold as they work on it. This is a habit that's easy to fall into as a video editor, footage shows up and the editor sorts it out as they go. The danger lies in the fact that a project may consume more time than necessary when a video editor is winging it, and they run the risk of missing the point. Instead of shooting from the hip, be prepared and make a plan. Learning to have a few contingency plans that can apply to multiple projects will a make a video editor more productive and help them to stay on task.

2. Scaling It Up

The excitement of a new project is exhilarating and it's easy to jump right into the mayhem of video editing. This is the problematic habit of starting before the project's ready. To avoid it, know what the goal of the project is and most importantly, know the deliverables. Ask, "How is this project going to be delivered? How long should it be? At what resolution and format does it need to be?" A project that runs too long and is in the wrong format presents a world of problems that are avoidable with some simple knowledge up front.

3. Keeping in a Cluttered Workspace

It's no lie, video editing can be messy. It's also a bad habit. That doesn't mean a video editor has to like it or live there. A video editor who keeps their workspace, virtual space, and their projects well organized will be more proficient.

4. Overusing Transitions

Transitions are a fundamental element of video editing and every video editor has their favorite go to method of moving from one shot to another. It's easy to get into a groove, use editing defaults, and transition the same way between different shots. A video editor should consciously break the habit of default transitions and use what the project calls for, not what they're comfortable with.

5. Using Jump Cuts

Speaking of transitions, jump cuts still abound in the world. Sometimes a video editor gets complacent with the lack of footage that they have in their edit bay or there is the habit of being lazy, just doing enough to get the job done. Be prepared and ready, always think of interesting ways to cover jump cuts. Use b-roll or an interesting transitional device, such as a custom graphic, to avoid the jump cut.

6. Ignoring Audio

Audio is one half of video and it doesn't always get the attention it deserves. Mixing audio as a rote technical process is a bad habit that kills a lot of good videos. A good audio mix is a skillfully crafted element of video editing. A video editor should at the least make sure that there are no audio cutoffs, that audio levels remain appropriately consistent, and that any music bed used enhances the edit.

7. Underutilizing Graphics

Graphics are now an integral part of a video editor's arsenal. This adds one more hat to the video editor's ever growing list of roles, that of graphic designer. Not every video editor is a graphic designer and that's okay. The danger is that an editor picks up the habit of using the same graphics and graphic techniques over and over again. When the habitual graphic gets used one too many times or grows old, past its stylistic lifespan, the video editor walks into trouble. The best way to avoid this habit is to be a perpetual learner and always try to come up with something new and fresh.

8. Abusing Effects

Just like graphics, effects are used regularly in the edit bay. A well crafted effect adds a certain amount of flair, flourish, and polish to a production. Effects can also be habit forming and used gratuitously, becoming ineffective. Don't use effects for effects sake, use them sparingly to make a point or subtle exclamation.

9. Stealing Ideas

The great thing about the internet is that it's easy to learn just about anything, including video editing techniques. A bad side to the internet is that everybody is learning the same thing, including video editing techniques. Self-improvement is a good habit to have but straight out imitating others is not such a great habit. A video editor should be mindful of what they learn when watching tutorials. A carbon copy effect or graphic from an online tutorial can be spotted a mile away. Personal growth is accomplished by incorporating a technique learned from a tutorial and taking ownership of the finished result, while making it wholely unique.

10. Attempting to use Every Shot

A video editor's job is to edit, to reduce, repurpose, rearrange, and craft elements into a cohesive message. A bad habit that many young editors form is they like to paint the world. They want to use everything they're given. If there's a good shot, they make sure to include it in the final edit, even if it doesn't fit with the overall message or takes away from the finished piece. This is where good videos go on to become extended pieces, with montages of unnecessary footage. Break the habit of painting the world by only using what's needed, be selective and don't feel the need to use something just because it looks good.

Chris "Ace" Gates is a four time Emmy Award winning freelance writer and video producer.