Movie::Info - get meta data from various format movie files
my $mi = Movie::Info->new || die "Couldn't find an mplayer to use\n"; foreach my $file (@ARGV) { my %info = $mi->info($file) || warn "Couldn't read info from $file\n" && next; print "$file (WxH) - $info{width}x$info{height}\n"; }
Movie::Info is a thin layer around MPlayer's --identify command line flag. As such it can only give you as much information as Mplayer is able to give you which is down to the quality and number of codecs you have installed.
Movie::Info
--identify
MPlayer is available from http://www.mplayerhq.hu/
This module is largely based on the midentify script shipped with MPlayer.
midentify
Returns a new Movie::Info instance or undef if it can't find an mplayer binary.
To find a binary it looks in three places - firstly if you've passed in a path to look at it checks there, secondly at the environment variable $MOVIE_INFO_MPLAYER_PATH and then finally it searches your $PATH like the standard which command in Unix.
$MOVIE_INFO_MPLAYER_PATH
$PATH
which
Returns a hash representing all the meta data we can garner about file.
Returns undef if it can't read the file.
Simon Wistow <simon@thegestalt.org>
Copyright 2005, Simon Wistow
Released under the same terms as Perl itself.
To install Movie::Info, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Movie::Info
CPAN shell
perl -MCPAN -e shell install Movie::Info
For more information on module installation, please visit the detailed CPAN module installation guide.