Archive for the 'editing' Category

Petition to release MainActor Source Code

Wednesday, August 22nd, 2007

MainActor, a commercial product for video editing on a Linux platform, has been discontinued. This means that the source code could potentially be made open-source. A petition is circulating to encourage MainConcept to consider releasing at least some of their code. The author of the petition writes about it on his blog. In addition to signing the petition, you can lend a hand by digging it.

A similar initiative was started by the Blender Foundation many years ago, and they successfully bought the source code for something like a hundred thousand euros, and then released it as open source.

MainActor has always been a well reviewed product, although the price tag was generally too much for many people. A source code release from MainConcept would come in the form of a partial code base, with their proprietary encoding technology removed. An effort would need to be made to replace those parts with something like libavcodec. If Blender is a good model, the process will be slow, but the potential for an active community is vast. Today Blender has one of the largest, most enthusiastic, and fastest growing user communities out there.

Linux.com editorial on Linux Video

Sunday, August 12th, 2007

Once or twice a year I look at FOSS video editing tools to see if they’re ready for everyday use by advanced amateur and low-end professional video makers, which is where I classify myself in the video production hierarchy. There have been several notable improvements recently that have moved FOSS video editing tools a little closer to practicality, but FOSS desktop video editing still has a long way to go before it can be taken seriously by people who need to turn out high-quality video productions on tight deadlines.

The above is from “Open source video editing still has a long way to go”, a feature article by Roblimo over at Linux.com.

Audio Filter and Transition Support

Wednesday, March 7th, 2007

The following table summarizes audio filters that are supported by the various packages. There is a complete listings of plugins available for cinelerra. The AUDIO FILTERS section of the mencoder manual describes each of the audio filters operation in more detail.

Effect Cinelerra Kino ffmpeg mencoder
Compressor
EQ
Reverb
Delay
LADSPA
Crossfade

These filters and transitions cover much of what you need to produce good clean audio. The support for LADSPA plugins in mencoder gives mencoder the broadest range in effects since there are so many existing LADSPA plugins available (including compressors), but at the same time it is limited in that it does not support automation, i.e. varying plugin parameters over time. Cinelerra has full automation support for nearly all parameters via auto keyframing. Kino’s audo effects are mostly geared toward compensating for its lack of multitrack audio—it’s current “audio filter” list includes: dub, fade in, fade out, gain, mix, and silence; all typical mixing functions, not what one might initially think of as effects.

Video Filter Support

Monday, March 5th, 2007

The following table summarizes the video filters supported by various video editing packages.

Filter Cinelerra Kino ffmpeg mencoder
scale
flip/mirror
rotate 1
crop 2 2
2:3 pulldown
2:3 pullup
hue/saturation
white balance 3 3
brightness/contrast
gamma
blur
sharpen
chroma key
difference key

In addition, Kino has a very nice “soft focus” filter that does a convincing job of simulating the Hollywood starlet “I’m ready for my closeup, Mr. DeMille,” sort of look. Both Kino and Cinelerra also boast a selection of the usual fare of cheesy filters, like the kaleidoscope, sepia tone, oil painting, or charcoal sketch effects.

Note:

  1. mencoder only supports rotation by 90 degree increments.
  2. Both Cinelerra and Kino support panning and zooming, which can be used to achieve a crop-like effect. Kino, however, doesn’t have a lot of flexibility in specifying the output format; instead it assumes that the output will be either NTSC or PAL, either 4:3 or 16:9, and DV, mpeg for DVD/VCD, or one of a few web distribution presets.
  3. Cinelerra only offers a “color balance” tool, that allows colors to be shifted toward red, green, blue, or cyan, magenta, yellow. Technically, you can set a white-balance with that, but it’s a pain in the but. Kino, offers a much more useful white balance filter that lets you sample your white point from the frame, or set a color temperature in degrees Kelvin.

Image File Format Support

Wednesday, February 7th, 2007

This table summarizes the image file formats supported by various pieces of software. Although not included in the table below, the ImageMagick utility, available on most platforms, can convert among a long list of image file formats, allowing you to, for instance, convert a cineon sequence to a targa sequence for editing in Cinelerra.

Format Cinelerra Kino ffmpeg mencoder
JPEG R W R W R W R W
PNG R W R W R W R W
GIF - - R - R W2 - W3
TIFF R W R - - - - -
TGA R W R - - - R W
EXR R W - - - - - -
RAW R1 - - - - - - -

Cinelerra supports images for slugs or as image sequences, but requires a cinelerra specific table of contents file listing the images in your sequence. Kino can export still frames or sequences as JPEGs or PNGs. Kino imports image sequences and slugs via the FX > Create > Create From File option. ffmpeg and mencoder can convert image sequences into encoded video, as well as the opposite: converting an encoded video into an image sequence.

