Video:...C::Info(3pm)
π¦ Video::FourCC::Info β bestie's guide to Four Character Codes
okay so this is a page from the User Contributed Perl Documentation, and the manual name is Video:...C::Info(3pm). Yes the title got truncated, no we're not gonna dwell on it, moving on π
β¨ NAME β¨
Video::FourCC::Info β a Perl module that pulls up the tea on FourCCs π
πΈ VERSION πΈ
Version 1.005 ($Id: Info.pm 10585 2009-12-22 02:50:06Z FREQUENCY@cpan.org $)
π DESCRIPTION π
So here's the vibe: video players need to figure out which algorithm decodes a given video file, right? Well, they do that by looking for a four-byte sequence called a Four Character Code, and it's written somewhere in the header of the file. That's the whole point β it means the codec format they detect is independent of the file extension, which, ngl, can be wrong because of human error or literally any other reason π
It's basically the same energy as the four-byte "magic number" that the UNIX file(1) command uses to roughly guess a file format.
Most applications seem to treat this as a case insensitive code. So as a result, internally, your given FourCCs get silently converted to uppercase. No drama, no warning, just uppercase β¨
π 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. BUT β and this is the slay part β 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. They want to know, fr fr.
π METHODS π
new
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.
describe
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. Heads up bestie: this is a class method, not an object method. It's giving static, periodt.
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. Rude of it, honestly. But if you already have a Video::FourCC::Info object, then the description accessor will provide better performance β so use that instead, it's the main character move β¨
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.
description
$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.
registered
$codec->registered( )
This returns the short description of the codec. It may be undef if there is no description in the database. (Yes, the docs really do say that here. Not me fixing it. Keeping it exactly as it was, no cap π«Ά)
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.
owner
$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. Like, whoever got there first, they're the owner now, that's the rule π
Example code:
my $owner_name = $codec->owner;
Remember that this value could be undef if the information is unknown.
code
$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 <jawnsy@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. Iconic behaviour, truly π
β 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
<http://annocpan.org/dist/Video-FourCC-Info>
- CPAN Ratings
<http://cpanratings.perl.org/d/Video-FourCC-Info>
- Search CPAN
<http://search.cpan.org/dist/Video-FourCC-Info>
- CPAN Request Tracker
<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Video-FourCC-Info>
- CPAN Testing Service (Kwalitee Tests)
<http://cpants.perl.org/dist/overview/Video-FourCC-Info>
π FEEDBACK π
Please send relevant comments, rotten tomatoes and suggestions directly to the maintainer noted above. (Rotten tomatoes?? they said it, not me π )
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. Failing tests are literally the love language of maintainers, iykyk π
π 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. Clean sheet, we love to see it β¨
π§ LIMITATIONS π§
- This module has not been tested very thoroughly with Unicode. She's a little unbothered about it, ngl.
π 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 π
In a perfect world, I could just say that this package and all of the code it contains is Public Domain. It's a bit more complicated than that; you'll have to read the included LICENSE file to get the full details. Yeah bestie, go read the file, I can't summarise it for you π
β οΈ DISCLAIMER OF WARRANTY β οΈ
The software is provided "AS IS", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.
Translation: no promises, no take-backs, use at your own risk, we are not liable, periodt π
and that's the whole page, bestie! π¦ this one's from perl v5.34.0, dated 2022-06-28 β go forth and decode some video files, you've got this πβ¨
π¦ where this page comes from
- debian bookworm: libvideo-fourcc-info-perl 1.005-5 Β· PD OR Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libvideo-fourcc-info-perl 1.005-5 Β· PD OR Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libvideo-fourcc-info-perl 1.005-5 Β· PD OR Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libvideo-fourcc-info-perl 1.005-5 Β· PD OR Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libvideo-fourcc-info-perl 1.005-5 Β· PD OR Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms