Encoding WebM on a Mac
Wednesday April 10th 2013, 9:12 am
Filed under: Video

Terry Hancock’s Lib-Ray initiative is a great alternative to Blu-ray, using high-quality HTML5 video and plain HTML/CSS and JavaScript that can play back online or from an SD card. To support all the major browsers (Firefox, Chrome, and Safari), you need to include WebM versions of your video as well as H.264—but at present the site only offers tutorials for command-line encoding tools, which are challenging for less experienced users. So I’ve created this guide to encoding WebM video using GUI utilities on OS X.

Step 1: Download your tools. You’ll need:

  • WebM QuickTime component (free): adds WebM support to your Mac system.
  • Xiph Vorbis Quicktime component (free): adds Vorbis audio support.
  • Quicktime 7 Pro (USD $30): creates the video track. This might seem like a strange choice—but in my tests it seems to be the only GUI-based Mac tool right now that can reliably encode high-quality HD WebM video for under $100. For now, other common utilities that claim WebM support are either glitchy or have fixed low-quality settings.

Optional extras:

  • Audacity (free): A great all-purpose audio editor that can export Vorbis audio files if you’re using separate audio tracks.
  • MKVToolnix (free): Losslessly add and delete audio and video tracks from a WebM file.

Step 1: Install the audio and video codecs. Drop them into the /Library/Quicktime/ folder, and they should immediately become available.

Step 2: Prepare your materials. Like H.264, WebM is a highly compressed codec, so you’ll need to start with a high-quality original to get good results. I recommend using a Quicktime movie with the PNG, ProRes, DNxHD, or PhotoJPEG codecs. Be aware that WebM doesn’t appear to support nonsquare pixels; for example, you’ll need to convert 720×480 DV video to true 4:3 or 16:9.

Step 3: Open your video in Quicktime Pro and choose Export, then Options.

Step 5: Video settings.
Frame rate: You’ll have to manually match your original frame rate.
Keyframe every: Your frame rate rounded to the nearest whole number. (If your original video is 23.976 fps, put 24).
Data rate: Your choice—be aware this is measured in kilobytes, not bits. I use 3500KB/s for an HD original (approximately Blu-ray bitrate) and 1000KB/s (approximately DVD bitrate) for SD.
Quality: I don’t think this affects anything, but I always set it to Best for good luck.
One Pass/Two Pass: Two-pass encoding takes more time but gives better results. However, WebM already encodes very slowly, so if it’s not an overnight render you might want to leave this off.

Step 6: Audio settings.
Channels: Usually you want Stereo.
Rate: 48Khz is standard.
Quality: Confusingly, this is sample rate conversion quality, not compression quality. Always choose Best.
Encoding quality: 10 is best, on a scale of 1 to 10. (Decrease if file size is important.)

Step 7: HTML5 video lets you specify multiple sources for your video. Here’s some sample code.

<video>
   <source src=”test.mp4″ type=”video/mp4″/>
   <source src=”test.webm” type=”video/webm”/>
</video>

You might be asking at this point—why is this odd-duck video format worth all the hassle? Well, it’s about more than just supporting Firefox—WebM was created more from legal necessity than anything else. The very popular H.264 video codec and its main physical-media distribution format, Blu-ray, are caught in a series of conflicts of interest between various giant media and technology companies. (The issues are too complex to summarize easily, but you can read more about them here.)

These fights affect you in numerous subtle ways—licensing squabbles are why, for example, it’s so difficult to play back Blu-ray discs on a computer. H.264’s license terms allow you to give your work away for free, but they don’t let you sell it without paying royalties to the MPEG-LA, the consortium that owns the codec. To be clear, this rule isn’t currently being enforced—it’s very unlikely that anybody plans to stop you selling home-burned Blu-ray copies of your own work—but it leaves the MPEG-LA with far too much control over the livelihood of video producers. And the they could change their license terms at any time. So Google created the WebM video format to have an open-source, (theoretically) patent-unencumbered video codec to fall back on if H.264 became legally impractical to use. (Since YouTube is the world’s largest user of H.264 video, they would be extremely vulnerable to unfavorable licensing changes.) TL;DR—Including WebM as an alternative format protects your right to distribute your own work however you want. It’s an important format to be aware of, especially if you’re an individual artist selling physical copies of your work to collectors or exhibitors,




test

Comment by Nick 04.23.13 @ 9:12 am

I constantly emailed this website post page to all my associates, because
if like to read it next my contacts will too.

[WORDPRESS HASHCASH] The poster sent us ‘0 which is not a hashcash value.

Comment by quest bars 02.18.16 @ 10:36 pm

My spouse and I absolutely love your blog and find most of your post’s to be exactly what I’m looking for.
Do you offer guest writers to write content in your case?
I wouldn’t mind composing a post or elaborating
on many of the subjects you write related to here.
Again, awesome blog!

[WORDPRESS HASHCASH] The poster sent us ‘0 which is not a hashcash value.

Comment by quest bars 02.19.16 @ 5:44 am

Hi there i am kavin, its my first occasion to commenting
anyplace, when i read this post i thought i could also create comment due to this sensible post.

[WORDPRESS HASHCASH] The poster sent us ‘0 which is not a hashcash value.

Comment by plenty of fish dating site of free dating 02.22.16 @ 7:10 pm

Your style is unique compared to other folks I’ve read stuff from.

Thank you for posting when you’ve got the opportunity, Guess I
will just book mark this site.

[WORDPRESS HASHCASH] The poster sent us ‘0 which is not a hashcash value.

Comment by plenty of fish dating site of free dating 02.23.16 @ 6:40 am

Simply desire to say your article is as surprising. The clearness in your publish is just excellent and that i can assume
you’re knowledgeable on this subject. Fine together with your permission allow
me to grasp your feed to keep updated with approaching post.
Thank you 1,000,000 and please keep up the gratifying work.

[WORDPRESS HASHCASH] The poster sent us ‘0 which is not a hashcash value.

Comment by plenty of fish dating site of free dating 02.23.16 @ 9:33 am

It’s hard to come by experienced people about this subject, but you sound
like you know what you’re talking about! Thanks

[WORDPRESS HASHCASH] The poster sent us ‘0 which is not a hashcash value.

Comment by plenty of fish dating site of free dating 02.23.16 @ 10:31 am

Residential proxies for Costa Rica: https://www.intl-alliance.com/store/cart.php?gid=30

Comment by Tomika Peraro 02.28.16 @ 9:43 pm

you’re truly a excellent webmaster. The site loading speed is incredible.
It sort of feels that you’re doing any unique trick. Also, The contents are masterpiece.

you have performed a great job in this subject!

Here is my site … RinaXFerdico

[WORDPRESS HASHCASH] The poster sent us ‘0 which is not a hashcash value.

Comment by RinaXFerdico 02.29.16 @ 2:24 pm

Residential proxies for Greece: https://www.intl-alliance.com/store/cart.php?gid=30

[WORDPRESS HASHCASH] The poster sent us ‘341491016 which is not a hashcash value.

Comment by Fermina Byun 03.02.16 @ 1:17 am

Astonishingly individual pleasant site. Great details readily available on couple of clicks.|

[WORDPRESS HASHCASH] The poster sent us ‘0 which is not a hashcash value.

Comment by NBA 2K16 Coins 03.19.16 @ 9:44 am