Log in

View Full Version : Muxing H264 video from HD-DVD/Blu-Ray into MKV


DreckSoft
14th April 2007, 14:39
There seem to be a lot of problems muxing H264 video from HD-DVD/Blu-Ray into MKV.

Till now I tried the following ways (I've tried those things in the last 3 weeks so I may not remember everything 100% correctly):

Casino Royale (Blu-Ray):
- Demux m2ts with xport. Resulting .264 file plays fine
- Remux 264 file with mkvmerge: Video just shows garbage
- Remux 264 file with gdsmux: File is not seekable but video is ok
- Remux 264 file into MP4: Video just shows garbage
- Remux 264 file with GraphEdit (Haali Matroska Muxer): File is not seekable but video is ok.

All problems stay the same if i skip demuxing and use the m2ts directly as source (where supported)

The Interpreter (HD-DVD) (At least mkvmerge behaviour is the same with Lucky Number Slevin):
- Demux evo with EVODemux: Resulting .264 file plays fine
- Remux 264 with mkvmerge: Crashes with malloc() error after allocating about 2G of memory
- Remux 264 with gdsmux: Does nothing
- Remux 264 file with GraphEdit (Haali Matroska Muxer): Does nothing
- Remux 264 file with avc2avi (into AVI of course): Plays fine but fps is 23.975 even I specified 23.976 on command line.
- Remux resulting avi with VirtualDub, add audio and correct fps: Plays fine, audio is sync.
- Remux avi with AVI-Mux GUI: File plays but is stuttering and audio is async.
- Remux AVI into MKV with mkvmerge: Crashes with malloc() error after allocating about 2G of memory
- Remux 264 file into MP4: Works.
- Remux MP4 into MKV with mkvmerge: Crashes with malloc() error after allocating about 2G of memory

Any other ideas?

zgx
14th April 2007, 15:12
I have similar experiences. Got Brothers Grimm to mux properly with gdsmux but most other H264 Blu-ray movies will not mux at all with gdsmux. Mkvmerge just gives me garbage video. The standalone .h264 file gotten with xport plays fine.

DreckSoft
14th April 2007, 15:57
Now I managed to get Lucky Number Slevin into MKV.
EVO => EVODemux => 264 => avc2avi => AVI => VirtualDubMod => AVI with AC3 Audio => AVI-Mux GUI => MKV

It works but no DD+ Tracks possible. VDubMod won't import DD+, AVI-Mux GUI says it's AC3 and writed a track-header for it but won't include the audio data.
It is not possible to remux the mkv with mkvmerge. Crashes with malloc() error as always with H264 video.

This method does not work with The Interpreter.

edo1080
14th April 2007, 21:28
Demux m2ts with xport. Resulting .264 file plays fine

Which syntax did you use with xport? I cannot get Hichhicker's guide demuxed, I obtain an MPV and not a .264 file

DreckSoft
14th April 2007, 21:38
AFAIR is used "xport -h file.m2ts 1 1 1"

edo1080
14th April 2007, 21:43
Exactly the same I used with Hitchhicker's guide the galaxy but it stops. the main file is not one file as for Casino Royale but is splitted into 2 files. 00059.m2ts and 00060.m2ts; if it was a way to rebuild the 2 files, maybe it could work

edo1080
14th April 2007, 21:54
I just discovered that if I mux in MKV using GDSMUX but without inserting an audio track also, it won't work; If I add an audio track it works.

woah!
15th April 2007, 05:01
can you not use graphedit and use :

EVO --> Haali Media Splitter ---> Haali Matroska Muxer ---> output.mkv

then use mkvmerge to add the audio file to the output.mkv file


i do this all the time with HD-DVD evo files and have no issues.


i also always work with 1 evo at a time for everything. take 12 monkeys for example, it has a audio delay of 4509 ms on the first evo but a -81 ms delay on the 2nd evo file. i have found not to get sunc issues etc.. and shouting and screaming at my monitor is to do it one at a time. after the adjustments mkvmerge can append all the files to a finished file at the end.

ACrowley
15th April 2007, 09:04
For VC1 you must use

1 mux Evo into mkv with HaaliMatroskaMuxer /gdsmux
2. remux it with mkvmerge and 23.976 Timecode

Should work with H264 to

DreckSoft
15th April 2007, 09:06
Obviously it doesn't

bond
15th April 2007, 10:32
run h264_parse from mpeg4ip over the raw .264 from bluray and post the output here

also which players/decoders are you using?

DreckSoft
15th April 2007, 12:12
I'm using ZoomPlayer with Haali Media Splitter. Tried various H264 codecs cause of the distored video and none worked. I also tried VLC cause of the seeking problem, didn't work either.

I'll post a log from X-Men III which has the same problems as Casino Royale. Currently I don't have a H264 HD-DVD on my HDD, I'm almost out of space.

zgx
15th April 2007, 12:33
run h264_parse from mpeg4ip over the raw .264 from bluray and post the output hereI have done that on one of the problematic files. The file plays well and looks great but will not mux with gdsmux or mkvmerge.

See the attached .txt file or follow this link to rogepost http://www.rogepost.com/n/7598451798

DreckSoft
15th April 2007, 12:44
The X-Men III (Blu-Ray) log has 426MB (!)
I attached the first ~3000 lines.

bond
15th April 2007, 13:18
I'm using ZoomPlayer with Haali Media Splitter. Tried various H264 codecs cause of the distored video and none worked. I also tried VLC cause of the seeking problem, didn't work either.

I'll post a log from X-Men III which has the same problems as Casino Royale. Currently I don't have a H264 HD-DVD on my HDD, I'm almost out of space.

The X-Men III (Blu-Ray) log has 426MB (!)
I attached the first ~3000 lines.try for your tests only graphedit, to make sure there are no player specific issues kicking in

the streams seem to use cqm, make sure to use decoder (versions) being able to handle those (latest ffdshow should)

Okraml
15th April 2007, 14:52
try for your tests only graphedit, to make sure there are no player specific issues kicking in

the streams seem to use cqm, make sure to use decoder (versions) being able to handle those (latest ffdshow should)

The problem is not in playing the .h264 files, but playing the .h264 videostream inside a mkv file. The raw video plays fine.

:-) Okraml

