我正在使用phpvideotoolkit http://www.phpclasses.org/package/3747-PHP-Manipulate-and-convert-videos-with-ffmpeg-program.html将视频转换为.mp4格式。我将此文件作为示例运行
http://localhost/phpvideotoolkit-v2-master/examples/convert-to-flv.php
我收到以下错误,请帮助解释我如何使用phpvideotoolkit将任何视频转换为.mp4。尽管C:\ wamp \ www \ phpvideotoolkit-v2-master \ examples / media / BigBuckBunny_320x180.mp4中存在以下文件,但仍显示错误消息。
Array
(
[0] => ERROR---------
[1] => exception
[2] => Array
(
[0] => InvalidArgumentException Object
(
[message:protected] => The file "C:\wamp\www\phpvideotoolkit-v2-master\examples/media/BigBuckBunny_320x180.mp4" cannot be found in \PHPVideoToolkit\Media::__construct.
[string:Exception:private] =>
[code:protected] => 0
[file:protected] => C:\wamp\www\phpvideotoolkit-v2-master\src\PHPVideoToolkit\Media.php
[line:protected] => 254
[trace:Exception:private] => Array
(
[0] => Array
(
[file] => C:\wamp\www\phpvideotoolkit-v2-master\src\PHPVideoToolkit\Media.php
[line] => 75
[function] => setMediaPath
[class] => PHPVideoToolkit\Media
[type] => ->
[args] => Array
(
[0] => C:\wamp\www\phpvideotoolkit-v2-master\examples/media/BigBuckBunny_320x180.mp4
)
)
[1] => 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] =>
)
)
[2] => Array
(
[file] => C:\wamp\www\phpvideotoolkit-v2-master\examples\convert-to-flv.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> InvalidArgumentException: The file "C:\wamp\www\phpvideotoolkit-v2-master\examples/media/BigBuckBunny_320x180.mp4" cannot be found in \PHPVideoToolkit\Media::__construct. in C:\wamp\www\phpvideotoolkit-v2-master\src\PHPVideoToolkit\Media.php on line <i>254</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.0290</td><td bgcolor='#eeeeec' align='right'>260072</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp\www\phpvideotoolkit-v2-master\examples\convert-to-flv.php' bgcolor='#eeeeec'>..\convert-to-flv.php<b>:</b>0</td></tr>
<tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>0.3640</td><td bgcolor='#eeeeec' align='right'>1089856</td><td bgcolor='#eeeeec'>PHPVideoToolkit\Video->__construct( )</td><td title='C:\wamp\www\phpvideotoolkit-v2-master\examples\convert-to-flv.php' bgcolor='#eeeeec'>..\convert-to-flv.php<b>:</b>9</td></tr>
<tr><td bgcolor='#eeeeec' align='center'>3</td><td bgcolor='#eeeeec' align='center'>0.3640</td><td bgcolor='#eeeeec' align='right'>1090336</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.4220</td><td bgcolor='#eeeeec' align='right'>1100088</td><td bgcolor='#eeeeec'>PHPVideoToolkit\Media->setMediaPath( )</td><td title='C:\wamp\www\phpvideotoolkit-v2-master\src\PHPVideoToolkit\Media.php' bgcolor='#eeeeec'>..\Media.php<b>:</b>75</td></tr>
)
)
[3] => Array
(
[0] => Array
(
[function] => __errorHandler
[args] => Array
(
[0] => InvalidArgumentException Object
(
[message:protected] => The file "C:\wamp\www\phpvideotoolkit-v2-master\examples/media/BigBuckBunny_320x180.mp4" cannot be found in \PHPVideoToolkit\Media::__construct.
[string:Exception:private] =>
[code:protected] => 0
[file:protected] => C:\wamp\www\phpvideotoolkit-v2-master\src\PHPVideoToolkit\Media.php
[line:protected] => 254
[trace:Exception:private] => Array
(
[0] => Array
(
[file] => C:\wamp\www\phpvideotoolkit-v2-master\src\PHPVideoToolkit\Media.php
[line] => 75
[function] => setMediaPath
[class] => PHPVideoToolkit\Media
[type] => ->
[args] => Array
(
[0] => C:\wamp\www\phpvideotoolkit-v2-master\examples/media/BigBuckBunny_320x180.mp4
)
)
[1] => 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] =>
)
)
[2] => Array
(
[file] => C:\wamp\www\phpvideotoolkit-v2-master\examples\convert-to-flv.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> InvalidArgumentException: The file "C:\wamp\www\phpvideotoolkit-v2-master\examples/media/BigBuckBunny_320x180.mp4" cannot be found in \PHPVideoToolkit\Media::__construct. in C:\wamp\www\phpvideotoolkit-v2-master\src\PHPVideoToolkit\Media.php on line <i>254</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.0290</td><td bgcolor='#eeeeec' align='right'>260072</td><td bgcolor='#eeeeec'>{main}( )</td><td title='C:\wamp\www\phpvideotoolkit-v2-master\examples\convert-to-flv.php' bgcolor='#eeeeec'>..\convert-to-flv.php<b>:</b>0</td></tr>
<tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>0.3640</td><td bgcolor='#eeeeec' align='right'>1089856</td><td bgcolor='#eeeeec'>PHPVideoToolkit\Video->__construct( )</td><td title='C:\wamp\www\phpvideotoolkit-v2-master\examples\convert-to-flv.php' bgcolor='#eeeeec'>..\convert-to-flv.php<b>:</b>9</td></tr>
<tr><td bgcolor='#eeeeec' align='center'>3</td><td bgcolor='#eeeeec' align='center'>0.3640</td><td bgcolor='#eeeeec' align='right'>1090336</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.4220</td><td bgcolor='#eeeeec' align='right'>1100088</td><td bgcolor='#eeeeec'>PHPVideoToolkit\Media->setMediaPath( )</td><td title='C:\wamp\www\phpvideotoolkit-v2-master\src\PHPVideoToolkit\Media.php' bgcolor='#eeeeec'>..\Media.php<b>:</b>75</td></tr>
)
)
)
)
)