Skip to content

Conversation

@MINIXJR
Copy link

@MINIXJR MINIXJR commented Jan 31, 2026

Summary

This PR modernizes TTCut to work with current Linux distributions (tested on Debian forky/sid).

Changes

  1. Qt5 Migration - Update from Qt4 to Qt5, replace deprecated QGLWidget with QOpenGLWidget for Wayland compatibility

  2. Replace transcode with ffmpeg - transcode is discontinued; ffmpeg provides equivalent functionality for re-encoding frames around cut points

  3. Migrate from mplayer to mpv - mplayer is deprecated and has compatibility issues; mpv provides better Wayland support

  4. Add Debian packaging - debian/ directory with packaging files, .desktop file for application menu, launcher script for Wayland

  5. SRT subtitle support - Based on work by @Minei3oat (PR Add support for SubRip-Subtitles #1): auto-load SRT files, display in preview, cut along with video/audio

  6. UI bug fixes - Fix navigator display not showing cut markers, initialize member variables properly, fix encoding error handling

Testing

Built and tested on:

  • Debian forky/sid (testing)
  • Qt 5.15
  • gcc 14.2
  • Wayland (via XWayland with QT_QPA_PLATFORM=xcb)

Credits

🤖 Generated with Claude Code

MINIXJR and others added 6 commits January 31, 2026 13:21
- Update all Qt includes from Qt4 to Qt5 module structure
- Replace deprecated QGLWidget with QOpenGLWidget for Wayland compatibility
- Fix deprecated QFlags constructor usage
- Fix all compiler warnings for Qt5 compatibility
- Update ttcut.pro for Qt5 build system

Tested on Debian forky/sid with Qt 5.15.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
transcode is discontinued and unavailable on modern systems.
ffmpeg provides equivalent functionality for re-encoding frames
around cut points.

Changes:
- Replace tttranscode class to use ffmpeg instead of transcode
- Update encoding parameters for ffmpeg compatibility
- Fix preview error handling

Co-Authored-By: Claude Opus 4.5 <[email protected]>
mplayer is deprecated and has compatibility issues on modern systems.
mpv provides better Wayland support and is actively maintained.

Changes:
- Replace mplayer with mpv in TTMplayerWidget
- Update player parameters for mpv compatibility
- Fix progress tracking during stream operations
- Update navigation button icons

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add debian/ directory with packaging files
- Add .desktop file for application menu integration
- Add launcher script for Wayland compatibility (QT_QPA_PLATFORM=xcb)
- Add build-package.sh helper script

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Based on the work by Minei3oat (PR baltendorf#1).

Features:
- Auto-load SRT files matching video filename
- Display subtitles in video preview frame
- Pass subtitles to mpv via --sub-file parameter
- Cut subtitle streams along with video/audio
- Generate subtitle previews for cut preview dialog

New files:
- avstream/ttsrtsubtitlestream.cpp/h - SRT parser
- avstream/ttsubtitleheaderlist.cpp/h - Subtitle header management
- data/ttsubtitlelist.cpp/h - Subtitle data list
- data/ttopensubtitletask.cpp/h - Async subtitle loading
- data/ttcutsubtitletask.cpp/h - Subtitle cutting task
- gui/ttsubtitletreeview.cpp/h - UI widget for subtitle list

Co-Authored-By: Minei3oat
Co-Authored-By: Claude Opus 4.5 <[email protected]>
Incorporates improvements from the ttcut fork:
- Fix navigator display not showing cut markers
- Initialize member variables properly
- Fix encoding error handling
- Update UI layouts for better usability

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@Minei3oat
Copy link

Back when I wrote the SRT support, I also fixed some other issues. Since I realized this repository is basically abandoned since 2010, I never invested the time to refactor and upstream them. You can find them in https://github.com/Minei3oat/ttcut/tree/temp. I used that branch until last year when I replaced TTCut with MCut, my own smart video editor.

@MINIXJR
Copy link
Author

MINIXJR commented Feb 1, 2026

Thanks for the tip, maybe I can use some of your corrections 👍.
I only sent my pull request back to this project to create a link for other users who are looking for software like this so that they can find my TTCut-ng. (Still in development)
The initial goal of my project was to replace transcode and, in the next step, to enable frame-accurate cutting for h264 and h265 recordings. The focus is on VDR recordings.
I assume you are also German?
As far as I can see, MCut is intended for MPEG2, or should it also cut other codecs?

@Minei3oat
Copy link

Minei3oat commented Feb 1, 2026

I assume you are also German?

Yes.

As far as I can see, MCut is intended for MPEG2, or should it also cut other codecs?

Since I'm interfacing with libavcodec, the library behind ffmpeg, MCut should be able to work with all container formats and codecs supported by ffmpeg. In reality, lots of container formats cannot be read due to the way I implemented seeking (ts works, mkv not) and there are some problems with some codecs/parameter values. For example MCut was able to cut ZDF HD while it failed for ARTE HD.

@MINIXJR
Copy link
Author

MINIXJR commented Feb 1, 2026

Sehr interessant, muss ich unbedingt ausprobieren.
HD Sender sollten dann ja schon AVC/h264 sein.
Ein schneller Test bei meinen Aufnahmen (DVB-S2) zeigt einen Unterschied bei Bitrate und der Anzahl der Referenz Frames ZDF 6, Arte 4.
Aber erstmal mache ich mit TTCut-ng weiter, bzw. mein neuer Freund Claude und ich 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants