我需要使用ffmpeg转换视频并创建图像。我从zeranoe为Windows 8 64x下载了this package并放入c:/ffmpeg
文件夹。
我使用cmd ffmpeg -version
ffmpeg version N-60959-g669043d
built on Feb 27 2014 22:07:15 with gcc 4.8.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avis
ynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable
-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype
--enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enabl
e-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-lib
opus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspee
x --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aace
nc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpac
k --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-z
lib
libavutil 52. 66.100 / 52. 66.100
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 33.100 / 55. 33.100
libavdevice 55. 10.100 / 55. 10.100
libavfilter 4. 2.100 / 4. 2.100
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
现在我使用php测试转换视频:
$raw_video_path = 'C:\xampp\htdocs\video\ff\examples\5.flv';
$new_flv = DIRNAME(DIRNAME(__FILE__)).'/ff/examples/video/2654.flv';
$new_png = DIRNAME(DIRNAME(__FILE__)).'/ff/examples/video/2647-resampled.jpg';
@exec("ffmpeg -i ".$raw_video_path." -ab 56 -ar 44100 -b 200 -r 15 -s 320x240 -f flv ".$new_flv."");
@exec("ffmpeg -itsoffset -4 -i ".$new_flv." -vcodec mjpeg -vframes 1 -an -f rawvideo -s 320x240 ".$new_png." ");
现在,这对我不起作用!!我该如何解决这个问题?
对于ffmpeg,我需要安装/激活php ffmpeg扩展名吗?