Mencoder无法初始化视频驱动程序

时间:2013-08-22 19:11:51

标签: mp4 video-processing subtitle mencoder

我使用以下Mencoder命令作为perl脚本的一部分,为不同的MP4视频刻录字幕。

mencoder -profile h264mp4 source_file.mp4 -subcp utf8 -sub subtitle_file.srt -o destination_file.mp4 >> /dev/null

这已经运行了一年多没有问题,现在运行时出现以下致命错误:

** MUXER_LAVF *****************************************************************
REMEMBER: MEncoder's libavformat muxing is presently broken and can generate
INCORRECT files in the presence of B-frames. Moreover, due to bugs MPlayer
will play these INCORRECT files as if nothing were wrong!
*******************************************************************************
FATAL: Cannot initialize video driver.
ffmpeg version 0.7.15, Copyright (c) 2000-2013 the FFmpeg developers
  built on Feb 22 2013 07:18:58 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

这是h264mp4配置文件的内容:

[h264mp4]
profile-desc="H.264 MP4"
vf=pullup,softskip,pp=fd,hqdn3d,harddup
    lavdopts=threads=2
ovc=x264=yes
x264encopts=crf=22:subq=6:frameref=6:qcomp=0.8:8x8dct=yes:weight_b=yes:me=umh:partitions=p8    x8,i4x4:nodct_decimate=yes:trellis=1:direct_pred=auto:level_idc=30:nocabac=yes:threads=auto
oac=faac=yes
faacopts=br=128:raw=yes:mpeg=4:tns=yes:object=2
of=lavf=yes
lavfopts=format=mp4
sws=9
ofps=24000/1001
srate=48000

我在Debian Squeeze和亚马逊的Bitnami服务器上遇到了同样的错误。

最近都更新了,所以我的猜测是新包不喜欢命令行或配置文件参数。

2 个答案:

答案 0 :(得分:0)

解决方案是从h264mp4配置文件中删除vf=pullup

我通过反复试验发现了这一点,我会在调查导致致命错误的原因后立即详细说明答案。

答案 1 :(得分:0)

我正在使用openSUSE 13.2 x64并遇到同样的问题,并设法通过从packman存储库安装所有libav *库(如:libavcodec)和libx264来解决它。

问题在于我是从不同的存储库安装libav *库(一些来自packman,另一些来自其他存储库)。

相关问题