Cooking with Linux - Lights...Camera...Action!
The resulting clip, which I called video_test.avi, can be played with Xine, Kmplayer, MPlayer or whatever video player you prefer.
Well, mes amis, my foray into video production on the cheap was a success, or so I thought. When I sent the video clip for approval, I was asked whether they could have it in MPG format instead. Rather than redoing what obviously was a great work of cinematography, I converted it using the following command:
ffmpeg -i video_test.avi video_test.mpg
As versatile as ffmpeg is, you certainly should spend a few minutes looking at the man page. I promise you'll discover a lot of really cool uses for it.
For those of you who already own a digital video camera, recording high-quality video is not a problem. The challenge is to get the video on your hard disk for editing, compressing and eventually burning to disk for sending to friends and family. I have a Sony Handycam. It comes with a USB port, but it also has a much faster means of getting the video transferred through a high-performance serial bus or, as most people know it, a FireWire port. The real techies out there refer to it as an IEEE1394 port. Your computer also needs to have such a port (or card) in order to transfer the information, but the performance of the IEEE1394 port truly is worth the investment.
To manipulate the resulting video in a friendly way, however, you need to get your hands on a video editor like Arne Schirmacher's Kino (see Resources). The dvgrab program, also available from the Kino Web site, is built-in to Kino so you don't need a separate copy. You see, mes amis, like xvidcap, Kino uses a few command-line tools under the pretty interface. One of those tools is our old friend ffmpeg.
These days, Arne has some great developers working on the project, and they have put together a rather nice and easy-to-use video editor for Linux. See the feature article on page XX. The beauty of Kino is that you can use it to extract and edit video directly from your IEEE1394-compatible video camera. If you have such a device, which can be connected with a FireWire cable, Kino even lets you control the device through the application. Before I continue on, let me step back and say something about the IEEE1394 support. Any recent Linux distribution should have IEEE1394 support included (through loadable kernel modules), but on my test system, the drivers weren't loaded automatically. No problem—I loaded them manually:
modprobe ohci1394 modprobe raw1394 chmod 666 /dev/raw1394
Getting your digital video across the IEEE1394 cable and onto your computer can be done easily from the command line with dvgrab. After all, that's what Kino does to capture video. Although you can type dvgrab and start capturing, the best way to do this is by using the -i option, meaning interactive. You then can control the camera and capture using simple single key presses.
dvgrab -i Going interactive. Press '?' for help. q=quit, p=play, c=capture, Esc=stop, h=reverse, j=backward scan, k=pause, l=forward scan, a=rewind, z=fast forward, 0-9=trickplay, <space>=play/pause Capture Started
We become accustomed to working with graphical interfaces, but this is a lot easier and nicer to use than it sounds. The resulting video file on your system is called dbgrab-XXX.avi by default, the XXX being a three-digit extension.
Kino's interface is clean and easy to navigate (Figure 4). To the right of the main window, tabs indicate the various functions, from capturing to editing to exporting the finished product. The Edit tab is where most of the work happens (after the Capture, of course). This is where you cut or join scenes, or even insert additional files in to your video project. The Timeline tab breaks up the current scene (and video clip) into multiple frames, so you can jump to any part of the video without having to play the whole thing.
An FX tab lets you add various special effects to your videos. These include things like reverse video, sepia tones, mirror and kaleidescope effects and so on. Audio effects include fade in, fade out and silence.
Once you start truly enjoying your digital video camera, you are going to record more than a few minutes of tape. The reason I mention this is that when you are capturing output from your digital camera with Kino, a number of large files will be created, each about 820MB in size and each sequential for the duration of the video. Those mega-files aren't what you want your final product to be, however. That's what the Export tab is all about. Various options are available here (in a group of sub-tabs) including exporting only the audio tracks to WAV files. I also like the fact that I can export stills of individual frames. The option I tend to use the most, however, is DV pipe, and this is where ffmpeg makes an encore appearance.
After all the editing, cutting and pasting is done, I export my finished product using ffmpeg to either video CD AVI files or DVD format. The resulting files (for example, VCD AVI format) are much smaller and much more manageable. One hour of digital video takes up about 9GB of disk space. The exported video, however, fits nicely on a single 700MB CD-ROM.
As you can see mes amis, your Linux system provides some great tools to make you, or your software, a star. Speaking of which, it seems as though closing time has arrived already and judging by the wine-induced smiles on some of your faces, we have the opportunity to capture some memorable video. I jest, of course. François, do be so kind as to refill our guests' glasses one more time. Perhaps what we should capture for posterity is our parting toast. Until next time, mes amis, let us all drink to one another's health. A votre santé Bon appétit!
Resources for this article: www.linuxjournal.com/article/7808.
Marcel Gagné (mggagne@salmar.com) lives in Mississauga, Ontario. He is the author of the all new Moving to the Linux Business Desktop (ISBN 0-131-42192-1), his third book from Addison-Wesley. In real life, he is president of Salmar Consulting Inc., a systems integration and network consulting firm. He is also a pilot, writes science fiction and fantasy, and folds a mean origami T-Rex.
Today’s modular x86 servers are compute-centric, designed as a least common denominator to support a wide range of IT workloads. Those generic, virtualized IT workloads have much different resource optimization requirements than hyperscale and cloud applications. They have resulted in a “one size fits all” enterprise IT architecture that is not optimized for a specific set of IT workloads, and especially not emerging hyperscale workloads, such as web applications, big data, and object storage. In this report, you will learn how shifting the focus from traditional compute-centric IT architectures to an innovative disaggregated fabric-based architecture can optimize and scale your data center.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
Free Webinar: Linux Backup and Recovery
Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.
In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
| Non-Linux FOSS: Seashore | May 10, 2013 |
| Trying to Tame the Tablet | May 08, 2013 |
| Dart: a New Web Programming Experience | May 07, 2013 |
- New Products
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Drupal Is a Framework: Why Everyone Needs to Understand This
- A Topic for Discussion - Open Source Feature-Richness?
- Home, My Backup Data Center
- RSS Feeds
- New Products
- Trying to Tame the Tablet
- What's the tweeting protocol?
- Dart: a New Web Programming Experience





1 hour 29 min ago
4 hours 2 min ago
8 hours 41 min ago
11 hours 3 min ago
1 day 3 hours ago
1 day 6 hours ago
1 day 7 hours ago
1 day 8 hours ago
1 day 8 hours ago
1 day 13 hours ago