AVI Movie Players and Capture
Last month we tried some MPEG players, including aKtion, gmpeg, gxanim, MPlayer, plaympeg, XAnim, xine and Xtheater. We also looked at the Be operating system in order to compare its video capabilities with Linux.
Our goal this month is to look at the AVI players aKtion, Aviplay, MPlayer and XAnim. We will also capture some AVI files using Video4Linux and XawTV or QtVidcap.
AVI (audio video interleave) is one of the most common formats for video files on PCs. The AVI file format and the RIFF format (resource interchange file format) generally, were defined by Microsoft and IBM back when they were still friends. The Microsoft audio WAV format is another variant of a RIFF file. The RIFF format was based upon IFF, a format standard on the Amiga. When seeking information about the AVI format, a good place to start is John McGowan's “AVI Overview”, available at www.jmcgowan.com/avi.html or www.faqs.org.
Internally, video files are chunks of interleaved pictures and audio. To play a video, those chunks are read sequentially one after the other by a video player and mixed together in a way that makes them appear seamless. Typically, audio playback is the reference and the video picture is synchronized to it. Variations in audio playback rate would be discernible as wow and flutter, but slight variations in video playback framerate are not apparent.
Video file formats rely upon two easily confused concepts: transports and codecs. A transport is the structure that describes the chunks of audio and video that follow. AVI, MPEG and QuickTime are all examples of transports. Within the transport, each compressed chunk of video or audio must be read using a codec that understands the particular scheme of that chunk. Examples of video codecs include Cinepak and Indeo. AVI sound codecs may be PCM, ADPCM, GSM or many others. If you have what seems to be a perfectly good video file, but your video player only plays the video or audio part, it is probably because you are missing a codec. Players are designed to skip over things in the transport they don't understand.
WMP (Windows Media Player) is the movie player included with Windows. It uses installable codecs that work as plugins, called dlls (dynamic link libraries). If you develop a new Windows codec, your video or audio can play back in WMP. For Linux codec developers, this means it is feasible to port your code to Windows as a plugin, so that files created with open formats in Linux can be viewed in the proprietary Windows player. Conversely, some Linux video players are able to use Windows plugins and will play proprietary Windows formats in otherwise open Linux players. It is therefore possible to deliver a single plugin that will work for both Linux and Windows, at least on Intel.
AVI files identify their embedded codecs using a magic number called a FOURCC code. This four-byte id is how the AVI transport knows what codec to load in order to play a stream. To guarantee uniqueness, the FOURCC must be registered with Microsoft. The unofficial but “Almost Definitive” FOURCC Definition list is kept at http://www.webartz.com/fourcc/ and provides a lot of good information.
It is widely believed that AVI files can't be larger than 2GB or used for professional video applications, but that's not really true. The main reason for the file-size limitation is that a RIFF block uses a 32-bit integer to describe its size. You may hear this alternately referred to as a 1GB limit because a bug in the early Microsoft Video for Windows code made that (huge at the time) the limit. Because an unsigned 32-bit integer can also contain 4GB, you may see that number suggested as a maximum, too—4GB also happens to be the limit for the FAT16 filesystem.
The original AVI file spec only permits one RIFF chunk per file. The obvious fix to the size limit was to allow multiple RIFFs in one file. At the urging of Matrox, that's what the Open Digital Media (OpenDML) Consortium did when it created the OpenDML AVI file format extensions. The spec is available from a link in McGowan's AVI Overview. OpenDML AVI support has been reportedly contained in Matrox's DigiSuite software and in Microsoft WMP since version 5.1.
Recently, AVI is losing steam to new formats available from Microsoft; advanced streaming format (ASF) and later Windows Media Format (WMF) were added in WMP 7. Microsoft has tested WMF files as large as 30GB, but they can theoretically hold 17 million terabytes. For audio files, the file extension is wma, for video, wmv.
Practical Task Scheduling Deployment
July 20, 2016 12:00 pm CDT
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.Register Now!
- SUSE LLC's SUSE Manager
- My +1 Sword of Productivity
- Tech Tip: Really Simple HTTP Server with Python
- Managing Linux Using Puppet
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- Non-Linux FOSS: Caffeine!
- Returning Values from Bash Functions
- Rogue Wave Software's Zend Server
- Doing for User Space What We Did for Kernel Space
- Parsing an RSS News Feed with a Bash Script
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide