Page 2 of 8: Frames Basics and x264 Profiles

Frames Basics:

Modern compressed video are made up of 3 different types of frames. Intra (I) frames (also known as key frames), Predictive (P) and Bidirectional (B) frames. Certain types of frames can be referenced, which means a frame sometimes only need to stores the difference between it-self and the referenced frame. The problem with referencing is that any error that occurs when frame Y references frame X will be carried over and propagated if frame Y is it-self referenced later on. This is why there are also frames which can't be referenced.

The I frame stores the entire image and so are the least compressible. Video seeking (when you skip to a part of a video) requires I-frames, as otherwise a symptom called seeking lag will occur when the video is blank until the next I-frame is encountered.

P-frames store the difference (called "referencing") between itself and an I-frame or other P-frames. This means P-frames can be referenced, so it needs to store enough information for this to happen, but not as much I-frames because of it's encoding technique (motion compensation).

B frames also store the differences between itself and other frames as well (uses both previous and future frames for reference), but it can't be referenced ("B-frame pyramid" excepted), so they are the most compressible (holds least amount of information). 264 supports "B-frame pyramids", which allow B-frames to be referenced for other consecutive B-frames, but otherwise B-frames can't be referenced by any other frame, so less information is stored.

So basically, a compressed video will be a combination of I, P and B frames, some referencing others. The successful combination of these frames and the referencing determines how well the video is compressed.

x264 Profiles:

Profiles are the easiest way to configure x264. Profiles are basically pre-configured x264 settings that have been saved and can be loaded time and time again to encode files. They save you time by not requiring you to re-set all the options whenever you use x264, and most importantly, they give new users a chance to experience x264 without understanding what the options are.

Sharktooth from the Doom9 forums has produced several profiles for everyday usage, and has made it available for download. You should read the official forum thread for details of what each profile is intended for, although the profiles "PD-PSP", "PD-Xbox_Hires", "PD-Xbox_LoRes" and "PD-iPod" should come in handy for encoding a PSP/Xbox/iPod compatible video. There are even profiles specifically designed for Anime/cartoons

The other piece of good news is that software like MeGUI allow you to import profiles, and StaxRip has these profiles built into the software it self (and also allow you to edit and create your own profiles).

But what if you are curious and you want to find out just what options are being selected in a profile? It's actually very easy to view profiles, because they are actually just XML files. Clicking on the XML file should open them in Internet Explorer, and you should see a screen similar to the one below:

Profiles

What the above shows is that for this particular profile, NbBframes to 3, KeyframeInterval to 250, trellis to false and so on. On the x264 command line, the three options I've mentioned would translates to the following:

x264.exe --bframes 3 --keyint 250 --trellis 0

 

 


  1   2   3   4   5   6   7   8   Next Page