NAME
avinfo.pl
SYNOPSIS
avinfo.pl [OPTIONS] FORMAT_STRING [file...]
DESCRIPTION
Perl script to print technical information about avi/asf/mpg video files in given format.
If directory is given on command line, then this directory is recursively scanned.
If no files are specified, the current directory is assumed.
DOWNLOAD
INSTALATION
- Install Video::Info perl module: perl -MCPAN -e 'install Video::Info'
- place avinfo.pl to /usr/local/bin/ or to other directory in your path
OPTIONS
- -e, --exclude regexp — exclude files which match the regexp
FORMAT_STRING
- %c - Number of audio channels
- %a - Name of the audio codec
- %R - Bits/second dedicated to an audio stream
- %N - Number of audio streams
- %Q - Sampling rate of the audio stream, in Hertz
- %q - Sampling rate of the audio stream, in KHz
- %v - Name of the video codec
- %j - Number of video frames
- %r - Average bits/second dedicated to a video stream
- %n - Number of video streams (0 for audio only)
- %F - How many frames/second are displayed
- %w - Video frame width, in pixels
- %h - Video frame height, in pixels
- %f - Filename without path
- %p - Path to the file used to create the video object
- %s - File size in bytes
- %H - File size in human readable form (Kb/Mb/Gb/Tb)
- %t - File type (RIFF, ASF, MPEG, etc)
- %S - File length in seconds
- %M - File length in minutes + seconds, in the format MM:SS
- %T - Title of the file content. Not the filename
- %A - Author of the file content
- %C - Copyright, if any
- %D - Freetext description of the content
- %P - Number of data packets in the file
- %% - A single percent sign
- Escape Sequences: \n - new line, \r - carriage return, \t - tab, \\ - single backslash
EXAMPLES
- avinfo.pl '%wx%h %H %M %f\n' test.avi
- print something like '480x240 11Mb 00:09 test.avi'
- avinfo.pl '%wx%h\t%6H\t%p\n' /home | sort -k3
- print sorted by name list of avi/asf/mpg/mov files from /home directory in format
'<resolution> <filesize> <filepath>'.
BUGS
If first 4 bytes of MPEG file are 'RIFF' (I have a such file ;),
then the file is incorrectly detected as AVI, and error is reported.
This is actually bug in Video::Info::Magic perl module.
Not all MPEG files are detected as MPEG files. And sometimes
error 'Strange number of packets!' is reported.
These bugs are inherited from Video::Info::MPEG perl module.
OGM and RealPlayer formats are unsupported.
AUTHOR
Aleksey <mplayer (AT) gorodok DOT net>
SEE ALSO
Video::Info(3) - Video::Info perl module man page