LWN.net Logo

Development

Video editing in Linux, it *is* possible

November 21, 2006

This article was contributed by Carl Bolduc

Video editing is probably one of the last areas where Linux is still lagging behind proprietary operating systems. I have used Linux almost exclusively for the last few years, except for video editing where I still use Windows. That is about to change.

My goal was to build a video box that would let me grab video from my digital video (DV) camera, edit scenes with features such as transitions, and create full featured DVD recordings. My hardware is very low end for this kind of task and it has proven to be extremely slow under Microsoft Windows. The test machine featured a 1.3GHz AMD Duron processor, 512 MB of RAM, a 4X single layer DVD burner and a Pinnacle firewire video capture card. Due to my low-end hardware, I decided to install the Slackware 11 distribution. Slackware is known for good performance on limited hardware.

Capturing Video

The initial requirement for a video editing system is the ability to capture the video data. Two choices were available: Kino and dvgrab. Kino is easy to use and even allows you to control your DV camera from a nice GUI interface. Kino requires some GNOME libraries, but Slackware does not provide them out of the box.

I chose to use dvgrab for video capture, it operates with a very simple to use command line interface. For installation of dvgrab on Slackware, you will need to install the following packages (available here): libiec61883, libraw1394, libavc1394, libdv, libsamplerate and dvgrab. Once installed, dvgrab complained about the lack of the IEE1394 interface, /dev/raw1394. Fixing that problem involved creating two device nodes:

    mknod /dev/raw1394 c 171 0
    mknod /dev/video1394 c 172 0

Finally, due to a permission issue, I opted to use the root account for capturing video with the following command:

    dvgrab video_file_name

The ownership of the resulting video file was then changed to my regular user for further processing.

Video Editing

The next step, and the most complex one, is video editing. The only effective video editor that I found was Cinelerra CV (community version). Until recently, Cinelerra was very unstable software and was not an attractive solution. You had to save very often because of the high risk of crashing. With the latest release, I experienced absolutely no crashes, and I performed some very wacky editing tricks with the software.

The installation process for Cinelerra CV is not trivial if you decide to compile the source yourself. Luckily, the latest version and its dependencies are available for Slackware 11. Selected packages include: faac, faad2, fftw, jack, lame, liba52, libdv, libquicktime, libsndfile, libx264, mjpegtools, openexr and cinelerra.

The Cinelerra interface can be rough at first, but after a few hours of editing you will discover that it is rather usable. Basically, you just import the videos obtained through dvgrab, create clips from the video files, drag the desired clips to the various tracks, insert transitions, apply effects, and finally render your work.

The Cinelerra wiki offers a clear explanation on how to use the various components of the software. You can do tasks such as compositing various video tracks and using multiple audio tracks for dialogs, music, narration and more. Unlike various commercial video editing solutions on the Windows platform, it is not necessary to pay fees for incremental features, such as using a second video track.

Rendering the video

Once you are satisfied with your work, it is time to render everything to a file format that will work with DVD players. Since this step is a tricky and frustrating one, I provided the various steps (also available in the Cinelerra CV wiki) that you need to perform to reach success:
  • Create a script ~/cine_render.sh with the following two lines:

    #/bin/bash
    mpeg2enc -v 0 -K tmpgenc -r 32 -4 1 -2 1 -D 10 -E 10 \
             -g 15 -G 15 -q 6 -b 9400 -f 8 -o $1
    

  • Add execute permissions to the script:

        chmod +x ~/cine_render.sh
    

  • Open Cinelerra, and select the part of the video you want to render with the [ and ] points.

  • In Cinelerra, press Shift+R to bring up the render menu.

  • Select the "YUV4MPEG Stream" file format.

  • Deselect "Render audio tracks" and select "Render video tracks".

  • Click on the wrench that shows up near the word Video.

  • In the newly opened window, indicate the name of the m2v file that you want to create. The m2v file will contain only the video.

  • Click on "Use pipe" and enter the path of the previously created script:

        /home/[your username]/cine_render.sh %
    
  • Click OK to close the second window, and OK again to render your m2v file.

  • After the m2v file has been rendered, open the rendering window again and render an ac3 audio file, choose the 224 kbit/sec sampling rate.

  • Finally, combine the audio and video tracks with this command:

        mplex -f 8 your_video_file.m2v your_audio_file.ac3 \
              -o video_audio_file.mpeg
    

