0

i have done installation. after then i have using following code to convert mp4 to webm using ffmpeg on centos.

but it does not convert and also didn't throw any error.what is wrong with my code else am i forgot anythink in installation.

Thanks Anvanced

Webm convertion Code

ffmpeg.exe -i "blank.mp4" -acodec libvorbis -b:a 96k -ac 2 -vcodec libvpx -b:v 400k -f webm -s 384x216 "blank.webm"

1 Answers1

0
require 'vendor/autoload.php';

$ffmpeg = FFMpeg\FFMpeg::create();
$video = $ffmpeg->open('video.mp4');
$video
    ->filters()
    ->resize(new FFMpeg\Coordinate\Dimension(320, 240))
    ->synchronize();
$video
    ->frame(FFMpeg\Coordinate\TimeCode::fromSeconds(10))
    ->save('frame.jpg');
$video
    ->save(new FFMpeg\Format\Video\WMV(), 'export-wmv.wmv')
    ->save(new FFMpeg\Format\Video\WebM(), 'export-webm.webm');

https://github.com/PHP-FFMpeg/PHP-FFMpeg