Is anyone aware of an ffmpeg command analogous to mkvmerge's --split parts-frames command?
As implied, I'm trying to segment some mkv's at designated IDR frames (yes, they are IDR frames) but I find that mkvmerge keeps producing some corrupt files (I am getting playback issues at random parts that don't exist in the source--I describe the issue in detail here), so I wanted to try another option. That said, I've never understood how ffmpeg does file splitting. Since I have the exact IDR frames I want to cut on, I prefer an option that allows that specificity, rather than a time-based option, which is all I can seem to find with ffmpeg.
+ Reply to Thread
Results 1 to 8 of 8
There is no frame based option to specify the start. (you can specify the number of frame to encode, but not where to start)
If you have a problem with mkvmerge's --split parts-frames command did you contact the mvktoolnix author? (usually a good idea)users currently on my ignore list: deadrats, Stears555
Hmm, that is a bummer!
I haven't reached out to the author directly. I did make a post in the subreddit thread that he recommends and is a moderator on. I haven't filed it as a bug report because I'm not convinced the problem is with the program vs. something about my setup. Though I can't imagine what is wrong with my setup, I also can't imagine that this would be a bug that escaped notice for everyone but me.
Just in case others stumble upon this thread in the future with a similar problem, the solution is here.
The short version is I still use mkvmerge to split on frames. The problem was Windows 7 does not play well with USB drives, so writing under these circumstances can produce corrupted files. I found that using smaller segments (around 30,000 frames) worked fine for me, or writing directly to an internal drive.
ffmpeg -v error -i input -f null - 2>logfile.log command allowed me to double-check the accuracy of produced files since mkvmerge was not producing any error messages. Resulting log file should be empty for a clean copy.
Hope that helps,
this is how i usually split
ffmpeg -i <input> -c:v copy -vf trim=start_frame=100:end_frame=151 <output>
c:v copy only can be done on keyframe.
my bad, i kinda forgot how to actually split it since it has been ages ago.
I'm sure there are other programs out there can cut on keyframes without reencoding, but I couldn't find anything that surpassed mkvmerge, especially once I figured out what the problem was. So I stopped looking