.

Edit AVCHD 24p using Adobe Premiere Pro CS3

videoediting-cs3Update: When I wrote this article, Adobe Premiere Pro CS3 could not edit AVC-HD video footage.  Starting with the release of CS4, Adobe finally added this support.  I decided to skip the upgrade, because of the price tag and the fact that I was simply happy with the approach outlined in this guide.

This guide describes an almost freeCoreAVC Professional requires small fee frame accurate solution to edit video from the Canon Vixia HF10 (HF11, HF100) camcorder in Adobe Premiere Pro 3.2 (CS3).  It assumes that video is taken in PF24 mode at 1920×1080.  It is rather trivial to adapt to other frame rates, resolutions or even other non-linear editors (NLEs).

The solution described in this guide involves a substantial number of process steps.  This can however be automated as demonstrated in my “avchd2pp.cmd” script.  If you rather have a more straightforward approach and are willing to pay for it, then consider an upgrade to CS4 along with at least a 3 GHz i7 quad core CPU.

Workflow using Proxy video

The work flow creates two sets of files that can be imported in Adobe Premiere.  One set of small low definition proxy video files, and one set of huge high definition video files.

Start by importing the proxy files into Premiere Pro, and do the vast bulk of the interactive editing and color corrections. When pleased with the time line, switch to the full-definition video for the final rendering and let Premiere crunch away.

64-bit Operating system: highly recommended

While running Premiere Pro under the 32-bit version of Windows, I witnessed frequent crashes during rendering HD video. A look at the core dump files pointed the finger at a null pointer assignment.  This was most likely triggered by a lack of virtual memory.  I hope that Adobe address this issue!  Once I switched to Vista 64-bit, and later to Windows 7 beta 64-bit (with 6 GByte installed), the same application was happy as can be.

However, installing some of the tools requires a bit more effort under a 64-bit operating system.  For example, I had to upgrade to VirtualDub 1.8.8, and CoreAVC 1.9.5.  Also getting the Panasonic DV codec running took some extra leg work as described below.

If need to run a 32-bit operating system and experience “Application Error” crashes Adobe Premiere Pro 3.2 (CS3), consider the following tweaks:
  • With 2 GByte installed Premiere’s private virtual memory usage peaks at about 2.3 GByte private memory when rendering 1920×1080 video,  This implies that it will crash unless you tell XP to give a 3 GByte virtual address space (instead of default 2 GByte) to applications:  With only 2 GByte of RAM installed, Premiere will cause a lot of page faults, but at least it will not crash.  The details:
    Control Panel > System > Advanced > Startup and Recovery Settings > System startup > Edit
    copy the bottom line, and change the description, and
    add the kernel switches “/3GB /USERVA=3072 /noexecute=alwaysoff”
    press OK ; then again:
    Control Panel > System > Advanced > Startup and Recovery Settings > System startup > Edit
    set the new kernel switches as the default.
    Grow the paging file to its maximum size (4096 MByte) and reboot
  • Some video cards or other hardware devices do not support these kernel tweaks.  Press F5 during Windows startup to boot with the original kernel switches.
  • Project > Project Settings > General > Playback Settings > Desktop Display Mode = compatible
Decoding AVC-HD

The camcorder generates AVC compressed video (more info).  To decompress this video, I use CoreAVC Professional 1.9.5 and the Microsoft DirectX >=9.0 framework.

We now have to make sure that DirectX will choose this CoreAVC decoder and a AC3 decoder.  To visualize what filters are chosen, drag’n’drop an AVC-HD (.mts or .m2ts) file in Microsoft GraphEdit 5.04. The graph should look as shown below.  Note that Windows 7 can decode AVS-HD as well, but I have not tried this yet as I am happy with the CoreAVC decoder.

  • AVCHD video > CoreAVC Video Decoder > Video Renderer
  • AVCHD audio > InterVideo Audio Decoder (or another AC3 decoder) > Default Direct Sound Device

