Log in

View Full Version : Which tools to use to cut out video samples


manolito
18th May 2015, 10:15
It happens all the time:
Some user needs help with a certain source file, next thing is he is told to provide an unprocessed sample. But different source containers need different methods to cut out a sample without loosing important information or changing delay values.

This can get rather confusing, so what I'd like to see is a small list of containers and the corresponding tools for cutting out samples. So I could save this list somewhere and use it as a reference whenever the need arises.

Examples:
When can I use a binary splitter like DGSplit?
When do I need to use DGIndex?
Is it better for .ts files to use TSSplitter or can I use MKVMerge?
In which cases do I use a Hex Editor?


Looking for some contributions by the experts... :thanks:


Cheers
manolito

foxyshadis
18th May 2015, 20:43
DGSplit: Always a good choice for any file, unless the problem is with seeking or tags. (Cuts off the AVI index, Matroska Cues, etc.) Any binary file splitter works, but this one's well known. Manual hex editing isn't necessary.

As long as the problem still shows up when demuxed or remuxed, you can use almost any tool you want to do that. Usually that's when you're looking for help fixing an audio or video quality problem, but some other problems are present in the source stream, like bad pulldown or decoding errors. DGIndex is common because it's rock-solid for MPEG2, everyone knows it works well and it's easy to get the raw file into Avisynth or an analyzer. Other muxers may or may not have bugs.

Ghitulescu
19th May 2015, 09:24
Cutting distribution formats isn't as simply as it looks like, this is well known.
Many tools cut those only at logical boundaries, like GOPs. Additional issues occur when the file has multiple streams and their logical boundaries do not (always) superpose. This is the least problematic problem (if audio is concerned) but what to do when multi-angle or multiple-resolution videos are concerned?!
The only solution is the "smart cutting" which reencodes only the affected GOPs and keeps the other streams in synch. SmartCutter (http://www.fame-ring.com/smart_cutter.html) and TSDoctor (http://www.cypheros.de/tsdoctor_e.html) advertise themselves as doing this and keeping all substreams in synch.

I use several tools to cut HD M2TS at GOP boundaries, depending on the presence of subtitles. H264_cutter is one such alternative that works for me.

manolito
21st May 2015, 11:02
Thanks so far...

Looks like a general rule is that you can only use a binary splitter like DGSplit for files without global headers.

This would include MPEG, VOB, TS (m2ts too?) files.
DGSplit will not work for MKV and AVI files.

So what about FLV, MOV, MP4 and WMV? Do these containers have global headers?


Cheers
manolito

duedel
23rd May 2015, 13:15
For .mkv, you could always use mkvtoolnix.
Load up the .mkv file, go to the "global" tab. There you'll find several options for file splitting.

manolito
23rd May 2015, 13:33
Unfortunately this might not work well, because splitting with MKVMergeGui involves remuxing, and this can alter audio delay. Looks like cutting out from the beginning of the file using a hex editor is the better way to do it.

Have a look at this (and the following) post:
http://forum.doom9.org/showthread.php?p=1721564#post1721564


Cheers
manolito

duedel
23rd May 2015, 13:39
Unfortunately this might not work well, because splitting with MKVMergeGui involves remuxing, and this can alter audio delay. Looks like cutting out from the beginning of the file using a hex editor is the better way to do it.


Good to know, thanks!

Groucho2004
23rd May 2015, 14:15
MPEG-2/VOB - DGIndex(NV)
Everything else - AVIDemux (Only tried AVI, MP4 and MKV)