May 6th, 2013 / By Angelo Lorenzo / 5 Comments

H.264 is the de-facto standard for file based video delivery, a fact we all know and live with. Premiere Pro tries its best to hide some of the more advanced aspects of it’s two h.264 encoding methods but there comes a point where sometimes we need to dig a bit deeper. I remember editing a commercial about 2 years ago where I was given a deliver spec with very specific needs about GOP size, B frame count, and so on. While Premiere allows you to edit keyframe distance (GOP size), it doesn’t let you control the amount of B frames directly. I compressed that video with FFMPEG/x.264 and I’ve been using it ever since for fine control.

I have to give a special thanks to Creative Cow contributor Ivan Myles for bringing up this conversation and digging in to find some of the information I’m about to present.

Before we dive into things, if you aren’t familiar with h.264 or know what GOP, M and N values, P frames, or B frames are, then I suggest the following resources:

A Guide to Common Video Formats: Containers, Compression, and Codecs

http://en.wikipedia.org/wiki/H.264

http://en.wikipedia.org/wiki/Group_of_pictures

First we have Premiere’s h.264 codec in the MP4 container. It’s no big secret that this is MainConcept’s h.264 codec with more streamlined controls. You’ll notice that the M value and number of B frames is almost solely dependent on the selected h.264 profile. Level, to a point is selected based on framerate, frame size, etc. and seems to have no bearing on controlling the number of B frames. It also appears that the multiplexing controls restrict the use of B frames for Apple devices while also changing the ID of the MP4 container for compatibility with certain device families.

Adobe Premiere Pro h.264 MP4 Container Options Container ID Profile M Size B frames GOP Example Standard MP42 Baseline 1 0 IP… Standard MP42 Main 4 3 IBBBP… Standard MP42 High 3 2 IBBP… iPod M4V Baseline 1 0 IP… iPod M4V Main 1 0 IP… iPod M4V High 1 0 IP… PSP MSNV Baseline 1 0 IP… PSP MSNV Main 4 3 IBBBP… PSP MSNV High 3 2 IBBP…

We also have Quicktime’s native h.264 codec. This codec is limited to the Main profile and Premiere Pro limits Quicktime to single-pass operation. Checking the option for frame reordering will turn on the use of B frames.

Adobe Premiere Pro h.264 MOV Container Options Profile M Size B frames GOP Example Standard Main 1 0 IP… Frame Reordering Main 2 1 IBP…

The use of the MainConcepts codec is superior and MOV and MP4 can be used interchangeably in many workflows. MP4, as a container, is based off Quicktime so a quick renaming of file extensions often allows the use of MP4 files in programs that only accept MOV. If you’re using more advanced features of either container, it may be worth a true rewrap using FFMPEG or FFMBC after encoding. This page goes over some of the fundamental differences between the two containers.