Back to Mobile View

Skip to Content

Mac 101: Encode media from Automator or the command line in Lion

There's an easy way in OS X 10.7 Lion to convert video or audio from one format to another, using a fixed suite of conversion settings. One approach uses Automator and can be launched from the Finder. The other uses the Terminal application and the afconvert (for audio) or avconvert (for video) command-line utilities. Behind the scenes, though, Automator is simply serving as a convenient front-end for the CLI tools. (You can also use the free Hoot app from the Mac App Store to do the same audio conversions.)

The Automator method is the easiest to start with. Simply select the video or audio file you want to convert in the Finder. Under the Finder menu, choose the Services submenu, then "Encode Selected Video Files" or "Encode Selected Audio Files." You can also get to the Services submenu via the Finder's contextual menus; right-click the target file (or control-click, or on a trackpad, two-finger click) and the Services choices will be at the bottom of the pop-up menu.

Finder menu / Services submenu

Contextual pop-up menu

Either approach will launch a dialog box where you can select your media conversion settings and the target file's destination. You can process one file at a time or, if you select multiple files, they'll be tackled in a batch conversion. The settings are slightly different for audio and video files, as appropriate to their media types -- you can experiment with the different settings to find the format that works for you.

Video encoding settings

Audio encoding settings

For those of you more comfortable with the command line, you can use afconvert to encode an audio file from one format to another or avconvert to do the same with video. Type "afconvert -h" in Terminal to get a list of all the options you can use in the audio conversion.

The avconvert tool is new in OS X Lion. Besides transcoding, it also lets you extract the audio or video track from a clip, change frame rates, add closed captioning and more.

You read more about Automator video encoding and audio encoding at the Mac OS X Automation website. Additional information on the CLI commands can be found in Apple's Mac OS X Developer Library.



Categories

How-tos AppleScript OS X

There's an easy way in OS X 10.7 Lion to convert video or audio from one format to another, using a fixed suite of conversion...