VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or Try ConvertXtoDVD and convert all your movies to DVD. Free trial ! :)
+ Reply to Thread
Results 1 to 9 of 9
Thread
  1. There is a logo at the beginning of my .mkv video that I don't want to be in the file. Trimming would mean quality loss but I've heard it's possible to delay tracks in an .mkv by adding some extra parameters, so the logo will still be in the file but hidden. I use mkvmerge GUI and I tried to set delay by adding a value to "Delay (in ms)" in "Format specific options" in both audio and video tracks, but it didn't seem to work. So how is it done? The video track is MPEG-4p10/AVC/h.264 and audio is AAC.
    Quote Quote  
  2. You can trim without quality loss if you cut on keyframes
    Quote Quote  
  3. Open the MKV with MKVMergeGUI. Switch to the Global tab. Select "split after duration". Enter a time a second or so before you want the MKV split (it'll be split on the next keyframe from the time you set). The time needs to be in "hours, minutes, seconds" format, so if you want to set a split point at the 19 second mark:

    00:00:19

    In the section labelled "max. number of files" type the number two (so it'll only split once instead of every 19 seconds).

    Keyframes aren't always where you want them to be (they can be up to ten seconds apart) so you can't always split exactly where you want to. For instance if you want the MKV split at 19 seconds but after splitting the first segment is 23 seconds long, the best you can do is live with it, or try specifying a slightly earlier split point (ie 18 seconds). You sometimes need to adjust the split point a little to get the result you're after, and sometimes you just can't split in an ideal place.

    If you open the MKV in question with MPC-HC and use the Shift key along with the left/right arrows on your keyboard, MPC-HC will jump from one keyframe to the next. From that should be able to work out exactly where they are. Note the time for the keyframe where you'd prefer to split and set the split point just prior to that.

    When you set a delay value under "format specific options" it sets a delay for the stream in question relative to the rest. It won't do what you want. For example if you set a 500ms delay for the audio, the audio will begin playing 500ms after the video (assuming they started at the same time to begin with).
    Last edited by hello_hello; 13th Mar 2014 at 17:48.
    Quote Quote  
  4. Member
    Join Date
    May 2011
    Location
    United States
    Search PM
    The fastest and easiest way I have found is by using this little free program> https://www.videohelp.com/tools/SolveigMM-AVI-Trimmer< Its free simple to use cuts and rewrites MKV and AVI files perfectly with NO quality loss and a child can figure it out in seconds...~
    Quote Quote  
  5. Originally Posted by RappinRod View Post
    The fastest and easiest way I have found is by using this little free program> https://www.videohelp.com/tools/SolveigMM-AVI-Trimmer< Its free simple to use cuts and rewrites MKV and AVI files perfectly with NO quality loss and a child can figure it out in seconds...~
    OK, but how to trim frame-accurate? It will only let me cut on key frames.
    Quote Quote  
  6. Member
    Join Date
    May 2011
    Location
    United States
    Search PM
    Hello,,I remember back in the day I use to cut alot of avi files with virtualdub and a few other choice cutters and if I remember correctly they cut AVI files anywhere I wanted,,these days however I do cut up mkv files occasionally..Soveig is my cutter of choice because of its speed and ease of use,,yes it cuts at the keyframes but its so close to where I want the cut to be,,as of the other comment saying it may be 10 seconds to the next keyframe Ive never seen that in any file and I have been cutting and merging files since 1996..If I wanted to cut in the middle of a frame as in your case I guess I would try every free program that cuts MKVs and hope for the best...good luck..
    Quote Quote  
  7. Originally Posted by RappinRod View Post
    as of the other comment saying it may be 10 seconds to the next keyframe Ive never seen that in any file and I have been cutting and merging files since 1996..If I wanted to cut in the middle of a frame as in your case I guess I would try every free program that cuts MKVs and hope for the best...good luck..
    Cut in the middle of a frame????
    There's no point trying programs and hoping for the best. Especially given MPC-HC can be used to easily work out exactly where the keyframes are.

    Do you know what the default keyframe settings are for the x264 encoder? They're these:

    keyint=250 and keyint_min=23

    You're welcome to do the math yourself but 250 frames at 25fps......

    I can only speak for the x264 encoder as it's all I use, but it's pretty good at putting keyframes on scene changes so often you can cut exactly where you want to. For long, fairly static scenes though, or scenes which slowly fade out and in, they can be quite far apart.
    There's been a few times where I couldn't cut on a "sharp" scene change though because there was no keyframe there. Sometimes the encoder reaches the maximum keyframe distance just before a scene change, and then the minimum keyframe distance prevents it from putting a keyframe on the scene change as it normally would.

    The only way to not cut on a keyframe is to use a "smart cutter" which will re-encode only the video around the cut point. I can't recommend a free one. Someone else might be able to.

    It took me about 15 seconds to find this sample and I've only been cutting and merging files for about ten minutes.
    The video in question only contains 7 keyframes in the first 65 seconds. You can check the encoder settings using MediaInfo.
    Feel free to play "find the keyframe".
    Image Attached Files
    Last edited by hello_hello; 16th Mar 2014 at 09:58.
    Quote Quote  
  8. The only free one that does smart rendering is selur's mkv cutter . Retail ones include solveigmm video splitter , videoredo

    But technically you do lose some quality with smart rendering on some frames because those frames within the affected GOP are re-encoded
    Quote Quote  
  9. @up
    If there is a quality loss, it's negligible in case of my video (maybe because it's animation, not actual camera footage) and I couldn't tell the difference after comparing an affected frame before and after trimming. Did it with MKVCutter.
    Quote Quote  



Similar Threads