phpvideotoolkit-v2 icon indicating copy to clipboard operation
phpvideotoolkit-v2 copied to clipboard

Unable to guess environment paths. Please set the absolute path to the program "ffmpeg"

Open cassianotartari opened this issue 9 years ago • 1 comments

Hi!

I'm following the docs "Extract Multiple Frames of a Video at 1 frame every 'x' seconds"

And it is throwing:

Unable to guess environment paths. Please set the absolute path to the program "ffmpeg"

I'm running:

$ php -v
PHP 7.0.5-2+deb.sury.org~trusty+1 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
    with Xdebug v2.4.0, Copyright (c) 2002-2016, by Derick Rethans
    with blackfire v1.10.4, https://blackfire.io, by Blackfireio Inc.
$ composer show buggedcom/phpvideotoolkit
...
versions : * 2.2.3

My config:

PHPVideoToolkit\Config Object
(
    [_ffmpeg:protected] => /usr/bin/ffmpeg
    [_ffprobe:protected] => /usr/bin/ffprobe
    [_yamdi:protected] => /usr/bin/yamdi
    [_qtfaststart:protected] => /usr/bin/qt-faststart
    [_temp_directory:protected] => /home/vagrant/projects/symfony_demo/web/tmp
    [_gif_transcoder:protected] => 
    [_gif_transcoder_convert_use_dither:protected] => 1
    [_gif_transcoder_convert_dither_order:protected] => o8x8,8
    [_gif_transcoder_convert_use_coalesce:protected] => 1
    [_gif_transcoder_convert_use_map:protected] => 
    [_gifsicle:protected] => 
    [_convert:protected] => 
    [_php_exec_infinite_timelimit:protected] => 1
    [_force_enable_qtfaststart:protected] => 
    [_force_enable_flv_meta:protected] => 1
    [_cache_driver:protected] => Null
    [_set_default_output_format:protected] => 1
)

And code:

$output_path = '/home/vagrant/projects/symfony_demo/web/proxies/2016_07/6a01be45-3fb2-11e6-84f6-080027c97816/imagens/5776aa3ac0c38_297230639-copy%timecode.jpg'

$video_path = '/home/vagrant/projects/symfony_demo/web/ups/2016_07/6a01be45-3fb2-11e6-84f6-080027c97816/5776aa3ac0c38_297230639-copy.mp4';

$output_format = new ImageFormat_Jpg(Format::OUTPUT,  $this->config);


$video = new Video($video_path, $this->config);
$process = $video->extractFrames(new Timecode(10), new Timecode(20), '1/60')
        ->save($output_path, $output_format);
$output = $process->getOutput();

Any ideas about what I'm doing wrong?

Thanks!

cassianotartari avatar Jul 01 '16 18:07 cassianotartari

Hi, i'm having the same issue! how should i set the paths?

EM-LilianaIturribarria avatar May 23 '19 15:05 EM-LilianaIturribarria