File::Headerinfo::Video - an extractor of useful information from video files.


File-Headerinfo documentation Contained in the File-Headerinfo distribution.

Index


Code Index:

NAME

Top

File::Headerinfo::Video - an extractor of useful information from video files.

DESCRIPTION

Top

File::Headerinfo::Video uses Video::Info to read the headers of video clips (of various kinds) and a few audio files, and extract from them the useful information we crave. It can handle all the types that Video::Info can handle, including quicktime files, mpegs, DivX, AVI and ASF files.

COPYRIGHT

Top

SEE ALSO

Top

File::Headerinfo, Video::Info


File-Headerinfo documentation Contained in the File-Headerinfo distribution.
package File::Headerinfo::Video;

use strict;
use base qw(File::Headerinfo);
use Video::Info;

sub parse_file {
    my $self = shift;
    my $info = Video::Info->new(-file => $self->path);
    return unless $info;
    $self->width( $info->width );
    $self->height( $info->height );
    $self->duration( $info->duration );
    $self->fps( $info->fps );
    $self->filesize( $info->filesize );
    $self->filetype( lc($info->type) );
    $self->vcodec( $info->vcodec );
    $self->datarate( $info->vrate );
    $self->freq( $info->afrequency );
    undef $info;
}

1;