Here I share the ALPHA version of a small tool I work on from time-to-time.
https://drive.google.com/drive/folders/1...share_link
What is it ment to do?
It is ment to be a small gui which allows to frame accurately (by using smart rendering) cut mkv files.
here's a general overview how MKVCutter works:
What it handles these days:
A word on the audio:
Compressed audio can only be cut losslessly on frame boundaries - 32ms for AC-3 - so every part comes out a bit shorter or longer than asked for. The parts are therefore cut into separate files and joined while muxing, each with the offset that puts it back at the start of its video part. Without that the rounding errors add up and the sound slowly runs ahead of the picture.
Limitations:
Since it's a alpha version and I really only look at it from time to time when there are some major shortcomings.
Cu Selur
Ps.: now there is a github page: https://github.com/Selur/MKVCutter
PPs.: Patches&Co are welcome.
https://drive.google.com/drive/folders/1...share_link
What is it ment to do?
It is ment to be a small gui which allows to frame accurately (by using smart rendering) cut mkv files.
here's a general overview how MKVCutter works:
- analyze content with MKVInfo (to get the key frame positions, frame count, frame rate and track layout)
- analyze content with MediaInfo (scan type and field order, bit depth, chroma subsampling, audio delays, and the original x264 settings if the source carries them)
- index the content with ffmsindex so the preview can seek
- create AvisynthSkript to preview the content (simple script that calls FFVideoSource on the input)
- let user set which parts of the content he wants
- create audio and video cut lists for mkvmerge, create trim calls (and cut the timestamp file, if the source is vfr)
- let user set the output name and the temp folder
- call mkvmerge with the video cut lists to create a bunch of temporary files (here the cuts are always on key frames)
- extract those parts to H.264 elementary streams with ffmpeg
- analyze one of the not reencoded parts with h264_parse to improve compatibility
- create avisynth scripts using the trim calls and FFVideoSource to decode the GOPs that need reencoding (smart rendering)
- create x264 call to reencode the content provided by the avisynth scripts (profile, level, ref frames, bframes, cabac, keyint and field order are taken from the source)
- call x264 to reencode
- when all GOPs that need to be reencoded are reencoded, call mkvmerge to cut the audio - one file per part - and extract&cut the subtitles
- merge the new audio, video and all the reencoded and kept GOPs, giving each audio part the offset that puts it back at the start of its video part
Quote:This is how one uses 'MKV Cutter': (or how the author envisioned one would use it)
- Start MKV Cutter
- Press 'Open Source' and select the .mkv file you want to cut.
- MKV Cutter will now use MkvInfo, Mediainfo and ffmsindex to analyse and index the source, once it's finished a new screen will show.
- Here one selects the parts of the movie one wants to keep.
- Go to a 'start-point' of a section you want to keep.
- Press 'Cut-Start'
- Go to the 'end-point' of the current section you want to keep.
- Press 'Cut-End'
- The selected section should now be highlighted on the slider.
- Press 'Add to Cut-List', so the selection section will be remebered.
- Repeat step 5.-10. for all sections you want to keep.
- (optional) Press 'Save' to write the cut list to a .cut file, 'Load' reads one back in.
- Press 'Commit Cut-List' to finish the selection definition.
- In the next view you set the 'Output' (File) and 'Temp folder'
- Press 'Output' and set the name and location of the output file.
- Press 'Temp folder' to set the folder that is used for temporal files.
- Press 'Next' to start the actual processing.
- Wait till 'MKVCutter' is done and the 'Finished!' popup appears.
What it handles these days:
- H.264 in Matroska, 8 and 10 bit, 4:2:0, 4:2:2 and 4:4:4
- progressive, MBAFF and PAFF sources - for field coded content the container counts fields while Avisynth counts frames, so the ratio is measured and everything is converted
- constant and variable frame rate (the timestamp file is cut along)
- subtitles: SRT, ASS/SSA and VobSub are cut and kept
- several audio tracks per file, copied through
- if every cut already sits on a key frame, nothing is reencoded at all
- it can be driven from the command line with --clinput, so a cut can run unattended
A word on the audio:
Compressed audio can only be cut losslessly on frame boundaries - 32ms for AC-3 - so every part comes out a bit shorter or longer than asked for. The parts are therefore cut into separate files and joined while muxing, each with the offset that puts it back at the start of its video part. Without that the rounding errors add up and the sound slowly runs ahead of the picture.
Limitations:
Since it's a alpha version and I really only look at it from time to time when there are some major shortcomings.
- it only properly supports H.264 content (users reported: H.265 content can be cut, cut not frame accurate)
- it has an ugly user-interface
- it does not come with any bells&whistles
- x264 encoding is still rudimentary: the settings follow the source, but the quality is always a crf 19 encode and there is no user choice
- PGS subtitles are not cut and get dropped
- chapters, attachments and global tags are dropped
- audio is not reencoded, so a cut can only land on an audio frame boundary
- Windows OS only atm. (mainly because Avisynth is used for decoding and preview; in theory ffmpeg could be used as alternative so porting to Linux&Co should be possible)
Cu Selur
Ps.: now there is a github page: https://github.com/Selur/MKVCutter
PPs.: Patches&Co are welcome.
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.


