FOSS CODECS OVERVIEW
FOSS Codecs Overview
Research question: What FOSS codecs are currently available and how do they compare?
The research project intends to recommend the use of one or two combinations of FOSS audio/video containers and codecs for use within the Transmission network and beyond.
Factors considered in this comparsion will include:
- Development community and future potential
- Future relevance due to external factors
- Support or potential for support in players, transcoders and browsers
- Relative quality of results (quality-compression ratio) to proprietary codecs and formats
- Efficiency - time to encode
- CPU load on playback / encode - compatibility with older/low-powered machines
- As-is potential for use by Transmission network members, and future potential given more development in terms of usability
- Ability to embed metadata within the video-file such as license info
- Only on-demand or online accessible archive-suitable formats/codecs will be considered rather than "live-streaming" as this is the primary usage of the Transmission network at present
This area of research will involve reading and referencing the substantial amount of existing research and comparisons between FOSS audio/video codecs.
FOSS Codecs Existing Info and Research
Chapter by Jaromil - "Video Streaming Across Wide Area Networks" for Video Art Collection of Montevideo. This concentrated on an appropriate codec to use for streaming video - on-demand or programmed, as opposed to downloadable video files. This meant that future developments are not so important as the video collection could be re-encoded in the future. Transmission members need to be encoding into a format that will be playable in future, as the files are downloadable and may be archived by individuals and organisations around the world.
A comparison was made between Mpeg4, Theora, H.264/AVC and XviD.
His chapter supports the use of Theora:
"It is popular among the open source community and its the video codec advocated by the Free Software Foundation."
And claims it will be supported by hardware devices soon:
"It‘s foreseeable that we‘ll have more hardware players capable of Theora video playback: manufacturers obviously prefer this codec as they can freely include it into hardware devices to have video playback without being burdened by patent expenses. The streaming server providing best support for Theora"
http://www.atomicmpc.com.au/article.asp?SCID=&CIID=82898 - Everything you ever wanted to know about video codecs 2007 article
FOSS Audio/Video Containers
The Ogg container format is developed by the Xiph.org Foundation and is patent free technology as well as FOSS. Ogg may contain audio and video in Xiph codecs such as the Theora (video) and Vorbis (audio) codec as well as FLAC (lossless audio) and Speex (audio codec for speech). As with most container formats it encapsulates raw compressed data and allows the interleaving of audio and video data inside a single convient format.
The Schrodinger project is currently implementing the BBC Dirac codec into Ogg also.
"In addition to encapsulation and interleave of multiple data streams, Ogg provides packet framing, error detection, and periodic timestamps for seeking, and in a small, bounded percentage bitrate overhead.
Ogg is a stream oriented container, meaning it can be written and read in one pass, making it a natural fit for internet streaming and use in processing pipelines. This stream orientation is the major design difference over other file-based container formats. "
Fork of Ogg hacked to contain codecs not endorsed by Xiph
FOSS Video Codecs
There are open-source codecs based on MPEG 4 ASP, H.264 and new wavelet-based compression. Only lossy codecs are considered, as lossless codecs do not provide a high enough compression ratio and result in files that are too large for online purposes.
- Xvid - MPEG4 ASP
- Theora - based on vp3
- Tarkin - wavelet codec developed by Xiph - suspended
- Dirac - BBC wavelet
- x264 - based on H264
- FFmpeg re-implementations of various codecs
- Snow - ffmpeg project lossy/lossless experimental codec
Snow is a wavelet codec being developed by Michael Niedermayer at the ffmpeg project. It is an experimental codec that can be used for lossy and lossless compression and is apparently at a higher level of development than the Dirac codec at the BBC.
As it is in early stages of development, and is not currently supported by many players, encoders or hardware devices it is not recommended for use by Transmission members at present. In fact it is strongly recommended not to use it as the codec may change dramatically and may not be backwards compatible with previous versions.
It is definitely worth keeping an eye on for the future, however.
Opensource impelementation of H264.
Wavelet based codec by Xiph - suspended to concentrate on Theora.
- open-source fork of Chinese patented AVS codecs - no encoders available yet
from J: "also its worth mentioning that with the latest release of the quicktime component its possible to export to Ogg Theora; this works from quicktime pro/iMovie/Final Cut, there needs some work to be done on the settings dialog, but the basic things are in place. (http://xiph.org/quicktime/)
one major limitation of the current XiphQT component is that it does not support resizing the media on export, for final cut one can work around that by creating a new sequence with the right resolution and adding the sequence one wants to export in that export sequence, scaling it to the right dimensions.
the quicktime plugin is also available on windows, but would need additional work to provide the export feature - with that it should be possible to export from programs like adobe premiere, the other option is to investigate what needed to use the DShow filters. "
Xvid is a GPL video codec library following the MPEG-4 standard. This codec was designed to be used with the early Windows .avi format, but may also be used with other formats such as Quicktime .mov by using a Quicktime component.
Xvid orginated from the DivX codec, a proprietary format which was itself a commercialisation of a hack of the Microsoft MPEG-4 Version 3 video codec. The first DivX codec reached huge popularity amongst DVD-rippers, especially in conjunction with the VirtualDub encoder and its deriatives. DivXNetworks, the company who took over development of DivX launched an open-source arm of development called OpenDivX but subsequently excluded open-source developers from getting involved.
In 2001 these developers formed a fork of the project named Xvid and released it as GPL. Unfortunately legal problems due to patent issues still persist, which has meant that binaries of the XviD codec have not been able to be officially released in some countries and have thus been harder for users to find and install.
There is a list of links in the download section of xvid.org for binaries hosted on other supporting websites. The xvid.org website has been revamped and is more user-friendly, which should enhance uptake of this codec despite the legal problems described.
As Xvid is based on the MPEG-4 Advanced Simple Profile, it may be decoded by many MPEG-4 compliant software and hardware media players. It may usually be played back on a DivX capable hardware DVD player - which greatly increases playability as many DVD players these days are DivX capable.
FOSS Audio Codecs
Once again only lossy codecs will be considered. Low bitrate codecs designed for VOIP such as iLBC are not considered in this research as they will not generally be applicable to documentaries and other video productions.
- LAME mp3
- Ogg Vorbis
Vorbis is the major Xiph lossy audio codec for music frequency-range audio, and has gained a fair bit of popularity in recent years. It is very well supported cross-platform.
VLC supports Vorbis cross-plaform.
There is a Quicktime Component to allow its playback on applications using the QT API such as iTunes and Quicktime itself on the Mac platform. OggDrop is an easy conversion tool for Mac.
There are DirectShow filters which allow Vorbis to be played back on Windows applications such as Windows Media Player and Media Player Classic. The popular Winamp media player supports Vorbis. OggDropXPD is an encoder for Windows.
XMMS on Linux supports Ogg, and the libogg / libvorbis / vorbis-tools libraries are included with most Linux OSs for encoding.
LAME is a very high quality encoder, particularly when used with a Varible Bit Rate for mid-high bitrates from 128kbs up. It is licensed as GPL.
Binaries are not available on the LAME site for download, only the source code, due to patent issues concerning the proprietary Fraunhofer MPEG Layer-3 codec. Only the source code is available on the site, but LAME is built into many encoding programs, and can be decoded by any program that can decode the MP3 coding scheme.
The LAME project and code is GPL but due to patent issues it is not an entirely "free" codec and has problems with distribution similar to Xvid as a result. It claims that the source code is a demonstration of MP3 rather than a codec to be used, which is obviously stated only for legal purposes. Any MP3 codec released will have the same issues with processes patented by Fraunhofer or its parent companies.
There is more explanation of these issues here - http://www.mp3-tech.org/
Programs that can encode LAME include the cross-platform Audacity audio editor, RazorLame converter and Audiograbber CD-ripper for Windows and KAudioCreator for the KDE Desktop for Linux. The MediaCoder video/audio transcoder includes LAME as an audio output option.
LAME is available from download sites, and can then be installed and used with VirtualDub or similar programs as an encoder on Windows: http://www.free-codecs.com/download/Lame_Encoder.htm
LAME is also available as a Quicktime Component here: http://www.versiontracker.com/dyn/moreinfo/macosx/22571
Or LAME can be intergrated for importing audio as LAME directly into iTunes on Mac: http://blacktree.com/apps/iTunes-LAME/
FOSS Video and Audio Codecs Support in Media Players
It is important to consider which media players our audiences may be using and which ones support the codecs we are recommending.
This is a multi-codec package for Quicktime that currently supports Xvid and many other codecs Quicktime does not natively support. Apparently only for OS 10.4 and above "Requirements: Mac OS X 10.4.7 because 10.3 makes the iceweasel cower in fear."
The issue tracker lists .ogg support as an upcoming addition: