Info::RIFF(3pm)
β¨ Info::RIFF β¨
User Contributed Perl Documentation honey, we are reading the manual for Video::Info::RIFF and it's giving extremely useful π
πΈ NAME πΈ
Video::Info::RIFF β probe DivX and AVI files for attributes like:
-video codec
-audio codec
-frame height
-frame width
-frame count
...and more! π bestie it literally peeks inside your video files and tells you what's in them, no cap.
π¦ SYNOPSIS π¦
use Video::Info::RIFF;
my $video;
$video = Video::Info::RIFF->new(-file=>$filename); #like this
$video = Video::Info::RIFF->new(-file=>$filename,-headersize=>$headersize); #or this
$video->vcodec; #video codec
$video->acodec; #audio codec
...
two ways to build it, both iconic β¨ pick whichever vibe you're on.
π DESCRIPTION π
RIFF stands for Resource Interchange File Format, in case you were wondering π The morbidly curious can find out more below in REFERENCES. π§
π₯ METHODS π₯
Video::Info::RIFF has exactly one constructor, new(). It gets called like this:
-file => $filename, #your RIFF file
-headersize => $headersize #optional RIFF header size to parse
It returns a Video::Info::RIFF object if the file was opened successfully π«Ά (if not... well. no object for you, sorry bestie π).
The Video::Info::RIFF object parses the file by method probe(). This does a series of sysread()s on the file to figure out what the properties are. little reads, big detective energy π
Now, call one (or more) of these methods to get the low-down on your file π
achans()β number of audio channelsacodec()β audio codecacodecraw()β audio codec numeric IDarate()β audio bitrateafrequency()β sampling rate of audio streams, in Hertzastreams()β number of audio streamsfilename()β path file used to create objectfilesize()β size in bytes offilename()expectedsize()β expected size in bytes offilename(), according to the RIFF headerfourcc()β RIFF Four Character Codefps()β frames/secondheight()β frame height in pixelsprobe()β try to determine filetypescale()β video bitratetype()β type of file data. RIFF or AVIvcodec()β video codecvframes()β number of framesvrate()β video bitratevstreams()β number of video streamswidth()β frame width in pixels
that's the whole menu, order it however you like π
π BUGS π
the default header_size() (10K) may not be large enough to successfully extract the video/audio attributes for all RIFF files.
If this module fails you, increase the RIFF header size π«‘ If it still fails, let me know. (yes, actually tell them, fr fr)
Audio codec name mapping is incomplete π If you know the name that corresponds to an audio codec ID that I don't, tell me. be the hero this module needs π
π AUTHOR π
Copyright (c) 2002
Aladdin Free Public License (see LICENSE for details)
Allen Day <allenday@ucla.edu>
shoutout to the author, licensing legend, absolute main character β¨
π REFERENCES π
Transcode, a linux video stream processing tool:
http://www.theorie.physik.uni-goettingen.de/~ostreich/transcode/
Microsoft RIFF:
http://www.oreilly.com/centers/gff/formats/micriff/
and that's the whole page bestie!! this doc shipped as perl v5.36.0, dated 2022-12-12 β go forth and probe those RIFF files ππβ¨
π¦ where this page comes from
- debian bookworm: libvideo-info-perl 0.993-5 Β· AFPL
- debian trixie: libvideo-info-perl 0.993-5 Β· AFPL
- ubuntu noble: libvideo-info-perl 0.993-5 Β· AFPL
- ubuntu resolute: libvideo-info-perl 0.993-5 Β· AFPL
- ubuntu stonking: libvideo-info-perl 0.993-5 Β· AFPL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms