Trying to convert an MKV file with H.264 video and AAC audio I got the following error:
Running: any2vob --workdir="tmp_any2dvd" --format=pal --audio_format=ac3 --surround=preserve --compress=no --aspect=16:9 --pulldown=yes --keep_dts=yes --preview=no --skip_comm=no --mpegts_allpids=no -i "The Matrix [dvdrip.h264.aac].mkv"
Any2Vob-0.34
Use Ctrl+C to abort
Use Alt+P to toggle preview mode on/off
File(s) to process: "The Matrix [dvdrip.h264.aac].mkv"
Calculating total estimated DVD Disc usage, please wait ...
Total estimated DVD Disc usage: 3.57 GB
WARNING: Not enough diskspace available, 7.15 GB needed, but only 7.59 GB available on /dev/hdc3
Are you sure you want to continue ? (yes/no) yes
<<<< NEW ENCODING of The Matrix [dvdrip.h264.aac].mkv started at Sat Sep 8 12:34:23 IDT 2007 >>>>
** Input file info **
File type: Matroska
Codec: avc1
Format: PAL
Frames/sec: 25.000
Resolution: 720x576
Aspect: 1.73:1
** Output file info **
File type: DVD Vob
TV Format: PAL
Frames/sec: 25.000
Resolution: 720x576
Aspect: 16:9
Final estimated filesize: 3.57 GB
Number of VIDEO tracks detected: 1
Number of AUDIO tracks detected: 1
Number of SUBTITLE tracks detected: 1
Running: mkvextract tracks "The Matrix [dvdrip.h264.aac].mkv" 1:"tmp_any2dvd/The Matrix _dvdrip.h264.aac-v1.avi"
Running: mkvextract tracks "The Matrix [dvdrip.h264.aac].mkv" 2:"tmp_any2dvd/The Matrix _dvdrip.h264.aac-a2.ogg"
Running: ffmpeg -y -i "tmp_any2dvd/The Matrix _dvdrip.h264.aac-a2.ogg" -ar 48000 -ab 384 -ac 2 "tmp_any2dvd/The Matrix _dvdrip.h264.aac-a2.ac3" ...Done!
Running: mkvextract tracks "The Matrix [dvdrip.h264.aac].mkv" -c ISO8859-1 3:"tmp_any2dvd/The Matrix _dvdrip.h264.aac-3-subtitle-a2vsub"
Running: transcode -H0 -i "tmp_any2dvd/The Matrix _dvdrip.h264.aac-v1.avi" -x mplayer="-mc 0",mplayer -f 29.970 -g 720x480 -n 0x1 -e ,16, -y ffmpeg -F mpeg2 -Z 720x576 --export_asr 3 -J ,modfps=clonetype=3 --export_fps 25.000 -D0 -N 0x2000 -E 48000,16,2 -b 384 -m "tmp_any2dvd/The Matrix _dvdrip.h264.aac-v1.ac3" -o "tmp_any2dvd/The Matrix _dvdrip.h264.aac-v1" -w 5000 ...
Error: Video encoding failed for "tmp_any2dvd/The Matrix _dvdrip.h264.aac-v1", file not successfully encoded!
When runnning the last command through transcode I get the following error:
$ transcode -H0 -i "tmp_any2dvd/The Matrix _dvdrip.h264.aac-v1.avi" -x mplayer="-mc 0",mplayer -f 29.970 -g 720x480 -n 0x1 -e ,16, -y ffmpeg -F mpeg2 -Z 720x576 --export_asr 3 -J ,modfps=clonetype=3 --export_fps 25.000 -D0 -N 0x2000 -E 48000,16,2 -b 384 -m "tmp_any2dvd/The Matrix _dvdrip.h264.aac-v1.ac3" -o "tmp_any2dvd/The Matrix _dvdrip.h264.aac-v1" -w 5000
transcode v1.0.2 (C) 2001-2003 Thomas Oestreich, 2003-2004 T. Bitterberg
[transcode] critical: invalid pcm parameter set for option -e
Logged In: YES
user_id=38111
Originator: NO
I believe that I have found the problem here. The problem is that the video track extracted by mkvextract is of a file type that any2dvd doesn't know how to handle. I have had a similar problem and when I did, I tried running the command:
file foo.avi
on the extracted video file and it returned something like this:
foo.avi: JVT NAL sequence, H.264 video @ L 51
I am unable to play this extracted video file with any of the movie players on my system (totem, xine, mplayer, vlc). Since I can play the mkv file directly, I figured that if I could get the video out of the mkv container in some other way, that perhaps I could then get the any2dvd script to deal with it, so I added the following lines to the any2vob script in the matroska function (the following patch may not apply properly if you haven't applied my other feature and bugfix patches, but it should give you enough context lines to figure out where to add it by hand):
@@ -1323,6 +1327,17 @@
if [ ! -z "$VIDEO" ]; then
good Running: mkvextract tracks \""$file"\" $VIDEO:\""$WORKDIR"/"$name"-v$VIDEO.avi\"
mkvextract tracks "$file" $VIDEO:"$WORKDIR"/"$name"-v$VIDEO.avi &> "$WORKDIR"/tmp.log
+
+ # BEGIN BLECHEROUS HACK FOR H.264 video streams
+ H264VIDEO=`file "$WORKDIR"/"$name"-v$VIDEO.avi | grep "JVT NAL sequence"`
+ if [ ! -z "$H264VIDEO" ]; then
+ warn Extracted video appears to be a H.264 elementary stream...using alternative video extraction method.
+ rm "$WORKDIR"/"$name"-v$VIDEO.avi
+ good Running: mencoder -nosound -o \""$WORKDIR"/"$name"-v$VIDEO.avi\" -ovc copy \""$file"\"
+ mencoder -nosound -o "$WORKDIR"/"$name"-v$VIDEO.avi -ovc copy "$file" &> "$WORKDIR"/tmp.log
+ fi
+ # END BLECHEROUS HACK FOR H.264 video streams
+
cat "$WORKDIR"/tmp.log >> "$LOGFILE"
echo ""$WORKDIR"/"$name"-v$VIDEO.avi" >> "$WORKDIR"/matroska_streams.dat
elif [ ! -z "$AUDIO" ]; then
Using this method, I was able to successfully handle many of the H.264 encoded mkv files that had been giving me so much trouble. This may or may not solve your problem, but give it a try if you like.