Hello,
I wasn't sure where to put this post, perhaps the editing section? I placed it in general because I wasn't sure.
I deal with a lot of content in the mkv container, some of it is mpeg (e.g., OTA recordings) but usually it is h264. I am getting increasingly frustrated with how difficult it is to accurately cut material (because of keyframe restrictions) without reencoding. Then I had an idea...rather than imprecisely cutting material, is there a tag or other metadata that could be entered which will direct the player to skip over portions? Presumably this could be more exact and not run into decoding issues because all the frames would still be present in the file. The file size would naturally be larger than if I cut the material, but it might be worth it to me because of simplicity.
I think this could be accomplished with the ChaptersFlagEnabled flag if I were creating chapters for the content. But if the content already has chapters, and I don't want to skip the whole chapter, would this work by making a subchapter?
Any ideas about other tag/metadata workarounds?
		
			+ Reply to Thread
			
		
		
		
			
	
	
				Results 1 to 7 of 7
			
		- 
	
- 
	You'd still run into the same issues when seeking because the entire GOP has to be decoded for seeking within a GOP . That's the same basis for the cutting issues. GOP boundaries, IDR frames. Seeking will be slower (higher latency) proportional to the size of the GOP 
 
 Chapters are placed on IDR frames, that's why you can seek to them directly, and quickly. You're essentially jumping by keyframes
 
 You can't insert seekpoints (or keyframes) without re-encoding... so back to square 1
 
 But you're asking sort of for display metadata, to skip over sections and display only specific frames - I don't think it's universally possible (won't work in all scnearios for all players), but mplayer has an edl and cutlist option , but not sure how accurate it is either
 
 Not sure of the background information on how you are using this (is this for editing, or playback only, or how are you planning on using it, is it for usage in other programs ?), but you can playback an avisynth script using Trim() to specify segments. If you use a frame accurate source filter, this does work accurately with multiple players, such as mpv, mpchc, even ffmpeg/ffplay . But it requires avisynth installation (mostly windows limited, although there are ways to run it on linux)
 
 
 
 You can also use smart rendering editors, that only re-encode the few frames around the cutsite . eg. videoredo, solveigmm video splitter, tmpg smart rendererLast edited by poisondeathray; 6th Aug 2018 at 15:11. 
- 
	Ah, my feelings of genius are once again thwarted!  
 
 Just to clarify my understanding....A cut on an IDR frame should always be seamless. Depending on whether the encode has closed or open GOPs, cuts on i frames can be possible. mkvmerge (and ffmpeg) don't always know the difference between an i frame and and IDR frame and so sometimes cuts are still a little messy.
 
 What is the easiest way to find IDR frames? I've looked at ffprobe output a few times and get overwhelmed quickly, and what I see is a sequence of frame types, but no indication of timestamp, etc. Ideally I'd be able to see a timestamp at least, or even better be able to view the video and find the nearest IDR frame. Does something like that exist?
- 
	Yes 
 
 
 For freeware, visually with a GUI, something like avidemux would be easy to use, you can navigate by keyframes. But unfortunately, because it's based on libav/ffmpeg libraries, it's not always 100% accurate. Sometimes, if you navigate back and forth, you can "lose your place" as it sort of mixes up frames , you sometimes have to go back a larger section then creep your way forward, jumping by keyframes. It's also buggy sometimes. Frustrating. But most of the time on simple common streams, it should work ok.What is the easiest way to find IDR frames? I've looked at ffprobe output a few times and get overwhelmed quickly, and what I see is a sequence of frame types, but no indication of timestamp, etc. Ideally I'd be able to see a timestamp at least, or even better be able to view the video and find the nearest IDR frame. Does something like that exist?
 
 
 
 If you're cutting a lot (as in frequently) , as your 1st post stated, then you should look at something like videoredo or solveigmm video splitter. They will save you lots of headache and more importantly, time . This is one area that freeware doesn't really have an equivalent. Selur has a utility mkv cutter that does smart render, but honestly it's not as good as the payware alternatives
 https://www.videohelp.com/software/MKV-Cutter
 https://forum.selur.net/showthread.php?tid=6
- 
	Thanks for the tip, I'll give that a try! 
 
 I've seen Videoreo mentioned a few times. I might have to make that jump. This is all personal hobby stuff but I might be able to justify the costIf you're cutting a lot (as in frequently) , as your 1st post stated, then you should look at something like videoredo or solveigmm video splitter. They will save you lots of headache and more importantly, time . This is one area that freeware doesn't really have an equivalent. Selur has a utility mkv cutter that does smart render, but honestly it's not as good as the payware alternatives
 https://www.videohelp.com/software/MKV-Cutter
 https://forum.selur.net/showthread.php?tid=6 . A smart renderer like videoredo only re-encodes the GOPs that need it right by the cut points, correct? I know that I'm being a little rigid, but I like to keep things as close to source as possible. . A smart renderer like videoredo only re-encodes the GOPs that need it right by the cut points, correct? I know that I'm being a little rigid, but I like to keep things as close to source as possible.
- 
	Creating virtual timelines is possible with Matroska: "101 things you never knew you could do with Matroska". But as poisondeathray said you might run into problems, not all players support it, especially not if you don't cut on keyframes. So for such a job I would agree to use a solution like MKV-Cutter, SolveigMM Video Splitter, VideoReDo etc. It's overall the best compromise. 
Similar Threads
- 
  program to cut MKV files?By coyote2 in forum EditingReplies: 6Last Post: 14th Oct 2016, 11:52
- 
  Cut part out of MKV, without re-encoding?By bagmand in forum EditingReplies: 2Last Post: 20th Feb 2015, 07:56
- 
  Automatically skip certain parts of an .mkvBy Freodon in forum EditingReplies: 3Last Post: 18th Nov 2014, 06:38
- 
  How to cut mkv files WITH subs?By shernoam in forum EditingReplies: 38Last Post: 14th Aug 2014, 15:37
- 
  how do I cut out a part of mkv?By shun in forum EditingReplies: 3Last Post: 25th Dec 2013, 18:39


 
		
		 View Profile
				View Profile
			 View Forum Posts
				View Forum Posts
			 Private Message
				Private Message
			 
 
			
			

 Quote
 Quote
