Again, I've encountered a file that drives me crazy in my fruitless attempt to convert it.

The file is an mkv with h264 video, vorbis audio and two subtitle tracks. If I convert it with the latest mencoder binary, I get ugly artefacts. Seems that this mencoder version can't decode the h264 correctly. Same for the mplayer. But if I try the latest official mplayer (I just put the binary into Application Support/ffmpegx) the video plays smoothly. But if I convert it to DVD with mpeg2enc and mplayer decoding, the resulting video is too long 27:20 instead of 27:02. Looks like they used VFR (variable frame rate) in the video.

Decoding with ffmpeg doesn't show the artefacts, but due to a lot of mkv parsing errors the resulting video is choppy.

I tried to extract the raw h264 and convert it with ffmpeg. The result plays smoothly, but is far to short, since ffmpeg assumes 29,97 framerate on the raw h264.

I also used mp4box to make an mp4 out of the raw h264, but you can only force a constant framerate, resulting in too long or too short video.

So can anyone give me advice for converting mkv with VFR high profile h264?