3

I know that from now on, Ubuntu only supports libav instead of ffmpeg. But as for ffmpeg-php, I am not aware of any similar tool.

So how developers are supposed to do? Is there any option beside compiling from source?

Buzut
  • 1,699

2 Answers2

2

ffmpeg-php is quite old, in fact, as said on ffmpeg's website:

ffmpeg-php is not developed since 2007 (and requires "ffmpeg-0.4.9_pre1 or higher") means that you are restricted to use a very old version of ffmpeg, without possibility to update it to the latest version. Since a lot of changes/improvements are being made, inside ffmpeg's code, every day, it makes ffmpeg-php incompatible with the latest ffmpeg.

ffmpeg developers suggest to rather use ffmpeg directly with php exec function in cli or with php functions like exec and parse the result if needed.

Anyway, if one needs a simple api to process audios and videos or retrieve information from them, there's a new php api called PHP-FFMpeg

It's quite easy to use:

Basic usage

$ffmpeg = FFMpeg\FFMpeg::create();
$video = $ffmpeg->open('video.mpg');
$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\X264(), 'export-x264.mp4')
    ->save(new FFMpeg\Format\Video\WMV(), 'export-wmv.wmv')
    ->save(new FFMpeg\Format\Video\WebM(), 'export-webm.webm');
Buzut
  • 1,699
0

Found this

https://github.com/CodeScaleInc/ffmpeg-php

FFmpegPHP is a pure OO PHP port of ffmpeg-php (written in C). 

I know I'm not supposed to only type links as answer. So this is why all this text is here.