To convert a video to an image sequence via ffmpeg, you simply specify a supported file extension for the output, and use a printf expression (the “%03d” part ) as a substitute for the frame number. Thus the following will create a bunch of files named output-001.jpg to output-NNN.jpg where NNN is the last frame of you video. If you have more than 999 frames in your video, replace the “3″ in “%03d” with a larger number.

$ ffmpeg -i input.avi output-%03d.jpg

Unfortunately, there’s no documentation on how to control the compression level of the output images, so you may prefer mplayer.

To convert a video to an image sequence via mencoder (well, actually mplayer, but they’re part of the same package), you use the jpeg pseudo video-driver. See the -vo option in the mplayer manual for more information.

$ mplayer input.avi -vo jpeg

Details are available in the manual, but to force mplayer to output very high quality jpegs, you can include the quality option, like so:

$ mplayer input.avi -vo jpeg:quality=100

Converting an image sequence to a video in ffmpeg is pretty much the opposite in terms of syntax.

$ ffmpeg -i input-%03d.jpg output.avi

Converting an image sequence to a video via mencoder has different syntax. Note that the “-ovc lavc” is unrelated to the task at hand and may be different, depending on your output file format.

$ mendcoder mf://input-*.jpg -ovc lavc -o output.avi

Notes

  1. Cinelerra can only import RAW images for use as slugs, but it does allow you to manually adjust the gamma. It’s recommended that you render these slugs to a MOV clip for performance reasons.
  2. ffmpeg can write either animated GIFs or GIF image sequences depending on whether you use a printf expression (e.g. ‘%03d’) in the output file name.
  3. mplayer will only convert the output to an animated GIF, not a GIF image sequence.

Audio Container Format Support

Friday, February 2nd, 2007

The following table summarizes the audio container formats supported by some video software.

Container Format Cinelerra Kino ffmpeg mencoder
WAV R W R W R W R W
AIFF R W R1 - R W - W
AU R W R1 - R W - W
MP3 - W R1 W2 R W R -
OGG R W R1 W3 R W R -

Kino is capable of exporting a project’s audio to a WAV file natively, or various other formats using external tools. Using FX > Audio Filters > Dub, an audio file may be selected to replace the existing soundtrack, or using FX > Audio Filters > Mix, an audio file may be played simultaneously with the existing soundtrack. Both these techniques require you to specify the starting position of the sound as a number of seconds.

ffmpeg allows you to add a sound track to a silent movie file, you simply specify it as a second input:

$ ffmpeg -i input.wav -i input.avi output.avi

The same action in mencoder has the following syntax. Note that the “-oac lavc -ovc lavc” part of the command is unrelated to this task and may vary depending on your desired output.

$ mencoder input.avi -audiofile input.wav -o output.avi -oac lavc -ovc lavc

Notes

  1. Requires ffmpeg.
  2. Requires lame.
  3. Requires oggenc, provided by the vorbis-tools package on Fedora systems.

Video Container Format Support

Friday, January 26th, 2007

The following table summarizes the video container formats supported by some video software. Note the distinction between a codec and a container format: the more versatile container formats such as AVI or MOV can contain video encoded in any of a number of codecs.

Container Format Cinelerra Kino ffmpeg mencoder
Raw DV R W R W R W R W
AVI R W R -3 R W R W
MOV R -1 - - R W R W
MPEG-1 R W R W R W R W
MPEG-2 PS (VOB) - - R W - W R W
MPEG-4 -2 - R4 W4 R W R W

Notes

  1. Cinelerra writes “QuickTime for Linux” video files which may not be compatible with other tools.
  2. Cinelerra can read MPEG-4 audio from .mp4 files.
  3. Kino can write Raw DV in the DV AVI 1 or DV AVI 2 formats and supports OpenDML, also known as AVI 2.0.
  4. Supported via FFMPEG

Cinelerra Video Editor

Friday, January 12th, 2007

Cinelerra is the most sophisticated of the open source Linux video editing packages I’ve looked at. The developer describes Cinelerra as capable of turning an appropriately powerful Linux box into a “50,000 watt flamethrower of multimedia editing.” Although this is certainly hyperbolic (and the author has a penchant for the hyperbolic), Cinelerra is quite competent and is a serious tool.

On Fedora Core, Cinelerra can be installed in binary form using the rpm utility, but not via yum. Cinelerra loads a sufficiently broad variety of common video formats. While it advertises the ability to capture DV from IEEE 1394 sources, the configuration to make this work is non-trivial (I haven’t gone down that rabbit hole yet).

