Log in

View Full Version : How to split H.264 video?


nhyone
25th January 2006, 11:20
I follow one of the Doom9 tutorials to encode my videos, the one that requires you to use robot4rip, Gordian Knot, VirtualDub and Nandub. The tutorial is for Xvid, but it works for the x264 encoder if I use it in place of the Xvid encoder in VirtualDub. Well, sort of works.

The problem is I'm able to get the encoded video, however, the x264 codec has no decoder, so I'm not able to splice the video or merge it with the audio.

Am I using the wrong tools? If so, what tools should I use?

Daodan
25th January 2006, 11:36
1. Can you play the file at least? x264 doesn't work as a directshow decoder, for that you need either the latest ffdshow, the coreAVC or nero decoder (available as directshow decoder only in versions older than 7)
2. To mux the audio with the video (and also cut, append and all that) use mkvtoolnix (http://www.bunkus.org/videotools/mkvtoolnix/downloads.html).
3. I hope your output from gknot was mkv not avi, in that case other problems will also occur.

hellfred
25th January 2006, 14:11
If you aim to backup some DVDs, I suggest you to switch to StaxRip. (Thread here (http://forum.doom9.org/showthread.php?t=102652)). It is easy to use and has ready-to-use profiles for encoding with x264 and muxing the video and audio tracks to several containers including mp4, mkv and AVI.
You do have to install .Net v2 (22 MB download) and some other tools. The other tools can easily downloaded and installed from within StaxRip (Tools->External Applications...), e.g. x264 binary (370 KB), mp4box(604KB), BeSweet(2.5MB), AviSynth(3.0MB) and some basic AviSynth filter with few KBs.
The DVD needs to be ripped to the HD with e.g. DVDDecrypter 3.5.4. Drop the VOBs simply into StaxRip. Next is choosing some profiles for Video and Audio tracks, one for the container and you are ready to go.

Hellfred

nhyone
27th January 2006, 05:31
1. Can you play the file at least? x264 doesn't work as a directshow decoder, for that you need either the latest ffdshow, the coreAVC or nero decoder (available as directshow decoder only in versions older than 7)
Yes, the file is playable because ffdshow is present.

hmm, if I can get VirtualDub to use ffdshow decoder, it should be able to open the file, right? Can it be done?

2. To mux the audio with the video (and also cut, append and all that) use mkvtoolnix (http://www.bunkus.org/videotools/mkvtoolnix/downloads.html).
3. I hope your output from gknot was mkv not avi, in that case other problems will also occur.
I'm outputting as avi. If I still cannot get it to work, I'll try this.

Lil' Jer
27th January 2006, 08:40
hmm, if I can get VirtualDub to use ffdshow decoder, it should be able to open the file, right? Can it be done?

Yes. Under VFW codec configuration go to decoder and set it to decode x264.

Rafik
27th January 2006, 11:56
IMHO I think it's better to use avc2avi (http://files.x264.nl/Sharktooth/force.php?file=./utils/avc2avi_rev267_mmx.7z) to put the x264 raw stream in avi file and then make any manipulation you want in VirtualDub.

Quarkboy
30th January 2006, 10:32
IMHO I think it's better to use avc2avi (http://files.x264.nl/Sharktooth/force.php?file=./utils/avc2avi_rev267_mmx.7z) to put the x264 raw stream in avi file and then make any manipulation you want in VirtualDub.

No, no, no... For basic splitting I'd put the h264 in either mkv or mp4 and split using mkvtools or mp4box, both of which can split easily enough. Sticking it in an avi just to split is just wrong :)

Rafik
30th January 2006, 12:31
No, no, no... For basic splitting I'd put the h264 in either mkv or mp4 and split using mkvtools or mp4box, both of which can split easily enough. Sticking it in an avi just to split is just wrong :)

I do agree. But for complex manipulations using VirtualDub I don't think that there is an other solution :confused: .

Quarkboy
30th January 2006, 12:35
I do agree. But for complex manipulations using VirtualDub I don't think that there is an other solution :confused: .

Pretty much anything vdub can do that doesn't require reencoding can be done with mp4box, albeit somewhat less easily.

Plus, I'm not so sure the avi that vdub would produce using your method would even work right... well, I guess you'd need to try it and see.