Social Links
  • Real World Video Compression
    Real World Video Compression
    by Andy Beach
Powered by Squarespace
« Harmonic buys Omneon | Main | Hello Squarespace »
Friday
May072010

Using x264 Plugin in Compressor

admit it, I've had a love hate relationship with Compressor pretty much since Day One.  I love the convenience of having an app tied directly to the timeline for encoding, but have always felt a little disappointed by the options and quality of what was offered for encoding that it offered.  Still, I've stuck with it for certain encoding events (such as for dvd content, rough cuts, and archives at high bit rates).  It's not that I believe its a bad application, just one that has languished in the shadow of many other priorities.  With some much going on in the broad range of tools Final Cut Studio that offers, its bound to happen that some applications don't get the priority we wish they did. 

 

Not all H.264 is created equal

So what won't I use it for and why?  At this point, I wouldnt really consider using it for finished content im distributing to the public directly as H.264 (be it web, mobile, or other) why? The reason? At this point Apple's version of H.264, one of the first to market, has become quite long in the tooth and has been surpassed by a number of competitors who have worked aggressively to improve the quality of their codec or expose new advanced toolsets that allow the optimal tuning of compression settings.  If you have been in the encoding world for awhile now, you probably know there are several different vendors who offer versions of H.264.  Main Concept is considered one of the most popular out there (which is licensed for and used by a variety of encoding software companies, including my old employers, Inlet Technologies ) and Ateme is a popular high end h.264 codec considered one of the high quality options available.  All these codecs come with fairly hefty price tags, which is why you only see them in professional encoding tools.  That doesnt mean there aren't other options out there for those seeking high quality alternatives.  x264 , for example is an open source (and there for free) option available under the GNU General Public License.  x264 gets used in a variety of ways - some have developed simple user interfaces that allow you to enable x.264 within other tools, some lower end or free applications have used it as the encode engine for there own applications.  Its the former we're looking at today and that has me using Compressor more than ever.  A japanese developer named MyCometG3  is publishing a fairly advanced x264 QuickTime plugin.  Once installed, this allows you to take advantage of the QT plug in architecture, and therefor any application that uses it.

Getting Started

In order to take advantage x264, let's start by installing the plug in.  Download the Disc Image and launch it.  Copy  the file x264encoder.component to YourComputer>Library>QuickTime and restart any open applications that use QuickTime.  

Creating a New Setting

Now launch Compressor.  Click the plus symbol in the settings window and choose QuickTime Movie.  This will create a new blank setting that uses the QuickTime as the export settings option.  

Click on the video tab in the Inspector panel and choose x264 from the codec drop down menu.  
Click the options menu to access the advanced x264 settings.  From here you can now turn on and off a variety of options that will effect the quality of the finished file, the length of time it takes to encode you content, plus the compatibility of the file.  Feel free to experiment with settings you and definitely try out the presets provided, but here are settings i've been experimenting with for 720p content I plan on uploading to YouTube and for the iPhone.

720p for YouTube

After applying the settings in the photos above, click ok.  
Now back in the QuickTime Panel, set the frames and datarate to auto.  If Frame Reordering is off, click it to turn it on.  Adjust the Quality slider to High and click Best Quality (Multiple Passes).  Now click OK.  Click the audio tab and make sure it is set to the khz you most often work with (in my case 48 khz) and set the kbps to 160.  
Choose the geometry button in the inspector panel and select 1280x720.  Finally, name the setting something memorable, then click save.

iPhone

Start by applying the settings in the photos above, click ok.  Set the frames to auto and the datarate to 1500 kbps.  If Frame Reordering is on, click it to turn it off.  Adjust the Quality slider to High and click Best Quality (Multiple Passes).  Now click OK.  Click the audio tab and make sure it is set to the khz you most often work with (in my case 48 khz) and set the kbps to 96.  Choose the geometry button in the inspector panel and select 480x270 (if your content is 4x3 choose 480x320).  Finally, name the setting something memorable, then click save.  

Using Settings

Now you can use your special x264 settings in the same way you use others in Compressor.  Drag content into the batch window (or export a sequence from Final Cut Pro) then drag the settings into the batch window.  Select a unique destination or file name, then submit the job to the encode queue.

Results

I've done some examples, but honestly since i've just switched Blog engines, i'm not 100% sure how to post movies without using vimeo or youtube or something (which obviously would transcode and negate a quality test).  Fear not, i'll post the results in a follow up soon.  In the meantime, go get x264 and get experimenting!  

EmailEmail Article to Friend

Reader Comments (23)

Hello, thanks for your info. I went to the website and nowhere there is a link a a disk image, only wiki link and link for code source. Could you please provide a link. Regards.

May 8, 2010 | Unregistered CommenterMartial

x264, when used with QuickTime 10.0, crashes when you click on the options menu within Compressor. Any updates to this problem?

May 11, 2010 | Unregistered CommenterBlake

To get started you said to copy the file x264encoder.component to YourComputer>Library>QuickTime. I downloaded the x264 encoder and installed it and I can see the .dmg and .pkg icons, but I can't find the .component file. Where would that default to going?

May 11, 2010 | Unregistered CommenterMark Worden

Does not work with QT 10.0. Compressor crashes. Is this your experience?

May 14, 2010 | Unregistered CommenterBlake

Very interesting article!

I would like to use this x264 encoder for a video I've recorded in HD720p/60. The output is to be played with an ASUS O'Play HD media player.

I've looked at the libvacodec settings and in being honest I have to say that I am lost. I really do not know where to start and what to look for.

