Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    FFmpeg::Command 0.06

    Download button

    No screenshots available
    Downloads: 695  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Gosuke Miyashita | More programs
    Perl Artistic License / FREE
    September 21st, 2007, 17:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    FFmpeg::Command description

    FFmpeg::Command is a wrapper class for ffmpeg command line utility.

    FFmpeg::Command is a wrapper class for ffmpeg command line utility.

    SYNOPSIS

    use FFmpeg::Command;

    my $ffmpeg = FFmpeg::Command->new('/usr/local/bin/ffmpeg');

    $ffmpeg->input_options({
    file => $input_file,
    });

    # Convert a video file into iPod playable format.
    $ffmpeg->output_options({
    file => $output_file,
    device => 'ipod',
    });

    my $result = $ffmpeg->exec();

    croak $ffmpeg->errstr unless $result;

    # This is same as above.
    $ffmpeg->output_options({
    file => $output_file,
    format => 'mp4',
    video_codec => 'mpeg4',
    bitrate => 600,
    frame_size => '320x240',
    audio_codec => 'aac',
    audio_sampling_rate => 48000,
    audio_bit_rate => 64,
    });

    $ffmpeg->exec();


    # Convert a video file into PSP playable format.
    $ffmpeg->output_options({
    file => $output_file,
    device => 'psp',
    });

    $ffmpeg->exec();

    # This is same as above.
    $ffmpeg->output_options({
    file => $output_file,
    format => 'psp',
    video_codec => 'mpeg4',
    bitrate => 600,
    frame_size => '320x240',
    audio_codec => 'aac',
    audio_sampling_rate => 48000,
    audio_bit_rate => 64,
    });

    $ffmpeg->exec();

    # Execute ffmpeg with any options you like.
    # This sample code takes a screnn shot.
    $ffmpeg->input_file($input_file);
    $ffmpeg->output_file($output_file);

    $ffmpeg->options(
    '-y',
    '-f' => 'image2',
    '-pix_fmt' => 'jpg',
    '-vframes' => 1,
    '-ss' => 30,
    '-s' => '320x240',
    '-an',
    );

    $ffmeg->exec();

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    wrapper class | ffmpeg command-line | Perl module | Perl | wrapper | ffmpeg

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM