The Video Software

The Video Software

The one thing that can be said about working with video is that the files are not small. In fact, depending on the codec, video can consume from 500MB to 10GB (giga bytes!) for only 30 minutes of video. Uncompressed frames require much more space. Consider how much space is needed when you are capturing images at 640 x 480, 30 times a second in full color. This is your data rate, and it can range from 1MB to 11MB per second, sometimes less, sometimes more, depending on your drivers, the hardware, and the codec.

Because of the amount of data being moved around in your system, you will want a beefy system. My system is beefy enough to be suitable for nonlinear video editing. Nonlinear means that you have random access to any part of a video without having to wait for a tape to fast forward or rewind. This almost always means a computer is involved. I'll get into editing video later in the chapter, but first we have to capture the video and store it on a hard disk. For this we'll use tools that are Video4Linux compatible and that work for my hardware configuration and, hopefully, yours.

Drivers

Before you begin your video production project you'll need to do some research on the available drivers for your specific video setup. My setup included a standard video camera, nondigital interface, so I needed a video capture card to add to my system. Because there are so many video capture cards available, it's a wise thing to research which of these cards a Linux driver is available for. Otherwise, you might get stuck with an unsupported video capture card and no way to get the video from your camera into your PC.

My research began by looking on the Web for video capture devices supported under Linux. Google produced many results, as any good Web search engine should. What I found were a lot of cards based on the same chip sets. Chip sets are basically the chips on the video capture card that make it work. The most common driver I found was for the BTTV chip set. I also found a card called the LML33 from Linux Media Labs. Eventually I settled on a card that met my budget requirements, the Pinnacle Systems Studio DC10 Plus. I found the driver at this Web site: http://www.cicese.mx/~mirsev/Linux/DC10plus/ . A search on www. freshmeat .net for "DC10" will also get you to the driver's home. The driver has been integrated into the MJPEG Tools project, so get the latest driver from that Web site.

The current author of the driver, Sergei Miridonov, was kind enough to help me with kernel recompiling issues. Once I got past the fact that my RedHat 7.0 kernel was a modified kernel, I downloaded and compiled an official kernel ( http://www.kernel.org ) and got to work on my video project. The driver for the DC10+ card is not yet part of the official Video4Linux set of drivers. It is Video4Linux compliant, with extensions to provide MJPEG compression and decompression (the codec I mentioned earlier). The tools I will use to capture and play back my video create both Quicktime and AVI file formats.

Capture and Playback Tools

There are several tools for capturing and playing back video under Linux. The tool set you use will be determined by the capture/playback device you have and the device drivers. In addition, codecs play a large part in the tools you will use. Some tools support only specfic codecs. I'm using the MJPEG Tools package, since it supports my hardware with drivers and applications. Within the MJPEG Tools package is a set of tools called lavtools, used to do the actual capture and playback of video.

The Linux Audio Video Tools is a package of command line tools for working with video. The two main command line programs are lavrec, for capturing video, and lavplay, for playing video. There are other utilities in the package as well, but these two will be used the most.

In order to simplify my projects, I always like to create simple shell scripts to keep me from making typing mistakes at the command line. Plus, since the parameters are usually the same every time I run the lavrec command, it just makes sense to keep it simple. After playing around with different parameter settings, I settled on the following script, called vidrec:

 lavrec -t -in -fq -d1 -q50 -a16 -s -r44100 -l-1 -Rl -w /clips/.mov 

lavrec has many command line options, which are defined in the source file, lavrec.c. I have used the following command line options:

-t

Record for a specific number of seconds

-i

Input source (composite vs. SVHS, PAL vs. NTSC or SECAM, etc.)

-f

Output file format (AVI, Quicktime, etc.)

-d

Used to set the decimation

-q

Quality setting

-a

Bits resolution for audio (0, 8, or 16)

-s

Enable stereo audio

-r

Audio sampling rate (44,100 Hz for CD-quality sound)

-l

(That's a lowercase L ) Recording volume (-1 to use mixer setting)

-R

Audio recording source (line, microphone, or CD-ROM)

-w

Wait for me to get ready

I pass only two parameters to my shell script, the filename and the number of seconds I want to record. In my shell script, I automatically place video files on my hard disk in the /clips directory.

lavplay will play back your video file by sending the output to the video output port of the frame grabber board. If you have this connected to the video-in RCA jack on your TV or VCR, you should see the video playback on your TV. If not, check your VCR's recording source. The geometry and decimation parameters I have in my vidrec script make the video playback full screen. Playback was nice and smooth.

So far, all we've done is capture and play back video with our frame grabber device. The real fun begins when you take all your separate video clips and put them together, insert some clever transitions betwen them, add some music, a voice-over, and precede it with a fancy title and you've got yourself a full-fledged video production on your hands. To make this masterpeice, you'll need nonlinear video editing software.

Nonlinear Editing Tools

Nonlinear video editing is a very CPU- and memory- intensive process. The slowness of your processor and the amount of memory you have will limit the size of your projects. So what does nonlinear mean? It simpy means you don't have to fast-forward and rewind a tape to get to a point on a video. In other words, you have random access. Later in the chapter I'll tell you more about what tools are available. To get you started making your own video, the next section will be a very high-level conceptual overview of how you might put together a video using the tools I've talked about so far.

 



Multitool Linux. Practical Uses for Open Source Software
Multitool Linux: Practical Uses for Open Source Software
ISBN: 0201734206
EAN: 2147483647
Year: 2002
Pages: 257

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net