The length of the video is 2 hrs 5 minutes. I've already created a file in H.264 format with Compressor and I am not pleased with the outcome. The file I've produced when being played is not fluid. It jumps every x seconds, the audio is also terrible.

In this article it show the parameters for Youtube and iPhone is there libvacodec parameters available for a straight video file? Where could I find it?

Regards!
Daniel

May 15, 2010 | Unregistered CommenterDaniel Paquin

Blake, QT 10 uses a different library, this is designed to work with QT7 and the apps that uses its codec plugin library (such as Compressor). When I use it with those apps, I have no issues at all. There was an issue eith a release in march that had some erors, so I suggest making sure you have the newest build for testing.

May 18, 2010 | Registered CommenterAndy Beach

Hi Daniel, I'm not 100% sure what you are asking, but contact me through the websites contact form and re-ask the question and i'll see what I can do.

May 18, 2010 | Registered CommenterAndy Beach

Andy, Thanks! Don't know why the plug-in was crashing inside of Compressor before. I downloaded the same version again and now it works within Compressor.

May 19, 2010 | Unregistered CommenterBlake

Inspiring! - You are blowing my mind. I am going to start following the X264 instructions. No more comment until I get it to work. I saw your interview with Scobel. Looking forward to learning more.

Thanks

June 8, 2010 | Unregistered Commenterdaddychico

Hey there,
I just came across this website because I was watching MacBreak. Very interesting website already in my Reader. Thanks for doing this project!

However I see this posting is missing some pictures. Can you take a look at them, please?

Andreas

December 2, 2010 | Unregistered CommenterZettt

I have no idea how to download, where to download the DMG or plugin. Maybe you can decrypt this and help out a bit?

December 9, 2010 | Unregistered CommenterJoel Godin

Thanks for the tips!

I did notice that the current version of MyCometG3's x264 differs from your screen shots:

(2010/12/08) x264Encoder 1.2.19

The differences are few but I imagine they were made for a reason. Could you please refresh your screenshots when you have the chance?

Thanks!

December 15, 2010 | Unregistered CommenterChris Salazar

Hi Joel - apologies, the link you need is here: http://www003.upp.so-net.ne.jp/mycometg3/

December 15, 2010 | Registered CommenterAndy Beach

Chris - I'll publish an entirely updated post with a video walkthrough of the new plugin in the next 3-4 weeks.

December 15, 2010 | Registered CommenterAndy Beach

I was shocked at how good your 'youtube' config looks, but I'd like to use that file as an html5 embed instead of uploading it to another service, and there doesn't seem to be any fast loading turned on in that preset. What should I adjust to get similar quality but not have to wait for the entire file to load to get it to start playing in a browser?

December 22, 2010 | Unregistered CommenterWiley Wiggins

Hello, hope all is well

I have tried several times to export, and each time with the x.264 encoder I get dark grey blatches all over my screencast next to and among the images. I didn't use Screenflow to record my screen, only images with transitions the whole way through, except the audio from my mic. Is this the problem? I have also reinstalled the plugin, and no luck. If there are any other settings you recommend, I would appreciate a reply, thank you.

Best Regards,
Oliver

December 26, 2010 | Unregistered CommenterOliver

I've been able to compress few files with compressor and x264 codec... Now it say that the submitted job Failed because "codec not installed"
Anybody got this issue?

January 25, 2011 | Unregistered CommenterBen

No, I just compressed something yesterday with it fine.
Did you check to see if it is in the right place? and still there?

January 25, 2011 | Unregistered CommenterJoel Godin

I tried your x264 settings, but compressor takes a long time. I noticed only 1 core of my quad-core cpu is used. When I tried apple tv's h.264 setting, all 4 cores worked. Do i need to change some setting? By the way, I'm using x264Encoder 1.2.20.

February 2, 2011 | Unregistered CommenterJohn W.

Hi John -

Quite right - my setting is designed to only use one core for encoding for maximum quality. dividing the image up over the multiple cores can cause some quality degradation. If you want to enable multiple cores, change the worker threads drop down from single to auto and it will use all the cores available on your machine to encode.

hope this helps,

andy

February 2, 2011 | Registered CommenterAndy Beach

Thank you.
I've been enjoying using x264 for youtube and qt movies. Thank you for translating all the technical details for us who don't speak that language. I am now curious about using x264 for Blu-Ray encoding. Is there anywhere you know of that a simpleton like me can find a breakdown of the x264 settings for creating professional Blu-Ray compliant files? I realize these files would still need to be authored but using x264 to encode the streams would be a nice step in the right direction.
Thanks Again.

March 26, 2011 | Unregistered CommenterShiloh

Hi, I came across the info for this codec in your piece on MacBreak studio. thanks for the info!
Although the settings are a bit confusing to me, I've gone through and made an impressive size reduction for not a huge loss of quality.
Thank you so much for your tutorial on this!

The one problem I'm having, though, is that after export, the file will not properly play in QT. It will hang after about 3 seconds.
Funny thing is, if I use preview (spacebar on mac) to view the file, it plays fine all the way through. Also, uploading it to youtube yields a decent video file.
So it seems the file is fine, but QT has a problem with this. Is this a known issue? Or a setting I am unfamiliar with?

Thanks again for this info!

April 20, 2011 | Unregistered CommenterJason A

Hi! Thank you for this information. I am a video artist and your book, and now this blog which I just discovered, have been a lifesaver for me.

I don't have too much problem with the quality of H.264 encoding in QuickTime movies, but I am looking for a more universal file type, one that could be read on Android tablets for instance. I wonder if you would consider making a blog post on this? I have been struggling for days with Compressor and QuickTime's MP4 settings, without much success.

May 23, 2011 | Unregistered CommenterFlorence Artur

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>