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.

DVD

Hard Drive

Flash

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:

  1. Decompression is computationally intensive - you need a meaty machine to work with AVCHD whether you're in Windows or Mac land.
  2. 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.
  3. 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.

Preparation

If you browse AVCHD media, you'll find a directory structure like this one:

avchd_structureThe 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.

 

 

CoreAVC

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_configure

  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:

 

 coreavc_settings

AC3Filter

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:

codecs

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):

file

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:

encoder

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:

deint

Encoded 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 :)

Comments

  • Anonymous
    May 31, 2008
    PingBack from http://recipes.poststhatmatter.info/avchd-recipe-for-expression-encoder-2/

  • Anonymous
    June 02, 2008
    Having posted a method for compressing AVCHD directly in Expression Encoder 2 , I thought I would see

  • Anonymous
    June 10, 2008
    The comment has been removed

  • Anonymous
    June 17, 2008
    David,  I got a new AVCHD camcorder with 6gen. SD card. I installed the software, updated my drivers, OS XP pro Sp3, and then I try playing the Avchd in the supplied software player, the picture is jerky, jumpy.. I have a Athlon 3200 dual core, 2gb memory, and plenty of HD space and a Radeon X800 PRO 256MB video. I don’t even know where to start troubleshooting. It plays like butter on the camcorder, its something

  • Anonymous
    July 21, 2008
    Hi David, I followed the steps outlined in your blog; purchased, downloaded and configured both codecs. When I check in Expression if the codecs have been succesfully recognised by Expression Encoder I cannot see them. Is there any way to "add" them to Expression Encoder 2? I am using: Core AVC Standard Edition AC3 Filter 1.51 PC runs Vista Enterprise Edition Look forward to your reply, Marcel

  • Anonymous
    August 06, 2008
    The comment has been removed

  • Anonymous
    August 29, 2008
    The comment has been removed

  • Anonymous
    December 11, 2008
    This worked perfectly with footage from my Canon HF100.  Thanks David!

  • Anonymous
    March 17, 2009
    Ich wollte heute AVCHD-Videos von unserem Camcorder in Expression Encoder importieren – ging nicht. Unsupported

  • Anonymous
    April 29, 2009
    I've tried several dual-proc machines - none have been capable of smooth AVCHD playback.  I moved to a quad-core and it is perfect.  Highly recommend more CPUs (more than 2) for good playback.

  • Anonymous
    July 10, 2009
    Hi David, I had the same experience as Marcel. I CoreAVC and AC3Filter and configured CoreAVC settings as recommended. The AC3Filter filter shows up in Expression Encoder 2, but the CoreAVC filter does not. I'm running Vista32. Any suggestions? Thanks, --ken

  • Anonymous
    November 29, 2009
    The comment has been removed