I am using the following Mencoder command as part of a perl script that burns subtitles for different MP4 videos.
mencoder -profile h264mp4 source_file.mp4 -subcp utf8 -sub subtitle_file.srt -o destination_file.mp4 >> /dev/null
This has been working for over a year without problems and it is now giving the following fatal error when run:
** 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
This are the contents of the h264mp4 profile:
[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
I get the same error on my Debian Squeeze and on Amazon's Bitnami servers.
Both were updated recently so my guess is that the new packages don't like either the command line or the profile parameters.
The solution was to remove vf=pullup
from the h264mp4 profile.
I found this by trial and error, I will elaborate on the answer as soon as I investigate on why this causes the Fatal error.