bond
15th April 2007, 14:59
The problem is not in playing the .h264 files, but playing the .h264 videostream inside a mkv file. The raw video plays fine.

:-) Okramlmight be, this doesnt change that the player could act differently on raw and mkv streams

DreckSoft
15th April 2007, 15:03
Nope, I already had success playing H264 inside mkv. And there are ways to get correct video but then the file is not seekable. I think there's a bug in mkvmerge with H264 since no H264 muxing ever worked with this tool. Only sucess so far was AVI-Mux GUI. GDSMux gives correct video (if it works at all, if often does just nothing) but the file is not seekable. So changing players won't help.

Okraml
15th April 2007, 15:08
Nope, I already had success playing H264 inside mkv. And there are ways to get correct video but then the file is not seekable. I think there's a bug in mkvmerge with H264 since no H264 muxing ever worked with this tool. Only sucess so far was AVI-Mux GUI. GDSMux gives correct video (if it works at all, if often does just nothing) but the file is not seekable. So changing players won't help.

mkvmerge works not with all .h264 files, but with most (for example BBC HD).
Only problems so far are with .h264 video from Bluray or some HDDVD. There must be something different with these streams, that mkvmerge can't handle.

:-) Okraml

DreckSoft
15th April 2007, 15:35
Never tried H264 besides from HD-DVD/Blu-Ray. I experimented with HDTV-Caps in MKV some time ago but can't remeber the results with mkvmerge. I usually mux them into AVI cause its easier to edit.

woah!
15th April 2007, 20:22
i believe you have issues with the setup you have, not with the tools like mkvmerge. heres a clip of original vc1 video and ac3 audio merged to mkv. can you play it?

hxxp://www.divshare.com/download/404196-b97

Okraml
15th April 2007, 20:26
i believe you have issues with the setup you have, not with the tools like mkvmerge. heres a clip of original vc1 video and ac3 audio merged to mkv. can you play it?

hxxp://www.divshare.com/download/404196-b97

I don't have any problems playing mkv containing vc1. Even most mkv with h264 video play correkt. But many h264 files from hddvd and bluray inside an mkv (created by mkvmerge) make problems.

:-) Okraml

woah!
15th April 2007, 20:39
ahh sorry i didnt know h264 was even used in any hd-dvd's, i just think vc1/x264/h264 as mp4 . which movies are in h264, maybe i can buy one to play with?

DreckSoft
15th April 2007, 20:47
HD-DVD:
The Interpreter
Lucky Number Slevin

Blu-Ray:
Casino Royale
X-Men III

woah!
16th April 2007, 00:31
Number Slevin it will be then...

DreckSoft
17th April 2007, 21:08
I now managed to mux X-Men III
Demuxed the M2TS with xport
Imported 264 into AVI using AVC2AVI
Joined the AVIs using VDubMod, correcting framerate to 23.976 (AVC2AVI wrote 23.975 - no idea why).
Synced german audio tracks
Muxed AVI (with video only), DTS and AC3 tracks using MKVMerge

The video is fine and the file is seekable.