Hello,
I have an MKV file where I want to delete the first 16 seconds.
If have tried Avidemux but this application crashes. I have also tried SolveigMM AVI Trimmer + MKV but this one doesn't save the edited file for some reason but the the whole file.
What is the best tool to do this without reencoding ?
+ Reply to Thread
Results 1 to 17 of 17
-
-
I have no problems with solveigmm avi trimmer. Open mkv, set and start and save. But it might not work all kinds of mkvs.
But try mkvtoolnix / mkvmergegui. Add the mkv, under the global table enable splitting, set the after timecodes to 16s and it will create two files, one with the first 16s and the other with the rest.
See screenshot: -
I have tested it and it creates 182 files not what i suspected.
[EDIT]
If I set it to two files it works only mkvmerge doesn't cut at the right time. When I enter 16s the first file is 20 seconds long.
MKVmerge has a limitation on this from the FAQ:
mkvmerge can only split right before a key frame. This is an intentional limitation that you cannot get around when you use mkvmerge for splitting.
A key frame is a frame type that can be decoded and shown independently of any other frames in the file. That's how mkvmerge ensures that the next file starts with a key frame and can be played correctly right from the start. If mkvmerge allowed splitting at arbitrary timecodes, and therefore at any frame type, then the next file would show disrupted images until the next key frame is encountered.
In general there is a way to split video files at arbitrary frame positions. This requires that all non-key frames after the split point up to but excluding the next key frame will have to be re-encoded so that the next file does start with a key frame.
However, this requires that the program splitting the video file contains video decoders and encoders for all video formats that it can split. mkvmerge is not such a tool as it does not contain a single decoder or encoder, neither for audio nor for video. That's not its purpose. Therefore mkvmerge will never be able to split before arbitrary frame types.Last edited by jslegers73; 14th Feb 2013 at 03:41.
-
Or use an editor that just reconverts at the cut. But I don't think you will find anything free for that.
-
SolveigMM Video Splitter but as solveigmm avi trimmer doesn't work with your mkv it might also not work. But you can always try the trial.
-
I have done the splitting successfully using mkvmerge GUI v6.9.1
all you have to do is to put the value "2" in the "Max number of files" field.
so it will split the files to 2 parts, splitting in the time stamp you have given in "Duration" field.
If you wanted to remove some part of the video in between,
For example, you want to remove video part from 0:01:20 to 0:05:45, then do the following steps.
1. split the file in 2, giving the duration for splitting as 0:05:45 or 345 [ (05min*60)+45sec ] and value "2" in the "Max number of files" field.
you will get 2 files, one ending at 0:05:45 (FILE A) and other one starting at 0:05:45 (FILE B)
2. now split the first file which is ending at 0:05:45 (FILE A), in 2, giving the duration for splitting as 0:01:20 or 180 and value "2" in the "Max number of files" field.
you will get 2 files, one ending at 0:01:20 (FILE C) and other one starting at 0:01:20 (FILE D)
Here the second file (which is ending at 0:01:20 is the one which you want to remove)
So you the wanted file parts in 2 files
3. Append the 2 files [one which is ending at 0:01:20 (FILE C) + one which is starting at 0:05:45(FILE B)] using mkvmerge GUI
Done -
Hey, bit late to the discussion, but wanted to do the same thing and found Free Video Editor 1.2.1 does the job very nicely, doesnt need to cut at keyframes and doesnt reencode videos. Its a very basic program, merely allowing to cut and join. And iirc one issue is subtitle tracks dont get resaved with it, but will resave multiple audio tracks if present with no sync problems
and compared to the routine required by mkvmerge (which ive not tried) is ridiculously easy to use -
Hmm, free video software that can't possibly work as described, loaded with adware and recommended by a brand new member. Smells like spam.
-
smrpix, dont be so cynical, the op wanted a tool to cut out a non keyframe section of video without the need to reencode it, thats pretty much what FVE does, and its been a few installs since getting it but dont recall any adware junk with it
fwiw, im new because im a noob at video editing, havent used 99% of the programs out there cause theyre beyond my expertise, and probably wont be a big contributer, but figure noob type advice/programs still have a place when simple things like that need doing -
nonaz,
If video isn't cut on keyframes you can remove frames which are needed to decode other frames. Therefore the remaining frames in the group can't be decoded properly, which is why software will generally only cut on keyframes. There's no way around it, regardless of the software being used, unless the software in question re-encodes some of the frames around the cut point. Maybe that's what Free Video Editor does. I had a look at the instructions for using it but couldn't find any mention of "smart cutting", but that doesn't mean it can't cut that way.
There's a 10 second sample video attached to this post. The first frame is the only keyframe. Please feel free to try to split it without re-encoding. -
hey hello, well trying to open that 10 second mkv in FreeVideoEditor gives the message "cant open media file" . Really dont understand keyframes or smart cutting, only know it cuts at any point ive wanted sofar and audio remains synced in the output file
-
It might be refusing to open that sample as it can't split it..... given that's what it's designed to do. Here's another. It's 29 seconds long. There's a keyframe at the beginning and keyframes at (roughly) 2, 12, 17, and 19 seconds. See if you can split it somewhere else (ie after 20 seconds).
If you happen to be a MPC-HC user, you can easily work out where the keyframes are by opening a video and using the Shift key in combination with the left/right arrows on your keyboard. That'll jump backwards and forwards between keyframes. Those would be the only places you can split the video unless the splitter program does "smart cutting" (re-encodes the frames around the cut point if necessary).
Often you'll get lucky and there'll be a keyframe where you want to split (on a scene change etc) but sometimes that's not the case.
Similar Threads
-
910115 - what's the best way to cut an mkv file?
By hamidi2 in forum EditingReplies: 12Last Post: 8th Apr 2012, 20:17 -
How to trim / cut a .mov file?
By AshleyQuick in forum EditingReplies: 3Last Post: 4th Oct 2011, 16:46 -
HELP - Need software for mac that can trim/cut clips without quality loss
By someone04 in forum MacReplies: 6Last Post: 3rd Mar 2011, 18:06 -
Cut a part from a MKV file
By H2SO4JB in forum Video ConversionReplies: 0Last Post: 17th Oct 2010, 09:15 -
cant trim/cut mpg in QT-pro
By Kevlin in forum MacReplies: 3Last Post: 17th Aug 2008, 13:25