The resulting mpeg file should be compatible with commercial DVD players.

Creating a DVD

You now have the data to create a DVD. Several tools are available for this task, but ManDVD stands out as being very easy to use and full of features. To use this application, you will need to install the following Slackware packages: mplayer, ffmpeg, transcode, libdvdread, dvdauthor, dvd-slideshow and mandvd.

ManDVD allows you to write DVDs. It featuring animated menus and can be operated without touching the command line. ManDVD can burn the final product directly, or it can use K3b for this task. In my case, K3b failed to create a working DVD, so I recommend burning directly from ManDVD.

Afterthoughts

Two new gstreamer-based video editing solutions are being developed at the moment, diva and PiTiVi. These two projects will eventually provide simple out of the box solutions for the various steps involved in movie creation. PiTiVi will also introduce some exciting new features, such as post-processing of screencasts created with Istanbul and collaborative video editing via bittorrent. The Diva and PiTiVi projects are under heavy development and would benefit from the help of additional hackers.

Until those new alternatives become usable, you will need to rely on a combination of specialized tools to fulfill your video editing needs. With a minimum of pain and time, it is now possible to create professional looking home movies using an entirely free solution running on the Linux platform.

Comments (17 posted)

System Applications

Database Software

PostgreSQL Weekly News

The November 19, 2006 edition of the PostgreSQL Weekly News is online with the latest PostgreSQL DBMS articles and resources.

Full Story (comments: none)

Printing

Common UNIX Printing System 1.2.7 announced

Version 1.2.7 of CUPS, the Common Unix Print System, has been announced. "CUPS 1.2.7 adds several Mac OS X improvements, implements timeouts in the SSL negotiation code, and fixes the bounding box generated by the PostScript filter, bidirectional support in the USB backend, and another case where the lpstat command could hang."

Comments (none posted)

Web Site Development

Zope News

The November 1-15, 2006 edition of Zope News is online with coverage of the Zope web development platform.

Comments (none posted)

Desktop Applications

Audio Applications

eSpeak 1.17 released

Version 1.17 of eSpeak, a speech synthesizer, is available. Changes include new support for the Finnish, Portuguese and Dutch languages and makefile improvements.

Comments (none posted)

GLASHCtl 0.4.0 announced

Version 0.4.0 of GLASHCtl is out with new capabilities. "This is a simple applet for controlling the LASH Audio Session Handler. When you run it it will appear as a small LASH icon in your "notification area" or "system tray"".

Full Story (comments: none)

Jokosher 0.2 released

Version 0.2 of Jokosher, an audio editor, has been announced. "The Jokosher team are proud to announce the second pre-release of their simple yet powerful audio studio for the GNOME desktop. The new 0.2 version of the software has been in active development since July, and has packed Jokosher with the core features to perform full audio recording and production on the Linux desktop."

Comments (none posted)

Data Visualization

Data Plotting Library DISLIN 9.1 released

Version 9.1 of DISLIN has been announced. "DISLIN is a high-level and easy to use plotting library for displaying data as curves, bar graphs, pie charts, 3D-colour plots, surfaces, contours and maps. Several output formats are supported such as X11, VGA, PostScript, PDF, CGM, WMF, HPGL, TIFF, GIF, PNG, BMP and SVG. The software is available for several C, Fortran 77 and Fortran 90/95 compilers. Plotting extensions for the interpreting languages Perl, Python and Java are also supported ..."

Comments (none posted)

Desktop Environments

GNOME Software Announcements

The following new GNOME software has been announced this week: You can find more new GNOME software releases at gnomefiles.org.

Comments (none posted)

KDE Software Announcements

The following new KDE software has been announced this week: You can find more new KDE software releases at kde-apps.org.

Comments (1 posted)

KDE Commit-Digest (KDE.News)

The November 19, 2006 edition of the KDE Commit-Digest has been announced. The content summary says: "KTorrent supports the creation of trackerless torrents, with work beginning on a web-based management GUI. Support for browsing the SHOUTcast webradio listings in Amarok. Work starts on a new Planner Summary plugin for Kontact. KDissert is renamed Semantik. Maps of more countries added to KGeography. Version 2 of Kallery, a web image gallery creator, is imported into KDE SVN. Qt3 and KDE 3 Java bindings are removed from KDE SVN, superceded by the developments of Qt Jambi."

Comments (none posted)

KDE e.V. Quarterly Report (KDE.News)

KDE.News has announced the July-September, 2006 edition of the KDE e.V. Quarterly Report (PDF). "Topics covered include the outcomes from the 2006 membership meeting, the status of the Technical Working Group's improved charter, the new press channel from the Marketing Working Group and for the first time a report from the Sysadmin Team."

Comments (none posted)

Electronics

eispice 0.7 announced

Version 0.7 of eispice is available with new features and bug fixes. "eispice is a ground-up re-write of the Berkley Spice 3 Simulation engine in the form of a Python Module. It contains a subset of standard spice device models and a set of unique models that are targeted towards High Speed Digital Design.

Comments (none posted)

GUI Packages

The initial release of PythonQt

The initial release of PythonQt has been announced. "PythonQt is a dynamic and lightweight script binding of the Qt4 framework to the Python language. It can be easily embedded into Qt4 applications and makes any QObject derived object scriptable via Python without the need of wrapper code generation. The first public beta release is available as source code under the LGPL license."

Comments (none posted)

Medical Applications

Foundational Model of Anatomy Ontology released as open-source (LinuxMedNews)

LinuxMedNews reports on the open-source release of the Foundational Model of Anatomy (FMA) Ontology. "From the announcement: 'In response to the increasing demand from the life science and biomedical informatics communities and the private industry for an anatomy ontology that can empower computer applications in biomedicine and provide a basic science framework for the integration of biological data from different sources, the University of Washington and the FMA Ontology Research team hereby release the open source license for the Foundational Model of Anatomy (FMA) ontology and grant licensees a perpetual, worldwide, non-exclusive, no-charge, royalty-free, copyright license to reproduce, publicly display, publicly perform, prepare modifications of, and distribute the FMA ontology with or without modifications."

Comments (none posted)

Music Applications

Musical MIDI Accompaniment 1.0 announced

Version 1.0 of MMA, Musical MIDI Accompaniment, has been announced. "Included in this release: Minor changes in the install scripts, Command line option cleanup, Minor bug fixes. MMA is a accompaniment generator -- it creates midi tracks for a soloist to perform with."

Full Story (comments: none)

Languages and Tools

Caml

Caml Weekly News

The November 21, 2006 edition of the Caml Weekly News is out with new Caml language articles.

Full Story (comments: none)

Lisp

Common Lisp Directory

The Common Lisp Directory has been launched. "The Common Lisp Directory (CLD) is a large and growing database of software and resources. It lists both open source and commercial Common Lisp software, for any operating system and implementation. It currently includes over 1000 entries and has almost 800 registered users."

Full Story (comments: none)

Perl

This week on the Perl 6 mailing lists (O'Reilly)

The November 12-18, 2006 edition of the Weekly Perl 6 mailing list summary has been published, take a look for the latest Perl 6 discussions.

Comments (none posted)

Python

Dr. Dobb's Python-URL!

The November 20, 2006 edition of Dr. Dobb's Python-URL! is online with a new collection of Python article links.

Full Story (comments: 1)

Tcl/Tk

Dr. Dobb's Tcl-URL!

The November 21, 2006 edition of Dr. Dobb's Tcl-URL! is online with new Tcl/Tk articles and resources.

Full Story (comments: none)

Build Tools

The web-enabled version of Mconfig

A web-enabled Linux kernel configuration utility is available for building 2.4.X kernels. "Mconfig is a tool to configure the linux kernel, similar to make {menu,x} config, but written in C and with a proper yacc parser. This program is an http server "wrapper" around mconfig that makes kernel configuration, development and building completely web enabled. Links to configuration options, source files, kernel documentation and kernel driver information can be managed from a web browser using hyper links."

Full Story (comments: none)

IDEs

eric3 3.9.2 released

Version 3.9.2 of eric3, a Python and Ruby editor and IDE has been announced. "This is bug fix release with some new features"

Comments (none posted)

Miscellaneous

MCPP 2.6.2 released

Version 2.6.2 of MCPP, a portable C/C++ preprocessor, is available with bug fixes and other enhancements. See the release notes for more information.

Comments (none posted)

Page editor: Forrest Cook
Next page: Linux in the news>>

Copyright © 2006, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds