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.
Fast/Flexible Linux OS Recovery
On Demand Now
In this live one-hour webinar, learn how to enhance your existing backup strategies for complete disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible full-system recovery solution for UNIX and Linux systems.
Join Linux Journal's Shawn Powers and David Huffman, President/CEO, Storix, Inc.
Free to Linux Journal readers.Register Now!
- Firefox 46.0 Released
- Ubuntu Online Summit
- Devuan Beta Release
- The Qt Company's Qt Start-Up
- The US Government and Open-Source Software
- May 2016 Issue of Linux Journal
- The Death of RoboVM
- New Container Image Standard Promises More Portable Apps
- Open-Source Project Secretly Funded by CIA
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
In modern computer systems, privacy and security are mandatory. However, connections from the outside over public networks automatically imply risks. One easily available solution to avoid eavesdroppers’ attempts is SSH. But, its wide adoption during the past 21 years has made it a target for attackers, so hardening your system properly is a must.
Additionally, in highly regulated markets, you must comply with specific operational requirements, proving that you conform to standards and even that you have included new mandatory authentication methods, such as two-factor authentication. In this ebook, I discuss SSH and how to configure and manage it to guarantee that your network is safe, your data is secure and that you comply with relevant regulations.Get the Guide