NAME

FFprobe - probes information from multimedia files using 'ffprobe'

SYNOPSIS

use FFprobe;

my $probe = FFprobe->probe_file("/path/to/multimedia/file");
print $probe->{format}->{format_name};
print $probe->{stream}->[0]->{codec_name};

METHODS

probe_file($)

use FFprobe;
my $probe = FFprobe->probe_file("/path/to/file");

Runs 'ffprobe -show_format -show_streams' on the filename given as argument. Returns a hashref with a structured form parsed from ffprobe's output. Sample output:

$VAR1 = {
    'format' => {
        'start_time' => '0.000000',
        'filename'   => '/path/to/input/file',
    },
    'stream' => [
        {
            'index' => '0',
            'codec_tag' => '0x0000',
        },
        {
            'index' => '1',
            'codec_tag' => '0x0000',
        }
    ]
};

The "index" entry may not exist if there is only one stream.

AUTHOR

Kovensky, <diogomfranco at gmail.com>

LICENSE AND COPYRIGHT

Copyright 2011 Diogo Franco.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.