Cinelerra allows for three-point editing (defining in/out and insertion points) as well as cut-and-paste editing. Clips on the time-line can be extended, trimmed, and shifted by dragging their endpoints. Multitrack video is supported, allowing titles to be composited over video, or switching between views in a multiple camera shoot. Multitrack audio is also supported, allowing for the addition of a sound track or voice-over. Cinelerra also allows you to zoom and pan video tracks using a camera/projector system which provides support for more advanced compositing effects. A variety of video and audio filters are available, some of which, such as the pixel tracker and stabilization plugins, aren’t available in common commercial packages. Cinelerra can render to output formats appropriate for use in DVD and on the web.

However, Cinelerra is not as stable as Kino and has a reputation for crashes. The documentation is serviceable, but a bit thin. The interface supports common editing activities, but it’s a little weird in the way it does some things, e.g. making a section of a video track invisible, in order to reveal the track below, is done by “muting” it. Perhaps this is only a pet peeve of mine, but once clips are loaded to the time-line, they cannot be repositioned by dragging the clip itself, rather you must use the endpoint handles to push it around. Finally, the stated hardware requirements for Cinelerra are pretty heavy, although in my experience it will run acceptably well on much lighter systems.

To sum up, Cinelerra is the most functionally complete open source video editing solution for Linux that I’ve seen.

Kino Video Editor

Thursday, January 11th, 2007

Kino, unlike Blender, is expressly built as a video editor. The developers’ goal in building Kino is to offer “easy and reliable DV editing for the Linux desktop with export to many usable formats” (citation). I think they’ve hit that mark dead on.

Kino’s installation is trivial via yum on Fedore Core (sudo yum install kino). DV capture via IEEE 1394, AKA FireWire, works right out of the box. Kino offers a simplified interface where clips (called “Scenes”) are arranged in a vertical time-line (the “Storyboard”) along the left edge of the screen. Clips are re-ordered via drag and drop. Any clip can be trimmed non-destructively. Effects may be applied to clips and transitions can be made between clips, but these effects are rendered to new files and inserted as new clips rather than being applied in real time. The recent addition of the Superimpose and Titler video filters provide support for titiling and the ability to composite PNG based image sequences over your video. When the timeline is polished to your satisfaction, the export function allows you to write your video back to DV tape over your IEEE 1394 connection, or to create a variety of formats appropriate for VCD, DVD, or web distribution.

However, the simplified approach that makes Kino so responsive and stable also makes some things a little more difficult. Kino has no multitrack video support (aside from the Superimpose video filter). This makes certain editing styles more difficult to accomplish, for instance, in a recent project I needed to cross cut between two cameras that had been running simultaneously while using a sound track that had been recorded via DV tape. Cutting between the cameras using Kino would be an exercise in counting frames. Kino can’t work with a secondary sound track, so in this example the audio output would be cut between the two cameras, same as the video, constantly ping-ponging the audio levels. Finally, Kino presents a relatively sparse set of filters, which in turn limits its ability to create sophisticated visual effects.

In the final analysis, Kino is best suited to simple, straightforward video work. This is entirely consistent with its intended purpose as a consumer grade video editing package.

Blender as Video Editor

Wednesday, January 10th, 2007

Blender is primarily a 3D modeling and animation suite, so it may seem odd to include it in this discussion. Blender was developed as an application capable of all the tasks in a CGI production pipeline, so it provides a non-linear editing mode (the “sequence editor”) capable of most video editing tasks. On Fedora Core, installation of Blender is as easy as issuing the command “sudo yum install blender”.

Blender sports some extremely compelling features. Video sequences can be cut, trimmed, overlayed, and repositioned quickly and easily with single-frame accuracy. Blender’s node based compositing system allows for extremely sophisticated effects, color correction, and transitions. The latest release includes chromakey nodes, allowing for green-screen effects.

However, there is a long list of reasons Blender may not be ideal in certain situations.

  • has no video capture facilities, so Kino, dvgrab or some other utility is required to get video onto your workstation.
  • has no built-in facilities for managing your video clips, so you will need to carefully organize them yourself.
  • keeps track of time in terms of frame counts, quite natural for animators, but alien to video editors who primarily use SMPTE.
  • does not output a true 29.97 NTSC frame rate, which may make working with sound difficult. This is not an issue if you work in 24p video.
  • has only rudimentary support for sound in the sequence editor; again, quite satisfactory for animation, where sound is mastered separately, but it is not ideal for video editing.
  • the user interface presents a relatively steep learning curve, though there are clear benefits to productivity.

Because of Blender’s origins in animation and its impressive image manipulation facilities, it is ideal for highly stylized video. It’s probably not the best choice for the impatient beginner or simpler, more straight forward video.