If needed, use a tools such as DirectShow Filter Manager 0.5 (DSFMgr) or Filmerit to increase the merit for the CoreAVC filter, so that it will use CoreAVC (details here).

Now configure the video and audio filters using GraphEdit:
  • right-click the CoreAVC Video Decoder and configure as shown below.  Note that CoreAVC 1.7 can not correctly pull-down AVC-HD video.  Later versions might be able to, but I again have not tested this.  Instead I will have AviSynth do the pull-down.
    • enable all input and output formats
    • input and output levels = auto detect
    • deinterlacing = hardware (no interlacing)
    • no aggressive deinterlacing; crop 1088 to 1080; no force VMR AR correction; preferred decoder
  • right-click the InterVideo Audio Decoder and configure
    • 2 speaker mode, stereo
    • both vocal options

Save as full definition video

To extract true 24p (AKA pull-down) from the telicined video stream, we use the scripted video editor AviSynth.  An added advantage is that this can frame serves the video to VirtualDub that in turn can save it.  To perform the pull-down, AviSynth needs the help of a plug-in (tIVTC.dll).  Install AviSynth and this plug-in and create a script (“full\test.avs”) that tells AviSynth what to do:

DirectShowSource(“test.mts”)
AssumeTFF()
LoadPlugin(“tivtc.dll”)
tFM()
tDecimate()
ConvertToRGB32(matrix=”PC.709″)

We use VirtualDub 1.8.8 to save to resulting video to an AVI file.  The proxy video will be saved in DV format that is easy on Premiere Pro.   The high definition video will be saved in a lossless format.  Both formats require a codec to be installed:
  • Panasonic DV, to save the proxy video to standard-definition DV (for running this under 64-bit Windows 7, or Vista see here)
  • Lagarith Lossless, to save the HD video to efficient lossless (install using the .exe file, especially when running 64-bit Windows 7, or Vista)
We can now open the AviSynth script (the .avs file) in VirtualDub as if it were a regular video clip.  VirtualDub can then save it in Lagarith Lossless compressed video using the following steps:

Start VirtualDubMod with default settings

Drag’n’drop “full\test.avs” to VirtualDubMob

Video > Mode = Fast recompress

Video > Compression >  Lagarith Lossless

Video > Compression >  Lagarith Lossless > Configure > Mode = RGBA

Video > Compression >  Lagarith Lossless > Configure > Use Multithreading

File > Save Processing Settings > Save as type = Sylia script for VitualDub

File > Save Processing Settings > File name = “Lagarith 1920×1080 RGB32.syl”

File > Save As > full\test.avi

Theoretically it is possible to have Premiere Pro read the .avs file directly.  However version 1.9 of the required Premiere throws application errors (memory could not be “read”) on closing Premiere, or just plain-out refuses to import a file with generic errors like “avisynth configuration error or old avisynth version”.  Version 1.5 is more stable, but Premiere creates many instances of AviSynth what quickly eats through available memory (more here).  Lucky for us, disk space is cheap and storing the full definition video on disk will save you time assuming you have to render the video more than once.

Save as proxy video

This full definition video is great for the final render in Premiere, would bring Premiere Pro to its knees when editing.  Instead, we will create low resolution proxy video that can be used for editing and color correcting in Premiere.  The example below uses Panasonic DV Codec.
Load the avs script in VirtualDub, and instruct VirtualDub to scale it down and save it as DV:

Start VirtualDubMod with default settings
Drag’n’drop “full\test.avs” to VirtualDubMob
Video > Mode = Full Processing
Video > Compression >  Panasonic DV Codec
Video > Filters > Add > Resize > 720×480, Filter Mode = Lanczos3
File > Save Processing Settings > Save as type = Sylia script for VitualDub
File > Save Processing Settings > File name = “Panasonic DV 720×480 4.1.1.syl”
File > Save As > proxy\test.avi

