BlenderAVC

From OpenFilmmaking

Revision as of 00:18, 26 October 2008 by Spamagnet (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

BlenderAVC is an open-source project to provide the "glue" between Blender's Sequence Editor and video in the AVCHD format. It provides a way of automating the creation of AviSynth scripts and proxy files so that AVCHD and HDV video can be efficiently edited within Blender.

Contents

[edit] Project meta data

[edit] Useful for

  • Video transcoding
  • AVCHD video support in NLE

[edit] Workflows

[edit] Requirements

  • Windows 32-bit (not tested with 64-bit)
  • You must have Python version 2.5 installed.

[edit] Using BlenderAVC

Keep in mind that BlenderAVC is in beta. Power users only!

[edit] Install

Download the most recent package.

Here is a suggested method of installing BlenderAVC. All examples assume this method.

  1. Make sure you have a "zip" tool, since you will need to unzip several items. We recommend using 7-zip.
  2. Download and install Python 2.5
  3. Download BlenderAVC package from SourceForge.
    • c:\BlenderAVC\blenderavc folder - BlenderAVC source files
    • c:\BlenderAVC\tools
    • c:\BlenderAVC\tools\avisynth
    • c:\BlenderAVC\tools\blender
    • c:\BlenderAVC\tools\dgavcdec
    • c:\BlenderAVC\tools\dgmpgdec
    • c:\BlenderAVC\tools\ffmpeg
    • c:\BlenderAVC\tools\libxml2
    • c:\BlenderAVC\tools\smoothdeinterlacer
    • c:\BlenderAVC\tools\tivtc
  4. Install c:\BlenderAVC\tools\libxml2\libxml2-python-2.6.30.win32-py2.5.exe
  5. Install c:\BlenderAVC\tools\avisynth\Avisynth_257.exe

[edit] Configure

  1. In Windows Explorer, go to the c:\BlenderAVC\blenderavc\ folder
  2. Copy the blenderavc_template.ini file to blenderavc.ini
  3. If you have put BlenderAVC somewhere besides the default location, you will need to edit the file c:\BlenderAVC\blenderavc\blenderavc.ini and update the [paths] section of the file.

[edit] Using it with your video

See the BunnyHopHop workflow for details on how to use BlenderAVC. BAAM (BlenderAVC Asset Manager) will allow you to access the video directly from within Blender.

[edit] Source files

  • blenderavc.ini
    • Configuration file which holds the paths of various tools
  • blenderavc_cl.py
    • Command-line executable.
  • LibBlenderAVC.py
    • Core "library" code which does everything.
  • BlenderAVCGUI.py
  • BlenderAVCGUI.ui
  • BlenderAVCGUI_ui.py
    • GUI executable. It works, but it's a bit ugly and awkward. Created with GuiBuilder.
  • COPYING
    • Text of the license.
  • README
    • Basic information (mostly points here).
  • transforms folder
    • avs_allclips.xslt
      • Transform which generates an .AVS script containing all the clips, including file names and timecode.
    • avs_audio.xslt
      • Audio-only .AVS script transform.
    • avs_video.xslt
      • Video/audio .AVS script transform.
    • common.xslt
      • Common sections of the XSL transforms.

[edit] How it works

BlenderAVC is written in Python and XSLT and it uses other FOSS (free/open-source) tools. It finds the "raw" video clips and does the following things:

  • Moves the raw files into a subdirectory called raw.
  • Creates a clips.xml file which a list of all the raw clips. Once created, it refreshes the file non-destructively (i.e., it will maintain any manual changes).
  • For AVC, indexes the raw clips using DGAvcDec, which generates a .dga file for each one.
  • For HDV, indexes the raw clips using DGMpgDec, which generates a .d2c file for each one.
  • Uses FFMPEG to pull out the soundtrack to a .wav file.
  • Creates .avs (AviSynth) script for each clip using XSLT.
  • Optionally uses FFMPEG to create JPEG image sequences to be used as proxies in Blender3D.
  • Optionally uses FFMPEG to create an MPEG "preview" (for PCs too slow to play back the AVC video in real time).
  • Optionally uses FFMPEG to create an JPEG thumbnail (useful to see a quick overview of your clips, and also for a future asset management project).

[edit] Coming soon

  • Better documentation (including command line usage)
  • Installer (low priority)

[edit] Why?

BlenderAVC came about because of a personal quest to find a non-linear video editor (NLE) which was:

  • Usable (fast, flexible, etc.)
  • Free/open-source
  • Cross-platform/Windows
  • Supported by a vibrant community
  • Suitable for professional filmmaking (HDR, etc.)

After trying Linux a few times, I decided I just wasn't ready to make the leap. That knocked out Cinelerra, which has failed to attract a large following anyway. Jahshaka looked (and looks) really cool, but its development has been stalled for years. Other projects looked interesting, but none met the other other requirements.

In the meantime, I have been using Ulead MediaStudio Pro (MSP), which is a reasonably good NLE. The breaking point came a few months ago when I bought a Canon HF100, which records directly to AVCHD. Nothing supports this format directly yet, and I've been concerned about the future of MSP since Corel took it over a few years back. (Corel seems to be the place where apps go to die.)

Nevertheless, I tried to make it work. I tried using MakeAVIS (part of the FFMPEG project), which is a Windows codec that allows access to AviSynth scripts via a "real" .avi file. This configuration was slow and unstable -- it crashed several times per hour. MSP supports proxies, but there was no easy way to batch-create them; I had to place a clip, and then wait several minutes for it to generate the proxy. Frustration.

So I re-started my search. When version 2.46 of Blender3D was released recently, I decided to take a closer look at its Sequence Editor. To my delight, I found that Blender has been making great strides as a NLE over the past few years, and with proxy support, could be quite usable even on my relatively old machine. Blender has direct support for AVCHD, but I was shooting in 30p mode and the frame rate was never quite right. Frustration.

The other part of the puzzle is AviSynth -- an amazing little tool for video processing and frame serving. I was able to write scripts to process the AVC video, but since not many NLE's support AviSynth, I would have to transcode it to a supported format. Since I am a quality freak, this meant using a zillion gigabytes of disk space for a second (uncompressed or losslessly compressed) copy of my video.

Blender uses FFMPEG, which can support AviSynth, but the standard builds for Windows do not have this support enabled. Frustration.

In this thread, I ran into TheNut, who was kind enough to create and post an AviSynth-compatible build of Blender and the pieces started to come together.

Personal tools
SourceForge.net Logo