Thomas Schenk - 2007-12-11

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.