Я слежу за этим http://www.phpclasses.org/package/3747-PHP-Manipulate-and-convert-videos-with-ffmpeg-program.html Ссылка для преобразования любого типа видео в .mp4 Я пытался запустить различные примеры файлов, но они выдают сообщение об ошибке. Я не могу понять, как конвертировать файл с помощью phpvideotoolkit.
Если я запускаю следующий файл Http: //localhost/phpvideotoolkit-v2-master/examples/convert-to-multiple-outputs.php я получаю эту ошибку.
An error was encountered with FFmpeg when attempting to read the formats that FFmpeg supports. FFmpeg reported: The system cannot find the path specified.
PHPVideoToolkit\FfmpegProcessException Object
(
[process:protected] => PHPVideoToolkit\FfmpegProcess Object
(
[_exec:protected] => PHPVideoToolkit\ExecBuffer Object
(
[_failure_tracking:protected] => 1
[_blocking:protected] => 1
[_output:protected] =>
[_temp_directory:protected] => C:\wamp\www\phpvideotoolkit-v2-master\examples\tmp
[_executed_command:protected] => ((/opt/local/bin/ffmpeg "-formats" && echo ^<c-749429-56654b5be19a9-f741fa350232252bd14d9abb334a7e6e^>) || echo ^<f-749429-56654b5be19a9-f741fa350232252bd14d9abb334a7e6e^> ^<c-749429-56654b5be19a9-f741fa350232252bd14d9abb334a7e6e^> ^<e-749429-56654b5be19a9-f741fa350232252bd14d9abb334a7e6e^>) 2>&1 > "C:\wamp\www\phpvideotoolkit-v2-master\examples\tmp\php5359.tmp" 2>&1 &
[_command:protected] => /opt/local/bin/ffmpeg "-formats"[_buffer:protected] => The system cannot find the path specified.
<f-749429-56654b5be19a9-f741fa350232252bd14d9abb334a7e6e> <c-749429-56654b5be19a9-f741fa350232252bd14d9abb334a7e6e> <e-749429-56654b5be19a9-f741fa350232252bd14d9abb334a7e6e>
[_error_code:protected] => 0
[_running:protected] =>
[_start_time:protected] => 1449479003.9261
[_end_time:protected] => 1449479003.9841
[_callback_period_interval:protected] => 1
[_boundary:protected] => 749429-56654b5be19a9-f741fa350232252bd14d9abb334a7e6e
[_failure_boundary:protected] => <f-749429-56654b5be19a9-f741fa350232252bd14d9abb334a7e6e>
[_completion_boundary:protected] => <c-749429-56654b5be19a9-f741fa350232252bd14d9abb334a7e6e>
[_error_code_boundary:protected] => <e-749429-56654b5be19a9-f741fa350232252bd14d9abb334a7e6e>
[_php_exec_infinite_timelimit:protected] => 1
[_tmp_files:protected] => Array
(
[0] => C:\wamp\www\phpvideotoolkit-v2-master\examples\tmp\php5359.tmp
)
[_gc_temp_files:protected] => 1
[_completion_callbacks:protected] => Array
(
)
)
[_pre_input_commands:protected] => Array
(
)
[_input:protected] => Array
(
)
[_output_index:protected] => 0
[_post_input_commands:protected] => Array
(
[0] => Array
(
[-formats] =>
)
)
[_output:protected] => Array
(
)
[_post_output_commands:protected] => Array
(
)
[_progress_handler:protected] =>
[_combined:protected] => 1
[_program_path:protected] => /opt/local/bin/ffmpeg
[_arguments:protected] => Array
(
[0] => -formats
)
[_config] => PHPVideoToolkit\Config Object
(
[_ffmpeg:protected] => /opt/local/bin/ffmpeg
[_ffprobe:protected] => /opt/local/bin/ffprobe
[_yamdi:protected] => /opt/local/bin/yamdi
[_qtfaststart:protected] => /opt/local/bin/qt-faststart
[_temp_directory:protected] => C:\wamp\www\phpvideotoolkit-v2-master\examples\tmp
[_gif_transcoder:protected] => php
[_gif_transcoder_convert_use_dither:protected] =>
[_gif_transcoder_convert_dither_order:protected] => o8x8,8
[_gif_transcoder_convert_use_coalesce:protected] =>
[_gif_transcoder_convert_use_map:protected] =>
[_gifsicle:protected] => /opt/local/bin/gifsicle
[_convert:protected] => /opt/local/bin/convert
[_php_exec_infinite_timelimit:protected] => 1
[_force_enable_qtfaststart:protected] =>
[_force_enable_flv_meta:protected] => 1
[_cache_driver:protected] => InTempDirectory
[_set_default_output_format:protected] => 1
)
)
[exec:protected] =>
[message:protected] => An error was encountered with FFmpeg when attempting to read the formats that FFmpeg supports. FFmpeg reported: The system cannot find the path specified.
[string:Exception:private] =>
[code:protected] => 0
[file:protected] => C:\wamp\www\phpvideotoolkit-v2-master\src\PHPVideoToolkit\Parser.php
[line:protected] => 99
[trace:Exception:private] => Array
(
[0] => Array
(
[file] => C:\wamp\www\phpvideotoolkit-v2-master\src\PHPVideoToolkit\FfmpegParser.php
[line] => 51
[function] => getRawFormatData
[class] => PHPVideoToolkit\Parser
[type] => ->
[args] => Array
(
)
)
[1] => Array
(
[file] => C:\wamp\www\phpvideotoolkit-v2-master\src\PHPVideoToolkit\FfmpegParser.php
[line] => 78
[function] => _getParser
[class] => PHPVideoToolkit\FfmpegParser
[type] => ->
[args] => Array
(
)
)
[2] => Array
(
[file] => C:\wamp\www\phpvideotoolkit-v2-master\src\PHPVideoToolkit\Format.php
[line] => 122
[function] => __call
[class] => PHPVideoToolkit\FfmpegParser
[type] => ->
[args] => Array
(
[0] => getCommands
[1] => Array
(
)
)
)
[3] => Array
(
[file] => C:\wamp\www\phpvideotoolkit-v2-master\src\PHPVideoToolkit\Format.php
[line] => 122
[function] => getCommands
[class] => PHPVideoToolkit\FfmpegParser
[type] => ->
[args] => Array
(
)
)
[4] => Array
(
[file] => C:\wamp\www\phpvideotoolkit-v2-master\src\PHPVideoToolkit\AudioFormat.php
[line] => 52
[function] => __construct
[class] => PHPVideoToolkit\Format
[type] => ->
[args] => Array
(
[0] => input
[1] => PHPVideoToolkit\Config Object
(
[_ffmpeg:protected] => /opt/local/bin/ffmpeg
[_ffprobe:protected] => /opt/local/bin/ffprobe
[_yamdi:protected] => /opt/local/bin/yamdi
[_qtfaststart:protected] => /opt/local/bin/qt-faststart
[_temp_directory:protected] => C:\wamp\www\phpvideotoolkit-v2-master\examples\tmp
[_gif_transcoder:protected] => php
[_gif_transcoder_convert_use_dither:protected] =>
[_gif_transcoder_convert_dither_order:protected] => o8x8,8
[_gif_transcoder_convert_use_coalesce:protected] =>
[_gif_transcoder_convert_use_map:protected] =>
[_gifsicle:protected] => /opt/local/bin/gifsicle
[_convert:protected] => /opt/local/bin/convert
[_php_exec_infinite_timelimit:protected] => 1
[_force_enable_qtfaststart:protected] =>
[_force_enable_flv_meta:protected] => 1
[_cache_driver:protected] => InTempDirectory
[_set_default_output_format:protected] => 1
)
)
)
[5] => Array
(
[file] => C:\wamp\www\phpvideotoolkit-v2-master\src\PHPVideoToolkit\VideoFormat.php
[line] => 61
[function] => __construct
[class] => PHPVideoToolkit\AudioFormat
[type] => ->
[args] => Array
(
[0] => input
[1] => PHPVideoToolkit\Config Object
(
[_ffmpeg:protected] => /opt/local/bin/ffmpeg
[_ffprobe:protected] => /opt/local/bin/ffprobe
[_yamdi:protected] => /opt/local/bin/yamdi
[_qtfaststart:protected] => /opt/local/bin/qt-faststart
[_temp_directory:protected] => C:\wamp\www\phpvideotoolkit-v2-master\examples\tmp
[_gif_transcoder:protected] => php
[_gif_transcoder_convert_use_dither:protected] =>
[_gif_transcoder_convert_dither_order:protected] => o8x8,8
[_gif_transcoder_convert_use_coalesce:protected] =>
[_gif_transcoder_convert_use_map:protected] =>
[_gifsicle:protected] => /opt/local/bin/gifsicle
[_convert:protected] => /opt/local/bin/convert
[_php_exec_infinite_timelimit:protected] => 1
[_force_enable_qtfaststart:protected] =>
[_force_enable_flv_meta:protected] => 1
[_cache_driver:protected] => InTempDirectory
[_set_default_output_format:protected] => 1
)
)
)
[6] => Array
(
[file] => C:\wamp\www\phpvideotoolkit-v2-master\src\PHPVideoToolkit\Media.php
[line] => 226
[function] => __construct
[class] => PHPVideoToolkit\VideoFormat
[type] => ->
[args] => Array
(
[0] => input
[1] => PHPVideoToolkit\Config Object
(
[_ffmpeg:protected] => /opt/local/bin/ffmpeg
[_ffprobe:protected] => /opt/local/bin/ffprobe
[_yamdi:protected] => /opt/local/bin/yamdi
[_qtfaststart:protected] => /opt/local/bin/qt-faststart
[_temp_directory:protected] => C:\wamp\www\phpvideotoolkit-v2-master\examples\tmp
[_gif_transcoder:protected] => php
[_gif_transcoder_convert_use_dither:protected] =>
[_gif_transcoder_convert_dither_order:protected] => o8x8,8
[_gif_transcoder_convert_use_coalesce:protected] =>
[_gif_transcoder_convert_use_map:protected] =>
[_gifsicle:protected] => /opt/local/bin/gifsicle
[_convert:protected] => /opt/local/bin/convert
[_php_exec_infinite_timelimit:protected] => 1
[_force_enable_qtfaststart:protected] =>
[_force_enable_flv_meta:protected] => 1
[_cache_driver:protected] => InTempDirectory
[_set_default_output_format:protected] => 1
)
)
)
[7] => Array
(
[file] => C:\wamp\www\phpvideotoolkit-v2-master\src\PHPVideoToolkit\Media.php
[line] => 188
[function] => _getDefaultFormat
[class] => PHPVideoToolkit\Media
[type] => ->
[args] => Array
(
[0] => input
[1] => VideoFormat
[2] =>
)
)
[8] => Array
(
[file] => C:\wamp\www\phpvideotoolkit-v2-master\src\PHPVideoToolkit\Media.php
[line] => 150
[function] => getDefaultFormat
[class] => PHPVideoToolkit\Media
[type] => ->
[args] => Array
(
[0] => input
[1] => mp4
)
)
[9] => Array
(
[file] => C:\wamp\www\phpvideotoolkit-v2-master\src\PHPVideoToolkit\Media.php
[line] => 78
[function] => setInputFormat
[class] => PHPVideoToolkit\Media
[type] => ->
[args] => Array
(
[0] =>
)
)
[10] => Array
(
[file] => C:\wamp\www\phpvideotoolkit-v2-master\src\PHPVideoToolkit\Video.php
[line] => 35
[function] => __construct
[class] => PHPVideoToolkit\Media
[type] => ->
[args] => Array
(
[0] => C:\wamp\www\phpvideotoolkit-v2-master\examples/media/BigBuckBunny_320x180.mp4
[1] =>
[2] =>
)
)
[11] => Array
(
[file] => C:\wamp\www\phpvideotoolkit-v2-master\examples\convert-to-3gp.php
[line] => 9
[function] => __construct
[class] => PHPVideoToolkit\Video
[type] => ->
[args] => Array
(
[0] => C:\wamp\www\phpvideotoolkit-v2-master\examples/media/BigBuckBunny_320x180.mp4
)
)
)
[previous:Exception:private] =>
[xdebug_message] => <tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> PHPVideoToolkit\FfmpegProcessException: An error was encountered with FFmpeg when attempting to read the formats that FFmpeg supports. FFmpeg reported: The system cannot find the path specified. in C:\wamp\www\phpvideotoolkit-v2-master\src\PHPVideoToolkit\Parser.php on line <i>99</i></th></tr>
<tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr>
<tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr>
<tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0020</td><td bgcolor='#eeeeec' align='right'>259704</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp\www\phpvideotoolkit-v2-master\examples\convert-to-3gp.php' bgcolor='#eeeeec'>..\convert-to-3gp.php<b>:</b>0</td></tr>
<tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>0.0420</td><td bgcolor='#eeeeec' align='right'>1089432</td><td bgcolor='#eeeeec'>PHPVideoToolkit\Video->__construct( )</td><td title='C:\wamp\www\phpvideotoolkit-v2-master\examples\convert-to-3gp.php' bgcolor='#eeeeec'>..\convert-to-3gp.php<b>:</b>9</td></tr>
<tr><td bgcolor='#eeeeec' align='center'>3</td><td bgcolor='#eeeeec' align='center'>0.0420</td><td bgcolor='#eeeeec' align='right'>1089912</td><td bgcolor='#eeeeec'>PHPVideoToolkit\Media->__construct( )</td><td title='C:\wamp\www\phpvideotoolkit-v2-master\src\PHPVideoToolkit\Video.php' bgcolor='#eeeeec'>..\Video.php<b>:</b>35</td></tr>
<tr><td bgcolor='#eeeeec' align='center'>4</td><td bgcolor='#eeeeec' align='center'>0.0510</td><td bgcolor='#eeeeec' align='right'>1099872</td><td bgcolor='#eeeeec'>PHPVideoToolkit\Media->setInputFormat( )</td><td title='C:\wamp\www\phpvideotoolkit-v2-master\src\PHPVideoToolkit\Media.php' bgcolor='#eeeeec'>..\Media.php<b>:</b>78</td></tr>
<tr><td bgcolor='#eeeeec' align='center'>5</td><td bgcolor='#eeeeec' align='center'>0.0670</td><td bgcolor='#eeeeec' align='right'>1385064</td><td bgcolor='#eeeeec'>PHPVideoToolkit\Media->getDefaultFormat( )</td><td title='C:\wamp\www\phpvideotoolkit-v2-master\src\PHPVideoToolkit\Media.php' bgcolor='#eeeeec'>..\Media.php<b>:</b>150</td></tr>
<tr><td bgcolor='#eeeeec' align='center'>6</td><td bgcolor='#eeeeec' align='center'>0.0670</td><td bgcolor='#eeeeec' align='right'>1385368</td><td bgcolor='#eeeeec'>PHPVideoToolkit\Media->_getDefaultFormat( )</td><td title='C:\wamp\www\phpvideotoolkit-v2-master\src\PHPVideoToolkit\Media.php' bgcolor='#eeeeec'>..\Media.php<b>:</b>188</td></tr>
<tr><td bgcolor='#eeeeec' align='center'>7</td><td bgcolor='#eeeeec' align='center'>0.0780</td><td bgcolor='#eeeeec' align='right'>1692632</td><td bgcolor='#eeeeec'>PHPVideoToolkit\VideoFormat->__construct( )</td><td title='C:\wamp\www\phpvideotoolkit-v2-master\src\PHPVideoToolkit\Media.php' bgcolor='#eeeeec'>..\Media.php<b>:</b>226</td></tr>
<tr><td bgcolor='#eeeeec' align='center'>8</td><td bgcolor='#eeeeec' align='center'>0.0780</td><td bgcolor='#eeeeec' align='right'>1692864</td><td bgcolor='#eeeeec'>PHPVideoToolkit\AudioFormat->__construct( )</td><td title='C:\wamp\www\phpvideotoolkit-v2-master\src\PHPVideoToolkit\VideoFormat.php' bgcolor='#eeeeec'>..\VideoFormat.php<b>:</b>61</td></tr>
<tr><td bgcolor='#eeeeec' align='center'>9</td><td bgcolor='#eeeeec' align='center'>0.0780</td><td bgcolor='#eeeeec' align='right'>1693192</td><td bgcolor='#eeeeec'>PHPVideoToolkit\Format->__construct( )</td><td title='C:\wamp\www\phpvideotoolkit-v2-master\src\PHPVideoToolkit\AudioFormat.php' bgcolor='#eeeeec'>..\AudioFormat.php<b>:</b>52</td></tr>
<tr><td bgcolor='#eeeeec' align='center'>10</td><td bgcolor='#eeeeec' align='center'>0.0780</td><td bgcolor='#eeeeec' align='right'>1694784</td><td bgcolor='#eeeeec'><a href='http://www.php.net/PHPVideoToolkit\FfmpegParser.getCommands' target='_new'>getCommands</a>
( )</td><td title='C:\wamp\www\phpvideotoolkit-v2-master\src\PHPVideoToolkit\Format.php' bgcolor='#eeeeec'>..\Format.php<b>:</b>122</td></tr>
<tr><td bgcolor='#eeeeec' align='center'>11</td><td bgcolor='#eeeeec' align='center'>0.0780</td><td bgcolor='#eeeeec' align='right'>1695080</td><td bgcolor='#eeeeec'>PHPVideoToolkit\FfmpegParser->__call( )</td><td title='C:\wamp\www\phpvideotoolkit-v2-master\src\PHPVideoToolkit\Format.php' bgcolor='#eeeeec'>..\Format.php<b>:</b>122</td></tr>
<tr><td bgcolor='#eeeeec' align='center'>12</td><td bgcolor='#eeeeec' align='center'>0.0780</td><td bgcolor='#eeeeec' align='right'>1695248</td><td bgcolor='#eeeeec'>PHPVideoToolkit\FfmpegParser->_getParser( )</td><td title='C:\wamp\www\phpvideotoolkit-v2-master\src\PHPVideoToolkit\FfmpegParser.php' bgcolor='#eeeeec'>..\FfmpegParser.php<b>:</b>78</td></tr>
<tr><td bgcolor='#eeeeec' align='center'>13</td><td bgcolor='#eeeeec' align='center'>0.0810</td><td bgcolor='#eeeeec' align='right'>1696512</td><td bgcolor='#eeeeec'>PHPVideoToolkit\Parser->getRawFormatData( )</td><td title='C:\wamp\www\phpvideotoolkit-v2-master\src\PHPVideoToolkit\FfmpegParser.php' bgcolor='#eeeeec'>..\FfmpegParser.php<b>:</b>51</td></tr>
)
Задача ещё не решена.
Других решений пока нет …