If you’re encoding in QuickTime/Compressor, you gotta checkout x264

Home/Blogs/If you’re encoding in QuickTime/Compressor, you gotta checkout x264
By | 2017-02-23T00:48:20+00:00 March 3rd, 2010|Blogs|Comments Off on If you’re encoding in QuickTime/Compressor, you gotta checkout x264

So, I was doing some consulting work for a client who’s currently encoding with the x264 codec. Part of the work involved benchmarking their current quality against other encoding tools I have around the office, so I downloaded the x264 QuickTime Codec (Mac) from Softonic, which was the tool used by the client. Briefly, after installing the codec, you access it as another Compression Type in QuickTime or Compressor, and it comes with its own set of advanced encoding parameters. 

screen.jpg

Naturally, I started by comparing the output quality to Compressor and QuickTime using the native Apple codec and found a very signficant difference on hard to compress sequences in my test file. Here are some screens – click each one to view it in a separate browser window. The difference is most noticeable on the first, which combines high detail and high motion, but it’s apparent on the others as well.

skate.png

seminar.png

guitar.png

So, if you’re currently producing with the Apple codec and aren’t happy with the quality, give X264 a shot.

Just to save myself some time answering comments, let me tell you what I’m not saying.

– I’m not saying this is the best (or most current) x264 encoder or plug-in. If there’s a better one, let me know, especially if it works in QuickTime. 

– I’m not saying the parameters I showed in the screen are optimal. More random, the ones I was testing when I shot the screen.

Some time soon, I’m going to have to include x264 in a roundup with other encoding tools. After this preliminary exercise, it looks like it will be quite a dogfight. 

Comments

#1Ryan P.Said this on 03/04/2010 At 12:22 pm

Check out Versiontracker.com and search for "x264Encoder".

 

My big thing with any compression codec is it's compatibility with QuickTime Streaming Server. I have found little to no information online with best settings and using 3rd party codecs.

In my own testing, x264 Encoder works and plays back fine. But There may be issues with other client computers, who not having the codec installed, or using an older version of Quicktime Player, may be giving them playback issues. It's been a ongoing experiment to find a codec that looks better then Apple's version but still works with QTSS. 

 

I'm wondering that just like iPod & Apple TV devices, QTSS is only compatible with certain x264 settings. There are so many variables, it's hard to narrow down. 

#3JanSaid this on 03/04/2010 At 03:52 pmIn reply to #1

Hey Ryan:

Great point - before you can use any new codec, you have to push it through the entire workflow. I've not worked with QTSS, so I can't help you there.

THanks for the tip on version tracker.

#2Craig SeemanSaid this on 03/04/2010 At 02:25 pm

Jan and others, an x264 developer has been working to integrate x264 with various Telestream apps including Episode, Wirecast (still testing) and ScreenFlow. ScreenFlow, because it's primarily a screencapture program has very different compression challenges then typical "real world" video. 

The ScreenFlow user who did the testing came to very similar conclusions that you have including a couple of tweaks specific to screencaptures.

http://blogs.telestream.net/screenflow/2010/02/app...

#4JanSaid this on 03/04/2010 At 03:59 pmIn reply to #2

Wow, cool site. X264 certainly seems like a win for everyone but folks using the QuickTime Streaming Server, though you definitely have to test through your entire workflow.

Thanks for sharing.

Jan

#5Craig SeemanSaid this on 03/04/2010 At 04:10 pmIn reply to #4

Just for yucks I tried to use x264 through QuicktimeBroadcaster to JustinTV and while everything appears "normal" in QTB, only black for video on JustinTV. I kept going through tweak after tweak to no avail. Just to confirm I wasn't having any issues I tested with Apple H.264 and it worked as expected.

#6Jan OzerSaid this on 03/05/2010 At 08:49 amIn reply to #5

Sigh. Thanks for doing the work. Seems dropping a codec in isn't as easy as it looks.

Jan

#7MattSaid this on 03/07/2010 At 10:23 am

The Softonic link posted in the article offers version 1.1 which is from 2006. Version 1.2.2 is available from the developer's site: http://www003.upp.so-net.ne.jp/mycometg3/ or just do search at versiontracker or macupdate as mentioned above.

Jan, did you use version 1.1? I presume 1.2.2 would get even better results.

Thanks for the comparison.

#8JanSaid this on 03/08/2010 At 05:49 pmIn reply to #7

Gonna be doing some comps over the next couple of weeks - will make sure I have the latest update and will post if there's any difference (and will let you know if there isn't).

Thanks!

Jan

#9asdfSaid this on 03/09/2010 At 08:08 amIn reply to #8

There definitely should be an improvement. The x264 version you used was somewhere around r400. Meanwhile we are approaching r1500, which each increment representing a somewhat important code commit. A complete changelog can be found here: http://mirror01.x264.nl/x264/changelog.txt

