NAME
Video::FourCC::Info - Find information about codecs specified as Four Character Code
VERSION
Version 1.0 ($Id: DistManifest.pm 11 2008-12-25 23:44:13Z frequency $)
DESCRIPTION
In order for video players to detect the algorithm required to decode a given video file, a four-byte sequence called a Four Character Code is written somewhere in the header of the file. This ensures that the detected codec format is independent of the file extension, which may be incorrect due to human error or for some other reason.
This is similar to the four-byte "magic number" used by the UNIX file(1) command to roughly determine a file format.
As far as I know, this is a case sensitive code, since it is byte-dependent, and is not actually an alphanumeric code (although it is represented as such).
SYNOPSIS
use Video::FourCC::Info;
my $codec = Video::FourCC::Info->new('DIV3');
printf "Codec description: %s\n", $codec->description;
COMPATIBILITY
This module was tested under Perl 5.10.0, using Debian Linux. However, because it's Pure Perl and doesn't do anything too obscure, it should be compatible with any version of Perl that supports its prerequisite modules.
If you encounter any problems on a different version or architecture, please contact the maintainer.
METHODS
Video::FourCC::Info->new( $fourcc )
Creates a Video::FourCC::Info
object, which provides information about the given Four Character Code. If the code does not exist in the database, it will return an error.
Example code:
my $codec = Video::FourCC::Info->new('DIV3');
This method will return an appropriate Video::FourCC::Info object or throw an exception on error.
Video::FourCC::Info->describe( $fourcc )
This is really just a shortcut to grab the short description of a codec given a Four Character Code as input. Note that this is a class method, not an object method.
Example code:
my $codec_desc = Video::FourCC::Info->describe('DIV3');
Internally, this method creates a temporary object and returns the description, destroying the object due to falling out of scope. If you already have a Video::FourCC::Info
object, then the description accessor will provide better performance.
Note, that just like new
, this class method may throw an exception if the Four Character Code does not exist in the database.
Remember that this value could be undef
if the information is unknown.
$codec->description( )
This returns the short description of the codec. It may be undef
if there is no description in the database.
Example code:
my $codec_desc = $codec->description;
Remember that this value could be undef
if the information is unknown.
$codec->registered( )
This returns the short description of the codec. It may be undef
if there is no description in the database.
If DateTime
is installed, then this will be a DateTime object. Otherwise, it will simply be a string in the format yyyy-mm-dd
.
Example code:
my $registered = $codec->registered;
Remember that this value could be undef
if the information is unknown.
$codec->owner( )
This returns the name of the corporation or other entity that owns the FourCC. Generally, this seems to be an ad-hoc standard, so it's a listing of the first entity known to use the given FourCC.
Example code:
my $owner_name = $codec->owner;
Remember that this value could be undef
if the information is unknown.
$codec->code( )
This returns the Four Character Code corresponding to the current Video::FourCC::Info
object.
Example code:
my $fourcc = $codec->fourcc;
AUTHOR
Jonathan Yu <frequency@cpan.org>
CONTRIBUTORS
Your name here ;-)
ACKNOWLEDGEMENTS
Thanks to Allen Day <allenday@ucla.edu> and Benjamin R. Ginter <bginter@asicommunications.com>, developers of Video::Info, which inspired the creation of this module.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Video::FourCC::Info
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
CPAN Request Tracker
CPAN Testing Service (Kwalitee Tests)
FEEDBACK
Please send relevant comments, rotten tomatoes and suggestions directly to the maintainer noted above.
If you have a bug report or feature request, please file them on the CPAN Request Tracker at http://rt.cpan.org. If you are able to submit your bug report in the form of failing unit tests, you are strongly encouraged to do so. Regular bug reports are always accepted and appreciated via the CPAN bug tracker.
SEE ALSO
Video::Info, a module for extracting information like the Four Character Code from arbitrary files.
CAVEATS
KNOWN BUGS
There are no known bugs as of this release.
LIMITATIONS
This module has not been tested very thoroughly with Unicode.
DATA SOURCE
The FourCC database of owner and descriptions come from data extracted from GSpot v2.70a, a freeware Codec Information utility. The registration dates come courtesy of Microsoft Corporation, accessed online at: http://msdn.microsoft.com/en-us/library/ms867195.aspx#fourcccodes
LICENSE
Copyright (C) 2009 by Jonathan Yu <frequency@cpan.org>
This package is distributed under the same terms as Perl itself. At time of writing, this means that you are entitled to enjoy the covenants of, at your option:
The Free Software Foundation's GNU General Public License (GPL), version 2 or later; or
The Perl Foundation's Artistic License, version 2.0 or later
DISCLAIMER OF WARRANTY
This software is provided by the copyright holders and contributors "AS IS" and ANY EXPRESS OR IMPLIED WARRANTIES, including, but not limited to, the IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
In no event shall the copyright owner or contributors be liable for any direct, indirect, incidental, special, exemplary or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.