Info(3pm) | User Contributed Perl Documentation | Info(3pm) |
Video::Info - Retrieve video properties such as:
height
width
codec
fps
use Video::Info; my $info = Video::Info->new(-file=>'my.mpg'); $info->fps(); $info->aspect(); ## ... see methods below
Video::Info is a factory class for working with video files. When
you create a new Video::Info object (see methods), something like this will
happen:
1) open file, determine type. See Video::Info::Magic.
2) attempt to create object of appropriate class
(ie, MPEG::Info for MPEG files, RIFF::Info for AVI
files).
3) Probe the file for various attributes
4) return the created object, or a Video::Info object
if the appropriate class is unavailable.
Currently, Video::Info can create objects for the following filetypes:
Module Filetype ------------------------------------------------- Video::Info::ASF ASF MP3::Info MPEG Layer 2, MPEG Layer 3 Video::Info::MPEG MPEG1, MPEG2, MPEG 2.5 Video::Info::RIFF AVI, DivX Video::Info::Quicktime MOV, MOOV, MDAT, QT
And support is planned for:
Module Filetype ------------------------------------------------- Video::Info::Real RealNetworks formats
new(): Constructor for a Video::Info object. new() is called with the following arguments:
Argument Default Description ------------------------------------------------------------ -file none path/to/file to create an object for -headersize 10240 how many bytes of -file should be sysread() to determine attributes?
probe(): The core of each of the manufactured modules (with the exception of MP3::Info, which we manufacture only as courtesy), is in the probe() method. probe() does a (series of) sysread() to determine various attributes of the file. You don't need to call probe() yourself, it is done for you by the constructor, new().
These methods should be available for all manufactured classes (except MP3::Info):
Copyright (c) 2002 Aladdin Free Public License (see LICENSE for details) Allen Day, <allenday@ucla.edu> Benjamin R. Ginter <bginter@asicommunications.com>
Video::Info::Magic Video::Info::ASF Video::Info::MPEG Video::Info::Quicktime Video::Info::RIFF
2022-12-12 | perl v5.36.0 |