AVCHD Recipe for Expression Encoder 2
I've been chatting with Scott Stanfield, CEO of Vertigo about AVCHD camcorders and we discussed how to best implement an AVCHD workflow in Expression Encoder. I recently posted a "recipe" for how to import HDV footage and encode it using Expression Encoder 2, so I thought this would be a good opportunity to write up something similar for AVCHD. There's a lot of interest in the AVCHD format and it is used by a number of tapeless consumer camcorders. Jointly developed by Sony and Panasonic, AVCHD uses an MPEG-4 AVC/H.264 codec for video and Dolby Digital AC-3 or Linear PCM for audio. AVCHD is only used for tapeless camcorders, which means DVD-, hard drive- and flash memory-based devices. It supports a variety of resolutions and frame rates including 1080/60i, 1080/50i and 1080/24p. Why the interest in AVCHD? Simply put, compared to HDV it offers higher compression and lower data rates with similar image quality. And AVCHD devices are tapeless, video can be copied to a computer at speeds that are faster than real-time (it is pain to ingest MiniDV or HDV in real-time when you're ready to edit something!) Most AVCHD camcorders are now in their third iteration, and the table below lists some current models.
|Canon HR10||Canon HG10||Canon HF10/100|
|Sony HDR-UX20||Sony HDR-SR11||Sony HDR-SR11|
|Panasonic HDC-SX5||Panasonic HDC-HS9||Panasonic HDC-SD9|
The problems with AVCHD today are three-fold:
- Decompression is computationally intensive - you need a meaty machine to work with AVCHD whether you're in Windows or Mac land.
- If you want to do frame accurate editing, AVCHD, like HDV, needs to be converted into another format that only uses intra-frame compression so that it can be edited. Since AVCHD decompression is slow (in software, see 1 above), this isn't a real time operation.
- Native support for AVCHD in NLEs is limited and not all AVCHD seems to be "created equal", so you might find that an AVCHD stream from one camera works in a particular editor, while a stream from another camera does not.
What's the story with AVCHD and Expression Encoder 2? The good news is that Expression Encoder 2 was designed to be extensible when it comes to decompression codec support. It uses DirectShow, so if you have a DirectShow filter for a particular format, Expression Encoder should be able to work with it. A simple test is to see if your video file opens in Windows Media Player. If it does, you probably have a suitable DirectShow filter for it. For AVCHD, there's an inexpensive commercial codec called CoreAVC (at the time of writing it costs as little as $8). You also need something to handle the audio and ac3filter (free) does this nicely.
If you browse AVCHD media, you'll find a directory structure like this one:
The STREAM folder is the one that contains all the video in the form of MTS files. If you shot a single long video, you may that it is spread across several MTS files. You can try joining them together as discussed in this Videohelp forum thread or this DVInfo thread.
Assuming you've purchased or are using the trial version of CoreAVC, you will find that it has installed both the CoreAVC codec and Haali Media Splitter.
CoreAVC is fairly invisible, but under your Start -> Programs menu you will find a "Configure CoreAVC" entry. Choosing this will open a configuration dialogue box and you should select the options below:
There are no configuration changes required for ac3filter.
Using Expression Encoder 2
Now that you've installed the pre-requisites, you can start Expression Encoder 2. Check the Tools->Options menu to ensure that the codecs are loaded and selected:
Now you can use the Import button to load an MTS file into Encoder. Check "All Fles (*.*)" in the file picker otherwise you won't see any video files (since *.mts is not a file extension we know about by default):
Once you import the file, you should see "Analyzing..." in the Status area for a few seconds to a few minutes depending on the length of the video, then the first frame of the video should appear in the preview window like so:
I have noticed that skipping ahead in the video or accessing it in a random access manner results in very jerky playback in the preview window. I expect this is the codec trying to catch up with some very demanding processing.
CoreAVC will do its own deinterlacing or you can use Encoder's. In my test video, I used Encoder's and you can see the results below. Remember that if you shot in an interlaced mode you will need to deinterlace. I've had more luck forcing deinterlacing in the Pre-Processing window than relying on automatically detecting interlaced video:
Here's the resulting Silverlight video encoded using Ben Waggoner's magic HD settings (I used CBR for audio rather than VBR to get over an interaction with VBR and ac3filter).
Note: I've noticed that if you're using my HDV recipe, you will need to remove Haali Media Splitter since it does not appear to be possible to disable it.
Finally, a big thank you to Eric Juteau, the senior developer on Expression Encoder, for pointing me in the right direction for this AVCHD recipe as well as for his corrections to what I posted. He's going to post some more in-depth information on using AVCHD, splitters, and other fun sounding esoteric stuff on the Expression Encoder Team Blog (the pressure's on Eric!)
The third party software mentioned in this article is not endorsed in any way by Microsoft and I provide this information as is. Your use of this information is at your own risk and if it burns your house down, maims your cat or cuts your finger, don't say I didn't warn you. This is not FDIC insured and investments may go down as well as up :)