NAME

RIFF::Info - Probe DivX and AVI files for attributes like:

-video codec
-audio codec
-frame height
-frame width
-frame count

and more!

SYNOPSIS

use RIFF::Info;

my $video;

$video = RIFF::Info->new(-file=>$filename);                          #like this
$video = RIFF::Info->new(-file=>$filename,-headersize=>$headersize); #or this

$video->vcodec;                         #video codec
$video->acodec;                         #audio codec
...

DESCRIPTION

RIFF stands for Resource Interchange File Format, in case you were wondering. The morbidly curious can find out more below in REFERENCES.

METHODS

RIFF::Info has one constructor, new(). It is called as: -file => $filename, #your RIFF file -headersize => $headersize #optional RIFF header size to parse Returns a RIFF::Info object if the file was opened successfully.

The RIFF::Info object to parses the file by method probe(). This does a series of sysread()s on the file to figure out what the properties are.

Now, call one (or more) of these methods to get the low-down on your file:

method              returns
---------------------------------------------------
achans()            number of audio channels
acodec()            audio codec
acodecraw()         audio codec numeric ID
arate()             audio bitrate
astreams()          number of audio streams
fps()               frames/second
height()            frame width in pixels
probe()             try to determine filetype based on sysreads()
scale()             video bitrate
type()              type of file data.  RIFF or AVI.
vcodec()            video codec
vframes()           number of frames
vrate()             video bitrate
vstreams()          number of video streams
width()             frame height in pixels

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.

Audio codec name mapping is incomplete. If you know the name that corresponds to an audio codec ID that I don't, tell me.

AUTHOR

Allen Day <allenday@ucla.edu> Copyright (c) 2002, Allen Day License - QPL 1.0

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/