Especially the last two years have been very exciting in x264 development with the addition of adaptive quantization for better background detail retention, psy optimizations for better visual quality at the expense of metrics, MB-Tree rate control which can give tremendous improvements by adjusting quantizer on macroblocks depending on how well they can be used for prediction, weighted p-frame prediction to improve fades, low-latency encoding for video conferencing and other improvements like various speed optimizations.

There is a development blog written by one of the developers where important changes are discussed and an outlook for future developments is given. The article about MB-Tree is pretty interesting: http://x264dev.multimedia.cx/?p=98#more-98

#10JanSaid this on 03/09/2010 At 08:38 amIn reply to #9

Good feedback, I'll check it out in the next few weeks.

Thanks!

Jan

#11MattSaid this on 03/14/2010 At 12:35 pm

Just an update regarding the different versions I mentioned before: It turns out there are actually two x264 QuickTime plugins. BerliOS is the one I believed Jan used and the latest version is 1.1 released in 2006. You can find it here:

http://developer.berlios.de/projects/x264qtcodec/

The other one I found is from a Japanese developer with the latest release coming out just this month. It has a lot more options, many of which I don't know how to use yet. So far I'm getting similar results with both plugins but maybe when I learn how to tweak the options I'll see a difference. You can find it here:

http://www003.upp.so-net.ne.jp/mycometg3/

I should say that Squeeze 6 is topping both x264 plugins in quality at the same bitrates and settings (the common ones mentioned here in your tutorials). But it's hard to top the free plugins' price.

Matt

#12janSaid this on 03/14/2010 At 02:34 pmIn reply to #11

Hey Matt:

Thanks for this. I'm working on this today - will let you know what I find. 

Thanks!

Jan 

#13Jim DallasSaid this on 03/18/2010 At 08:58 am

Hi Jan,

   been looking recently  at  x264 on PC, bundled with avidemux (x264 settings). The defaults seem really good (see http://mewiki.project357.com/wiki/X264_Settings).  We're interested in Web H264/flash video clips. I've done a little messing with 2-pass bit-rate, but the better results seem to be taking defaults and then crf=28 for a stream in the 500-700k range, and crf=24 for 1-1.2Mb. Early days and only tried a few clips but looks really promising, also nice use of multicore encoding. Few niggles in overall workflow (need mp4box to post-process output for streaming, had some problems with HD quicktime). Good luck and looking forward to your analysis

#14JanSaid this on 03/24/2010 At 09:28 amIn reply to #13Thanks for the input. Been travelling, should be on this in the next couple of weeks.#15creamyhorrorSaid this on 04/14/2010 At 11:18 pm

x264 (in its latest incarnations) almost certainly holds a lead over virtually all other common consumer encoders, and possibly even studio-level H.264 encoders. Here's a discussion thread where we compared Apple H.264, MainConcept Reference, DivX 7, VC-1 and VP7 (done by an experienced fellow called poisondeathray):

http://forum.videohelp.com/threads/308482-high-qua...

Here are some screenshot comparisons of Adobe Media Encode CS4's H.264 output vs. x264 at different adaptive quantization settings:

http://forum.videohelp.com/threads/308482-high-qua...

To quote poisondeathray:

But seriously, there is no special setting - even maxed out - all consumer/prosumer level Mainconcept based encoders tend to 1) oversmooth, and 2) underallocate to dark areas. (believe me, I've tried every setting thoroughly). My friend has a studio , and I tested cinevision, and even the studio level version $50K does a lot worse in terms of efficiency than x264! For real. The only switch that has any real bearing for Mainconcept based encoders in most situations will be lowering the alpha / beta deblock values (the defaults are -1/-1, but you can try -2/-2 for example). Higher end versions do have lumimasking and psy settings similar to x264, but they usually are not accessible in the consumer versions.

Yep, I've tested Sony AVC from Vegas 8 and 9; significantly worse than Mainconcept (even worse than the gimped Mainconcept version that comes bundled, it's that bad).

And to quote Lyris from the Doom9 forums:

Regarding how a $3000 encoder is going to compare to x264: one of the most respected names in the video world said that none of the main studio's encoders matched the quality of x264. Certainly, on most BD titles, I can see small compression artefacts that I don't see on (quite grainy) test encodes I've done. I imagine this is the "speed over quality" argument again.

Poisondeathray again:

Well cinevision is a $50K encoder....Some other studios use blu-code. I'm not aware of any other

I prefer to see with my own eyes to believe it. I was skeptical x264 was better than a $50K encoder, but my tests showed that trend to me. I would have liked to spend more time with it to test it more thoroughly ...but I'm still pretty convinced.

It might sound like hyperbole, but even Criterion was (according to the x264 developer) investigating the use of x264 for its Blu-rays.

If anyone wants to try x264, make sure you use a recent version (it's currently at 1500+) and decent settings.

#16creamyhorrorSaid this on 04/14/2010 At 11:54 pmIn reply to #15

Woops, the quoting didn't show up right. Sorry about that.

By the way, there is also a current up-to-date versions of x264 for VfW, so it can now be directly used in any VfW-based application (VirtualDub, Premiere, etc.). (The previous version of x264VfW was years old.) The development thread for modern x264VfW is

http://forum.doom9.org/showthread.php?p=1389681#po...

and the download site is

http://komisar.gin.by/

(get the VfW versions, not the CLI versions)

#17JanSaid this on 04/15/2010 At 09:17 pm

Hey man:

Thanks for this - very timely. Will this version give me access to all the controls that I need?

If I wanted to get a real x264 expert to encode my test files for me to ensure the best possible quality, who would that person be? Please let me know - I'm thinking that's the best way to go because if I run the tests, and X.264 doens't come out so well, I'll be accused of purposefully tanking the quality or just being ignorant.

Thanks again - the Premiere Pro option may not offer the extreme range of encoding options, but it's the one most likely to be used by mainstream producers and I'd trade 3% quality for ease of accessability any day.

Let me know, and thanks again for posting.

Jan

 

#18creamyhorrorSaid this on 04/16/2010 At 08:25 am

Good to hear you'll be testing it. I have to clarify whether you want to use x264 in Quicktime or in VfW (for Premiere). I assume Quicktime, since you're using Compressor. In that case, Matt's link is what you want (the component's name being x264Encoder):

http://www003.upp.so-net.ne.jp/mycometg3/
or http://www.macupdate.com/info.php/id/24173/x264enc...

There's nothing inferior about x264Encoder - looks like the developer has been keeping it up to date.

To get someone to encode for you, you could contact Jason Garrett-Glaser, the current lead x264 developer. (He goes by Dark Shikari on Doom9, and you can contact him at darkshikari ~at~ gmail.) If you don't want to rely on him, you could ask poisondeathray on the Videohelp forums, or post on the Doom9 forums asking for a volunteer. Alternatively, you could do the encoding yourself with settings recommended by them, and send them the encode for verification that nothing went wrong.

Doom9 AVC/H.264 forum (note: 5-day posting moratorium upon registration): http://forum.doom9.org/forumdisplay.php?f=77

I just took a look at the settings for x264Encoder, and they're mostly the same but there are one or two things I'm not sure about. Unfortunately I don't have a Mac so I can't confirm what the right options are. I've annotated screenshots to give you some recommended settings, in case you need something to start with. (They're medium-high quality settings, not too slow and not max quality, and aren't intended for playback on devices like the iPhone, PS3, etc. - those devices need specific settings.) Here's the screenshot link:

http://imgur.com/7600p.jpg

You could also just use one of the presets under the "x264 preset" tab. They should be the same as the official x264 presets, representing the devs' own experienced choices.

Just drop me an email if you need any clarification. Good luck with the testing!

#19mark pedenSaid this on 04/26/2010 At 01:48 am

Jan,

Thanks for the info on this.

I use x264 to encode my showreel on http://www.markpeden.com/

I found x264 far better than h264 but couldn't get it to play on an iPhone so I offer an mpeg4 encode as well for iPhones. Reading through the comments on this page I wasn't aware that x264 incompatability was more mac specific - I had to do the separate mpeg4's because I deliver via Flash which iPhones don't support.

The videos on my site are mp4's encoded with XviD4PSP: x264, HQ Ultra, 2 pass, 450k br, and played through a Flash player. The separate iPhone mp4's are encoded with AVC: mpeg4, 450k br.

Thanks for all of the info on Streaming Learning Center.

Mark,

#20JanSaid this on 04/26/2010 At 07:22 amIn reply to #19Mark:

Definitely some caveats when using x264 within the Apple mobile ecosystem; thanks for pointing another out.

Cool show real, by the way.

:-)

Jan#21JordanSaid this on 08/08/2010 At 03:02 pm

Great information on H264 on this website.  Thank you for explaining all that you have.  I've read everything you've posted on H264 here and know a LOT more about it.

I have the recent copy of x264 (1.2.14) from MyCometG3 and while I've read his read-me on using it I find it very confusing.  There's a lot of bells and whistles in there when using it in Quicktime.

It sure would be awesome if you did a tutorial explaining it's features in your eloquent concise fashion for us newbies.

Thank you. :)

#22JanSaid this on 08/09/2010 At 07:53 pmIn reply to #21Hey Jordan:

Thanks for the kind words. May have an opportunity coming up to review this product, but can't make any promises on a tutorial - they just take too long. But, let me see what I find.

Thanks again for the kind words.

Jan#23DanielSaid this on 09/09/2013 At 05:28 pm

I know this is an old thread but I have been using x264 for years now and it just started crashing my quicktime.  Now I can't use quicktime to convert anything.  It is stuck set to x264 and when I click on settings to change it it crashes my quicktime.  This sucks big time - use x264 at your own risk.

#24janSaid this on 09/10/2013 At 06:47 amIn reply to #23Sorry to hear, but thanks for sharing.

Jan Ozer