VideoCut
MPEG2,MP4,MKV,WEBM Cutter for Linux using MPV and libavcodec or ffmpeg. Cutting is lossless, the target file will not be reencoded
Install / Use
/learn @kanehekili/VideoCutREADME
VideoCut
Version 3.1.2
MP2/MP4 Cutter for Linux on base of mpv and ffmpeg. Cutting is lossless, the target file will not be reencoded.
It can be used for cutting out certain parts of the film. Has been written in conjunction with the MDVB Recorder for removing ads. Handles avi,mkv,webm,vc1,mp2,mp4 (PS or TS). Other formats not tested but possible.
Lossless cutting implies not to reencode (decode/encode) the frames. So cutting can only be done at "I-Frames". The library searches for the closest Frame at the given cutting point.
Reencoding is possible for exact cutting as well as converting to different containers and codecs.
VideoCut supports the cutting of subtitles when "Show subtitles" in the settings dialog is enabled. This flag will display the "first" subtitles stream and will cut all subtitles that have been defined in the "language" dialog.
The current version is written in python3 and uses the qt6 widget kit.
:boom: VideoPlay Video/Audio player included
As a spinoff a player has been introduced. It handles pictures, plays videos and audio files.
Prerequisites
- Arch: python3, python-pillow and mpv
- Debian/Mint/Ubuntu: python3 python3-pil libmpv2 (or libmpv1) (no-recommends)
- Ubuntu 26.04 needs additionally qt6-svg-plugins #not working for Ubuntu 18.4: libmpv - use python3-opencv instead
- Fedora: python3-pillow-qt and mpv-libs.x86_64
- ffmpeg > 3.X to 8.X
- python3-pyqt6
- optional:(legacy) OpenCV 2.4 up to OpenCV 4.x (must be build with ffmpeg - with all its dependencies)
Set GTK Theme for this QT application
If you are running a DE with GTK/Gnome (as opposed to LXQT or KDE) you might set QT_QPA_PLATFORMTHEME:
- Depending on the distro and version this variable may be defined with one of:
- gtk2, qt6ct, fusion, gtk3
- VideoCut will enforce "QT_QPA_PLATFORM=xcb" on Wayland for SSD decorations.
- On Ubuntu 26.04 you need to install qt6-gtk-platformtheme. This will get your GTK theme into any QT6 app.
- On Ubuntu(with libadwaita) use /etc/environment to add GTK_THEME=yourTheme to enforce a third party theme. (Hack)
Features
Cuts an mpg file into parts and joins them afterwards. All commands can be reached via the toolbar.

The cutout parts will be joined without beeing recoded - the quality stays the same
The frame type (IBP) will be shown at the upper left corner. Subtitles can be displayed (Settings)
Instead of using the ffmpeg command line, Videocut offers its own muxer, which is based on the libavcodec libs. It provides better cuttings results and less artifacts than ffmpeg. This is set by default, but can be changed to the ffmpeg command line interface via the "Settings" dialog.
Videocut supports subtitle cut. This is work in progress.
As of version 2.1.x wayland is supported. For old hardware, the openGL feature may be disabled in the "Settings" dialog. Since version 2.2.x the audio track can be omitted from the target file. (Video only)
Limitations
Using ffmpeg as cutting/joining tool some of the older versions of ffmpeg seem to have problems with syncing audio on avchd (mp4 TS) streams. (see Videocut muxer)
:boom: Only ffmpeg and libavformat versions >=3.1 are supported.
:boom: Be aware that this tool does not cut exact on frame - except you reencode the whole film.
:boom: Subtitles come in differents flavours: Image and text. A conversion from image subs to text subs is not supported.
:boom: hevc codecs can be reencoded into an mp4 container but not remuxed - neither remux nor ffmpeg work can "copy" that codec.
Virtualenv or conda
The fast remux binary doesn't run in a virtual environment, since the ffmpeg libraries used are not available. The ffmpeg blob could be used, if it would be on the /usr/bin path on the host system. Cross OS binary calls tend be a lot slower that in the native environment - so this software is limited to Linux (native or virtualized)
Subtitles
Finalized in Version 1.3.0, improved in Version 2.0.0. Not all containers (e.g. mp4) accept subtitles. A AVCH (h264 TS) Stream with DVB_SUB codec cannot be converted into mp4, so your miles may vary if you change the output container (defined by the file extension)
For DVB transport stream you should keep the ".m2t" ending, mkv containers shouldn't be changed either. See here for a overview of containers.
Audio Monitoring
MPV supports audio streams while playing. Unfortunately it relies on the audio stream while seeking (precise) thus rendering exact seeking sometimes difficult due to problems decoding it. So audio is turned of (not just muted) while seeking. The "auto" mode has been replaced with the first valid audio stream and seems to work better for listening while cutting.
Support for Qemu:
-v will use a virtual GL driver for the preview window. (videocut -v)
Player included
videoplay is a spinoff as a small easy to use media player.
Settings
The cog icon at the toolbar will open the settings dialog, providing the following settings:

- Reencode: Precise, frame exact cut. This option might take hours. Default is off
- VideoCut Muxer: Toggle between the internal Muxer or the ffmpeg command line. Default is on.
- Audio Mute: Mute all audio streams and extract video only. Default is off (no mute)
- Quick Search: Makes seeking faster, but only on I frames. The jog dial stays precise
- Show Subtitles: Show subtitles in the preview window (mpv backend only)
- Use GL Widgets (mpv backend only). Needed for wayland. Default is on (works with X11 as well)
Pressing one of the lightgreen "buttons" toggles the settings directly.
Languages
The flag icon opens the language dialog:

Select up to 3 languages for extraction. The tracks can be moved in order with the green arrows on the right side. Note that this selection is ignored if audio is muted.
##Install
Install via ppa on Linux Mint or Ubuntu (Mint 22.2, Ubuntu 22.04 and newer versions)
sudo add-apt-repository ppa:jentiger-moratai/mediatools
sudo apt update
sudo apt install --no-install-recommends videocut
(--no-install-recommends will install only what is required) Select video and open it with "Open with ->VideoCut", oder via terminal "VideoCut"
Remove with:
sudo apt remove videocut
Install VideoCut via AUR (Arch Linux /Manjaro only)
- Use pamac or other GUI tools, search for "videocut" in AUR, click install
- Manually :
- Download PKGBUILD
- unpack it and go into the "videocut" folder
- execute
makepkg -s - execute
sudo pacman -U videocut-3.x.x.x-1-x86_64.pkg.tar.zst - uninstall via
sudo pacman -Rs videocut
Select video and open it with "Open with ->VideoCut", oder via terminal "VideoCut"
Install dependencies manually on Linux Mint or Ubuntu (tested from 20.04 to 22.04)
sudo apt –no-install-recommends install python3-pyqt6 ffmpeg python3-pil libmpv2
libmpv1 won't work on Ubuntu 18.04 - no bindings for the old libs - use opencv instead For Ubuntu 23.04 or Debian 12 and newer libmpv2 should be used.
Install dependencies on Fedora
sudo dnf python3-qt6 ffmpeg python3-pillow-qt mpv-libs.x86_64
How to install with a terminal
- Install dependencies (see prerequisites)
- Download the videocut*.tar from the download link (see above)
- Extract it to a location that suits you.
- Open a terminal to execute the install.sh file inside the folder with sudo like
sudo ./install.sh - (if you are in the download directory - just an example)
- The app will be installed in /opt/videocut with a link to /usr/bin.
- The app should be appear in a menu or "Actvities"
- Can be openend by selecting a video file & Open with...
- In the terminal can be started via
videocut - python qt6, mpv and ffmpeg are required
- you may now remove that download directory.
- logs can be found in the user home ".config/VideoCut" folder
How to remove
- Open a terminal
- execute
sudo /opt/videocut/uninstall.sh
Still on my list:
- Multi language support
- Videoplayer as spinoff
Using ffmpeg instead of Videocut muxer
remux5 is a c binary based on the libavcodec library, but uses an integrated approach to cut and join videos. It seems to be more precise than the ffmpeg API. It supports reencoding as well. It is activated by default and runs on all threads available. To activate FFMPEG, use the "coggs" icon (or click on the green labels) and deselect "VideoCut Muxer".
Exact frame cut for one GOP only?
Can't be really implemented with the ffmpeg ABI. The transcoded part will have different coding parameters than the rest of the stream. A decoder cannot handle that change. On the other hand there is no way to transcode the GOP with the exact parameters of the original stream, since only a subset of h264 paramenters are accepted by the ffmpeg ABI.
Legacy Opencv (for Ubuntu 18.04 and older)
Since Videocut ran with OpenCV for many years it is still available. If needed it has to be downloaded
- python3-opencv
- hdf5 (Arch only)
Copy the .desktop file and change the exec line to "Exec= python3 .../VideoCut.py -p cv %f"
Opencv will not be displaying subtitles nor frametypes.
Changes
21.03.2026
- Support weak/virtual devices via Settings
14.03.2026
- renamed the player to VideoPlay
03.03.2026
- Hardened interlacing recognition, fixed interprocess communication
24.02.2026
- Refined seeking, nvidia tweaks
16.01.2026
- Support virtual machines - hardening vc.ini
03.01.2026
- Refines GTK compatiblity, introduces "videoplay" video/audio p
