Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I know that from now on, Unbuntu 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?

share|improve this question
    
If there is not a ppa (I could not fine one for 14.04), then you will have to compile. It did not look all that difficult to compile. –  bodhi.zazen Jun 12 at 18:44
    
I couldn't find a PPA either. you may be interested in the options here: ffmpeg-php.sourceforge.net –  Elder Geek Jun 12 at 18:49
    
Are you sure you even need that? The ffmpeg-php from sourceforge is absolutely ancient. See Using FFmpeg from PHP scripts for examples of using the binary with PHP scripts (note that the FFmpeg Wiki applies only to FFmpeg and not any forks). –  LordNeckbeard Jun 12 at 21:10
    
Alternatively, there's github.com/PHP-FFMpeg/PHP-FFMpeg. But I finally just use ffmpeg with exec and parse the output. –  user1717735 Jun 13 at 9:52
    
If you found a solution you can provide and eventually accept your own answer to your own question so others know an accepted answer was provided. –  LordNeckbeard Jun 13 at 16:26

1 Answer 1

up vote 1 down vote accepted

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');
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.