Articles - > x264 Options Explained

Printer Friendly Version Printer Friendly Version

User Rating:
(4 votes)
Details / Vote Now

User Comments:
anon: This guide is really old especially...
More / Post Your Comments

Page Select:

  1   2   3   4   5   6   7   8   Next Page

Page 2 of 8: Frames Basics and x264 Profiles

Related Articles:
  1. H.264 Encoding using StaxRip
  2. Tips, Tricks, Hacks for PS3, Wii, and XBOX
  3. Xvid Setup Guide
  4. Xbox 360 H.264 Conversion Guide
  5. PS3 H.264 Conversion Guide
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

Article Navigation:

Page 1: Introduction + Basic x264 Usage
Page 2: Frames Basics and x264 Profiles <--
Page 3: x264 Options: Common
Page 4: x264 Options: B-Frames
Page 5: x264 Options: Frame Options
Page 6: x264 Options: Analysis
Page 7: x264 Options: Partitions
Page 8: x264 Options: Input/Output

User Rating:

  Average Rating: Your Rating:
Registered Users: (4 votes)
Non-Registered Users: (94 votes)

User Comments:

This guide is really old especially given the rapid development of x264 (eg. Psy-RDO/Psy-trellis). More comprehensive up-to-date guides can be found at http://mewiki.project357.com/wiki/X264_Settings http://avidemux.org/admWiki/index.php?title=H264
Posted by: anon, 10:54:48, Sep 22, 2008


I am using the open-source HandBrake to encode to H.264. One option I'm interested in is "Verbose Logging." But I've tried every command under the sun to get Verbose Logging and have been unsuccessful. I've tried "verbose=1," "v=1" "vb=1" and a bunch of others, but to no avail. Is there a command I'm missing to get Verbose Logging? Any help is appreciated. Also, the documentation on Trellis is scarce. I understand it decides the best way to dole out bitrate and can make the picture sharper. My question is, how (technically) does Trellis accomplish this? Thanx in advance for your help, mikedonahue@mac.com .
Posted by: defendr, 09:23:53, Feb 15, 2009



Comments: