media

Linux video editing... is quite possible

Archived in

So, you're a Linux user and you want to process some footage, be it of your mom's birthday or perhaps your own humble video project. You don't want to resort to Windows (or obviously a Mac for that matter) which are supposedly (and probably) easier platforms to edit video.

Give it a shot with your Linux system first. I've no experience capturing video from a digital camera yet, but that should be possible with Kino. I have a simple digital photo camera which can record videos in XVID/MP3 format, or so KDE tells me. I took some random shots with it over the years that I have all saved, so I figured I might experiment with these recordings for a bit, since I plan to do more video editing in the future to process old VHS tapes to digital storage.

Avidemux

The first program I tried was Avidemux. This program allowed me to cut up, stick together and apply certain visual changes to videos. One feature I needed Avidemux for was the altering of the frames per second. The first editing program that I used got into trouble when video samples had a frame rate that wasn't exactly 25 per second. Avidemux can also alter the image by adding filters. These filters can do things like resize the image, add colours to it, blur the image, sharpen the image, add scan lines to it, add subtitles or even add a whirl effect to the video. The most useful application of Avidemux is perhaps the possibility to convert a video to another video (and audio) format.

The Open Movie Editor

Another interesting program is the Open Movie Editor. This software is designed to be an editor rather than a conversion utility. It allows for quick and simple placing of video samples on a time line, while cutting them up or arranging them into a proper sequence. Audio tracks can be added in the same manner. Transitions between scenes (i.e. inserted video files or cut up samples) can be achieved very easily by letting two scenes overlap for a number of seconds. By doing this the overlap becomes visible in the timeline and when the video is played the one part of video is automatically faded into the other. I had some trouble finding an audio and video codec that would actually save the video sequence to a file that was properly readable. The probable cause of this is that I used a precompiled version and not too many codecs were installed or detected the right way by the Movie Editor.

Kdenlive

Because of this I tried another editor, named Kdenlive. I finally settled on this one because

  1. it exports videos properly, providing many audio and video codecs
  2. sports a couple of effects/ transition types by default
  3. is a KDE application and is therefore graphically integrated and translated into Dutch (I like consistency)

The only disadvantage in my case was that for some yet unexplained reason Kdenlive would crash every now and then, but saving the project regularly takes care of that. This is probably again because of the fact that I used a pre-compiled version. I know it's not a good excuse but everyone deserves to be lazy every now and then. Usually I compile software myself, but because I'm now using Kubuntu on a laptop in stead of my usual Slackware set up this makes it very tempting to apt-get everything.

The results

I've uploaded two of my experiments to YouTube, so anyone reading this can admire or ignore the results of my video editing adventure. The first video shows some of the (very bad quality and out of focus) material which I recorded with my photo camera while moving, using transitions and some other effects. Eventually I used Kdenlive for this, but I achieved about the same using the Open Movie Editor.

The second one (also made with Kdenlive) is a recording of people walking down a shopping street. It's been slowed down, a "charcoal" effect has been applied to it, and the beginning and ending of the video demonstrate the blur effect.

I have probably missed out on a lot of alternatives, but these are the tools I've chosen to use for now, and Kdenlive does the job quite nicely. Finally I've taken some screenshots of the three programs that I tried:

Avidemux 2, for all your video conversion needs The Open Movie Editor, simple and easy Kdenlive, versatile and made for KDE

Media database and storage

Archived in

Scenario: Several hundreds of gigabytes of hard disk space occupied, even after "consolidating" to regain some of it.
Solution: Be a good little consumer and get a high capacity network storage drive.

Database

I had already set up a simple database using OpenOffice.org Base to keep track of the movies that I had. My plan was to use a MySQL database and a simple webpage to maintain and access basic information about my movies. Converting it to a MySQL database wasn't too easy. Eventually I figured out that Base allows to export each table to a comma seperated value file. These can then be easily imported using phpMyAdmin.

I had already organised my files to have decent filenames that only have underscores, periods and alphanumeric characters. This meant I was able to easily generate a path to the movies in the browser window. I found out that it was possible to create animated GIF images in a very useful post by Richard Goodwin. I created a simple shellscript which quickly generates a thumbnail sized image for each movie:

for film in *.avi *.mpg *.mpeg *.ogm *.mp4
do
B=`basename $film`
mplayer $film -vo gif89a:output=/home/mrutten/desktop/mdb/voorbeelden/$B.gif:fps=3 -vf scale=200:133 -frames 300 -saturation +10 -nosound -ss 00:15:00
sleep 1
done

This script creates a short animated image which skips several frames to not make the gif animation too big (even though the preview image directory now amounts to several hundreds of megabytes).

Besides the movies that I have, I also wrote a similar page to show the contents of my Amarok MySQL database. This allows me to browse through my music collection using a webpage.

Storage

Even though I had purchased an extra 200 gigabyte hard disk in the past, it wasn't enough to store all of my blatently pirated movies. I could have deleted half of them, but I hadn't the heart to do that. In stead I got a Western Digital MyBook World II. That's a long name for a tiny Linux server containing two 500 gigabyte hard disks that I left configured in its 1 terabyte raid 0 state. It also has a flashy Mac-like appearance. I'm well aware that I'm going to run out of space again eventually, but procrastination is my second nature, so I'll rethink my strategy when that day comes. Considering I now have an extra 1000 gigabytes on my hands, that day shouldn't come anywhere in the next year or two.

To activate SSH on this box I used the instructions on Martin Hinner's page on hacking the Western Digital MyBook World Edition. Although I'm able to mount the Samba shares that I create on the MyBook fine, SSH seems to be more stable (although slower) and it enables me to access it from any place outside my network in a reasonably secure way. I can use SSH by mounting the SSH location to a static directory on the local hard drive, or I can just browse the machine using the fish kioslave in KDE.

The one-terabyte-container Viewing movie list in Konqueror Movie database list Movie database detail Music database list Music database detail