我在自己的运行Aegir和Nginx的vps上将ffmpeg与Drupal 7中的audioconverter模块和audiorecorderfield模块一起使用。 audioconverter模块已停止将wav文件转换为mp3。这是错误;
Warning: passthru() has been disabled for security reasons in _audioconverter_scheduler_ffmpeg_helper() (line 358 of /mysite/drupal-7.16/sites/all/modules/audioconverter/audioconverter.module).
在我的日志中;
MESSAGE: executing: /usr/bin/ffmpeg -i /mysite/drupal-7.16/sites/default/files/1354856044.wav /mysite/drupal-7.16/sites/default/files/1354856044.wav.mp3
MESSAGE: Audio conversion failed. FFMPEG reported the following output:
SEVERITY: error
MESSAGE: converted file is an empty file.
我可以看到wav文件是由audiorecorderfield模块创建的,但是audioconverter模块转换失败。
这是我的ffmpeg信息;
ffmpeg version 0.7.13, Copyright (c) 2000-2011 the FFmpeg developers
built on Jun 13 2012 14:01:54 with gcc 4.4.5
configuration: --enable-libdc1394 --prefix=/usr --extra-cflags='-Wall -g ' --cc='ccache cc' --enable-shared --enable-libmp3lame --enable-gpl --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --enable-nonfree --disable-stripping --enable-avfilter --enable-libdirac --disable-decoder=libdirac --enable-libfreetype --enable-libschroedinger --disable-encoder=libschroedinger --enable-version3 --enable-libopenjpeg --enable-libvpx --enable-librtmp --extra-libs=-lgcrypt --disable-altivec --disable-armv5te --disable-armv6 --disable-vis
libavutil 50. 43. 0 / 50. 43. 0
libavcodec 52.123. 0 / 52.123. 0
libavformat 52.111. 0 / 52.111. 0
libavdevice 52. 5. 0 / 52. 5. 0
libavfilter 1. 80. 0 / 1. 80. 0
libswscale 0. 14. 1 / 0. 14. 1
libpostproc 51. 2. 0 / 51. 2. 0
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
安全模块在php.ini中处于关闭状态,因此我不知道为什么audioconverter无法正常工作。
最佳答案
通过从php.ini中的disable_functions删除“passthru”来禁用passthru来解决
好极了!