Bait and switch

We now have the raw material that we need to render the final video in Premiere Pro: the low resolution proxy video (proxy\test.avi), and high resolution video for final render (full\test.avi)

Once you are finished editing, it is time to switch Premiere Pro to work with the high resolution video.

  • Import the proxy file in Premiere Pro and use it for editing.  Select all AVI files; right-click > reinterpret footage > Pixel Aspect Ratio = conform to D1/DV NTSC Widescreen 16:9 (1.2).
  • Do all you editing and color corrections in Premiere Pro, and save your project.
  • Select all the proxy media files and select “make offline”.   Right-click them again and do “link media” and point it to the directory with the full resolution files.  All your media will have been replaced with full-resolution media.  Change the Pixel Aspect Ratio back to square pixels (PAR 1.0).
  • Start the render of your final movie.

Export from Premiere Pro

The obvious choice would be to use Premiere Media Encoder to exporting to i.e. H.264 video.  However, the resulting video has lots of blocking during transitions.  It is almost like Premiere limits the bandwidth going into the encoder. Instead we will save to an AVI file using the same Lagarith Lossless codec that we used before, and use x264 to compress to H.264.  The added advantage is that video only has to be rendered once and can be transcoded to different formats.  To export from Premiere follow the following steps:

File > Export > Movie > Settings > General > File Type = Microsoft AVI
File > Export > Movie > Settings > General > Add to Project When Finished = No
File > Export > Movie > Settings > Video > Video > Compressor > Lagarith lossless codec
File > Export > Movie > Settings > Video > Video > Frame size = 1920 x 1080
File > Export > Movie > Settings > Video > Video > Pixel Aspect Ratio = Square Pixels (1.0)
File > Export > Movie > Settings > Video > Data Rate > Recompress = Always
File > Export > Movie > Settings > Video > Video > Compressor Configure > Enable null frames = disabled
File > Export > Movie > Settings > Video > Video > Compressor Configure > Always suggest RGB for output
File > Export > Movie > Settings > Video > Video > Compressor Configure > Mode = RGB
File > Export > Movie > Settings > Video > Video > Compressor Configure > use Multithreading
File > Export > Movie > Settings > Video > xx > xx >  23.970
File > Export > Movie > Settings > Video > xx > xx >  progressive

Transcode to H.264

The MeGUI H.264 encoder user interface is used to transcode the video to H.264.  It requires Microsoft .NET 2.0 and “Nero Digital Audio Codec” to be installed.
  • Video profile PD-AppleTV profile and boost the bitrate to 4.5 Mbps
  • Audio profile NDACC-HE-MultiChannel-128kbps and boost the bitrate to 160kbps

For more information on exporting to other formats refer to my notes High quality encodes from Premiere Pro for AppleTV, DVD or BRD.

Moving on to CS5

Once you decide to upgrade, you can port the old projects to use the .mts files directly.  More details can be found in the companion article Editing 24p AVCHD with Adobe Premiere Pro CS5.

In review

This method works very well for me.  Even a modest 2 GHz / 2 GByte dual core box can edit the DV files smoothly, so that is what I use for proxies.  This also allows me to do a quick render of the movie at a standard definition for review before I move ahead to the final high resolution render using the full resolution material.  FYI I recently switched to a 3 GHz / 6 GByte i7 quad core mainly because my Dual Core showed signs of aging.

Coert Vonk

Coert Vonk

Independent Firmware Engineer at Los Altos, CA
Welcome to the things that I couldn’t find.This blog shares some of the notes that I took while deep diving into various fields.Many such endeavors were triggered by curious inquiries from students. Even though the notes often cover a broader area, the key goal is to help the them adopt, flourish and inspire them to invent new technology.
Coert Vonk

Latest posts by Coert Vonk (see all)

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

  

  

  

Protected with IP Blacklist CloudIP Blacklist Cloud