Mkvtoolnix Cut Video
MKVToolNix is a set of tools to create, alter, split, join and inspect Matroska files (mkv). With these tools one can get information about (mkvinfo) Matroska files, extract tracks/data from (mkvextract) Matroska files and create (mkvmerge) Matroska files from other media files. WonderFox Free HD Video Converter Factory can serve as a perfect MKV editor that can cut MKV files at one go. With this tool, you can split MKV videos with or without re-encoding at will. And it won't sacrifice the video quality since it can even edit 4K videos handily. Besides, it's fast and free.
Video file is 1:30:00. Audio file is 1:29:59. The first 50 minutes are synced perfectly, but then during a video transition, the video file contains an extra second of blank screen and the audio starts playing a second early. I need to cut that 1 second from the video at 00:50:00 so that the audio file remains synced. I hope that makes sense. How to Cut MKV Files without Quality Loss. MKV (Matroska Multimedia Container) is one of the most popular file extensions among movie fans because it is an open-standard video file format that can hold an unlimited number of video, audio, picture, or subtitle tracks in one file.
The purpose of this HowTo is to split videofiles which contain more than one episode of a tv show into single-episode files. So they show up individually within plex, can be played individually and don’t produce any of the weird things that multi-episode files are plagued with.
The tool used is MKVtoolnixGUI
it is freely available for all major PC operating systems.
Therefore the container format of the output files will be MKV.
The input format can be a multitude of containers like AVI, MP4, MKV, MPEG, TS, DIVX and several more.
The quality of the files will remain the same, because mkvtoolnix only remuxes the files, it doesn’t re-encode them.
start up MKVtoolnixGUI
(depending on your operating system, this might look a little bit different)drag the multi-episode file into the window marked by my crude arrow
the video, audio and subtitle tracks it contains will appear in the window underneath it
you may want to revise the language code that is assigned to the audio track(s) and the language and ‘forced’ attribute of subtitle tracks so the Plex interface informs you correctly about the languages available.
Plex’s automatic audio and subtitle track selection feature relies also on these tags to work correctly.change to the Output tab:
change ‘Split mode’ to ‘after specific timecodes’
input the timecode of the episode break into the field ‘timecodes’ (you can input several timecodes [separated by comma] if your source videofile contains more than two episodes)
(I chose to split after 25 seconds, because my example file is only 59 seconds long)revise the path and filename in ‘Output file’ to your needs
click Start muxing
Cut Video Download
You should find 2 or more MKV files in the destination path, their file names appended by a three figure number (DVD Introduction-scene-001.mkv
and DVD Introduction-scene-002.mkv
for our example file in the screenshots)
Now rename the split episode files according to the Plex naming guide for tv show episodes and add them into your library.
Done.
If you set above as ‘Split mode’ = “Before Chapters”, you can split your files on chapter markers.
This is particularly useful when you have ripped tv shows and you got only one monolithic file instead of one file for each episode.
Debian packages
Mkvtoolnix Cut Video Download
I provide i386 and Amd64 binaries for MKVToolNix for Debian 10 'buster' (the current stable).
I do not provide binaries for libEBML and libMatroska anymore as they're already part of the official distribution. If those are too old MKVToolNix even bundles the current version of both libraries.
You first have to import my public GPG key because all of my pools are signed. Run this once: sudo wget -O /usr/share/keyrings/gpg-pub-moritzbunkus.gpg https://mkvtoolnix.download/gpg-pub-moritzbunkus.gpg
You can access the packages by adding the lines below to a file such as /etc/apt/sources.list.d/mkvtoolnix.download.list
:
Version | APT source |
---|---|
Debian 10 (aka 'buster') | deb [signed-by=/usr/share/keyrings/gpg-pub-moritzbunkus.gpg] https://mkvtoolnix.download/debian/ buster main deb-src [signed-by=/usr/share/keyrings/gpg-pub-moritzbunkus.gpg] https://mkvtoolnix.download/debian/ buster main |
Now simply run sudo apt update
followed by sudo apt install mkvtoolnix mkvtoolnix-gui
.
If updating the package lists fails, make sure you have the package apt-transport-https
installed.
Debian 8 'Jessie' and 9 'stretch': you can get versions up to v38.0.0 (for Stretch) and v29.0.0 (for Jessie) from my repositories.
Version | APT source |
---|---|
Debian 9 (aka 'Stretch') | deb [signed-by=/usr/share/keyrings/gpg-pub-moritzbunkus.gpg] https://mkvtoolnix.download/debian/ stretch main deb-src [signed-by=/usr/share/keyrings/gpg-pub-moritzbunkus.gpg] https://mkvtoolnix.download/debian/ stretch main |
Debian 8 (aka 'Jessie') | deb [signed-by=/usr/share/keyrings/gpg-pub-moritzbunkus.gpg] https://mkvtoolnix.download/debian/ jessie main deb-src [signed-by=/usr/share/keyrings/gpg-pub-moritzbunkus.gpg] https://mkvtoolnix.download/debian/ jessie main |
If you're looking for older Debian or MKVToolNix releases, you can look through the repository directory yourself.