Skip to content

Repository files navigation

CI CodeQL

g-tmce

Create professional MKV remuxes with TMDB metadata, artwork, chapters, language handling, and MKVToolNix automation — without manually building mkvmerge commands.

G-TMCE is a cross-platform PySide6/Qt 6 desktop application for creating, extracting, and managing MKV files on Linux and Windows. The interface includes native Dark and Light themes and is independent of any specific Linux desktop environment.

It combines MKVToolNix, FFmpeg, and TMDB into a single workflow and automatically handles tasks that are normally performed manually:

  • 🎬 MKV remuxing and extraction
  • 🏷️ Automatic TMDB metadata (tags.xml) generation
  • 🖼️ Automatic poster, backdrop, and logo downloads
  • 🌐 Audio and subtitle language management
  • 📖 Automatic chapter generation
  • 🎯 Forced and SDH subtitle detection
  • 🔊 Audio synchronization between different frame rates (23.976 ↔ 24 ↔ 25 FPS)
  • 📦 Consistent MKV structure and output naming

Why G-TMCE?

Creating a properly tagged MKV often requires multiple tools and many manual steps:

  1. Search TMDB
  2. Download artwork
  3. Create tags.xml
  4. Configure tracks
  5. Set default audio/subtitle flags
  6. Handle forced or SDH subtitles
  7. Create chapters
  8. Build the final mkvmerge command

G-TMCE automates the entire process and keeps every MKV organized using predictable naming rules and metadata handling.


📚 Documentation

🚀 Setup 🎬 MKV Tools 🏷️ Metadata & Rules ⚙️ Advanced
✨ Features 🎞️ Create MKV Workflow 📂 Track Folder Naming Rules 🛠️ Automatic Template Generation
📋 Requirements 📤 Extract MKV Workflow 🎭 TMDB Integration 📖 Automatic Chapters
📦 Installation 🏷️ Output Naming 🌐 Language Handling
⬇️ Releases & Downloads 📁 Extraction Naming Rules ⚙️ Settings
▶️ Launch 📝 Notes
🧰 Third-Party Tool Management 📄 License

Features

🎬 MKV Creation

  • Automatic MKVToolNix config generation
  • TMDB metadata and artwork integration
  • Automatic tags.xml generation
  • Automatic output naming from TMDB titles
  • Automatic chapter generation
  • Language-aware audio and subtitle ordering
  • Default audio/subtitle selection rules
  • Forced and SDH subtitle detection
  • Audio and video append support
  • Automatic FPS detection
  • Generated .generated.mtxcfg audit file for every mux

📤 MKV Extraction

  • Video, audio, subtitle, attachment, chapter, and tag extraction
  • Automatic track naming
  • Forced/SDH subtitle naming
  • FPS-aware video extraction
  • Extraction output ready for re-muxing

🔊 Audio Processing

  • Delay adjustment
  • Audio trimming/cutting
  • Codec conversion
  • Bitrate and sample-rate conversion
  • Channel-layout conversion
  • Volume boost

🎯 FPS Synchronization

  • PAL speedup presets
  • NTSC ↔ PAL audio synchronization
  • 23.976 ↔ 24 ↔ 25 FPS conversion workflows
  • Audio speed correction for remux projects

Interface themes

G-TMCE ships with two application-controlled themes:

  • Dark — the default modern navy/indigo interface.
  • Light — the same layout with a bright neutral palette.

Use the sun/moon button beside the interface-language selector to switch themes instantly. The selected theme is persisted in the per-user settings file. Because the styling is implemented with Qt/QSS rather than KDE-specific APIs, the same G-TMCE appearance is used across supported desktop environments.

Requirements

Runtime:

  • Linux or Windows
  • Python 3.10+
  • PySide6 / Qt 6 (>=6.11.2,<7)
  • Pillow (>=12.3.0,<13)
  • certifi (>=2026.7.22,<2027) for the bundled trusted CA certificate store
  • faster-whisper (>=1.2.1,<2) for local speech-to-subtitle generation
  • CTranslate2 (>=4.0,<5) for Whisper inference and GPU capability detection

Install the runtime dependencies for a source checkout with:

python3 -m pip install --upgrade -r requirements.txt

G-TMCE no longer uses Tkinter, tkinterdnd2, or Tk-specific file-dialog helpers. File dialogs, drag-and-drop, and theming are supplied by PySide6/Qt 6.

The Qt interface is desktop-environment agnostic: KDE Plasma, GNOME, XFCE, Cinnamon, Wayland, and X11 are supported as long as the normal Qt platform libraries are available.

Supported Architectures:

Component Supported
MKVToolNix AppImage Linux x86_64
FFmpeg Linux x86_64, Linux aarch64
Windows EXE Windows x86_64

Installation

Arch Linux (AUR)

G-TMCE is available on the Arch User Repository as g-tmce.

# Using yay
yay -S g-tmce

# Using paru
paru -S g-tmce

# Manual
git clone https://aur.archlinux.org/g-tmce.git
cd g-tmce
makepkg -si

The AUR package installs the g-tmce launcher command, desktop menu entry, application icon, and Dolphin/KDE service menu integration.

File dialogs are provided directly by Qt and do not require KDE-specific helpers.

Clone Repository

git clone https://github.com/G-grbz/G-TMCE.git
cd G-TMCE
python3 -m pip install --upgrade -r requirements.txt

Automatic Installation

chmod +x install.sh && sudo ./install.sh

The installer automatically installs required system dependencies, desktop launcher entries, application icons, Dolphin context menu integration, and creates the g-tmce launcher command.

Supported distributions: Debian / Ubuntu, Fedora, Arch Linux, openSUSE


Releases & Downloads

Pre-built Windows executables and Linux AppImages are available on the Releases page.

Version tags (vX.Y.Z) are built through the verified release workflow. Release assets include the Windows EXE, Linux AppImage, source archive, CycloneDX SBOM, and SHA256SUMS; GitHub artifact attestations are generated before publication.

VirusTotal Note: A few antivirus engines may occasionally flag G-TMCE as suspicious. The application uses FFmpeg and MKVToolNix, works directly with media files, and launches external processes as part of its normal operation. Because of this, some machine learning–based antivirus solutions may generate false positives.

At the time of writing, the latest release is detected by 5 out of 71 security vendors on VirusTotal, while major vendors such as BitDefender, Kaspersky, ESET, Malwarebytes, Sophos, and Trend Micro report the file as clean.

VirusTotal Report

Building from Source

Project files are grouped by purpose: src/gtmce/ contains the application modules, assets/ contains shipped UI/branding images, scripts/ contains release helpers, and tests/ contains regression coverage. The root mkv_creator_ui.py file remains the compatible application entry point.

Windows EXE:

py -3 -m pip install --upgrade -r requirements-build.txt
py -3 scripts/build_windows_exe.py

Output: dist\G-TMCE.exe

The right-click integration is opt-in: enable Extract right-click menu once from the main interface. On Windows, it registers a per-user Explorer entry for supported media containers named Open with G-TMCE Extract; no admin permission is required because it uses HKEY_CURRENT_USER.

The EXE is copied to the stable %LOCALAPPDATA%\G-TMCE\G-TMCE.exe launcher path; Explorer always uses that path rather than a versioned GitHub download name. Open a newer release once and it atomically updates this stable launcher, so the right-click menu keeps working without unregistering an old version or registering every new one.

On Linux, double-clicking any AppImage version atomically refreshes the stable per-user AppImage and G-TMCE application-search entry under ~/.local/share/. This keeps application search on the newest version without administrator privileges or duplicate entries. The same option additionally enables the user-level KDE/Dolphin service menu; other Linux file managers do not share Dolphin's service-menu API. When the AUR package or install.sh installation is launched instead, G-TMCE removes only its stale per-user AppImage menu so the system g-tmce right-click action takes precedence. Turning the option off removes only the AppImage context-menu integration.

dist\G-TMCE.exe --install-context-menu
dist\G-TMCE.exe --uninstall-context-menu

These commands are the manual/recovery equivalent of the checkbox and save the same preference, so an uninstall is not restored at the next launch.

AppImage:

chmod +x build_appimage.sh
./build_appimage.sh

Output: dist/G-TMCE-x86_64.AppImage


Launch

# As a command
g-tmce

# Directly
python3 mkv_creator_ui.py

Third-Party Tool Management

G-TMCE does not depend on system-installed MKVToolNix or FFmpeg binaries. On first use, the application automatically creates the 3rdParty/ directory and downloads:

  • MKVToolNix AppImage → mkvmerge, mkvextract
  • FFmpeg build → ffmpeg, ffprobe

Automatic Updates: Latest versions are checked once per session. New versions are downloaded before old versions are removed; old versions are cleaned automatically after successful installation.

If there is no internet connection, existing installed tools continue to work. Operations fail only if no previous installation exists.

Persistent files:

3rdParty/bin/
3rdParty/installed.json

Create MKV Workflow

  1. Select the track folder
  2. Enter your TMDB API key
  3. Select media type (movie or tv), artwork language, and tag language
  4. Press Find ID
  5. Optionally enter video FPS, default audio languages, and default subtitle languages
  6. Press Download Artwork/Tags
  7. Press Create MKV

Extract MKV Workflow

  1. Select the source MKV
  2. Track scan opens automatically
  3. Optionally refresh with Scan MKV
  4. Toggle off unwanted items
  5. Press Extract Selected

The extraction folder is automatically set as the current track folder.


Track Folder Naming Rules

The selected track folder should contain one media track per file. Files extracted with G-TMCE are already named in the expected format.

Media track files must be placed directly inside the selected track folder. Font attachments can be inside subfolders.

Recommended naming style:

<language>[.<flag>...][.<fps>].<extension>

Examples:

und.23.976.h265
en.eac3
tr.ac3
forced.en.srt
sdh.tr.srt
tr.ass

Supported Track Extensions

Type Extensions
Video .h264 .h265 .hevc .avc .m1v .m2v .ivf
Audio .aac .ac3 .eac3 .ec3 .dts .dtshd .flac .m4a .mp2 .mp3 .ogg .opus .thd .truehd .wav
Subtitle .srt .ass .ssa .vtt .sup .sub

Language Tokens

G-TMCE reads the language from filename tokens separated by dots, underscores, hyphens, or spaces. Use a clear two-letter language code whenever possible:

en.eac3   tr.srt   ja.ass

Common aliases are also accepted:

Alias Language
eng en
tur tr
jpn ja
deu / ger de
fre / fra fr
spa es

If the filename contains und, the track is treated as unknown and inherits the selected tag language during muxing.

Video FPS Tokens

Video FPS can be detected from the video filename when it appears as its own token:

und.23.976.h265
und.24.h264
und.24000/1001.h265

If the Video FPS field in the UI is filled, that value overrides the filename-detected FPS.

Forced and SDH Subtitles

Forced subtitles are detected from these tokens: forced, force, forc

forced.en.srt   en.forced.ass
  • Track name becomes Forced
  • Forced display flag is enabled

SDH / hearing-impaired subtitles are detected from these tokens: sdh, hi, cc, hearing

sdh.en.srt   tr.cc.ass
  • Track name becomes SDH
  • Hearing-impaired flag is enabled

If both tokens are present, the track name becomes Forced SDH.

Audio Append

Split audio files can be appended automatically. The main file and numbered parts must share the same base name and extension:

en.eac3
en.1.eac3
en.2.eac3
  • .1 must exist for append detection to start
  • .2, .3, etc. are appended in numeric order
  • Append parts are not added as separate tracks
  • Audio and video append is supported; subtitle append is not

In the Add Tracks window, audio rows have a + control to append one or more audio files to the selected track without manually placing numbered files in the folder.

Attachments, Artwork, and Fonts

The following artwork files are attached automatically when present in the selected track folder:

cover.jpg         small_cover.jpg
cover_land.jpg    small_cover_land.jpg
logo.png

Cover artwork is normalized to Matroska cover-art sizes:

  • cover.jpg and cover_land.jpg: 600 px on the smallest side
  • small_cover.jpg and small_cover_land.jpg: 120 px on the smallest side

Font files are attached automatically and may be placed directly in the track folder or inside subfolders.

Supported font extensions: .ttf .otf .ttc .otc .woff .woff2

Font attachment notes:

  • Keep the original font files used by .ass / .ssa subtitles
  • Avoid duplicate font filenames that differ only by letter case
  • Attachment names are written using the file name

Example Folder Structure

Movie.Name.2025_tracks/
  und.23.976.h265
  en.eac3
  tr.ac3
  forced.en.srt
  tr.ass
  cover.jpg
  small_cover.jpg
  cover_land.jpg
  small_cover_land.jpg
  logo.png
  fonts/
    Arial.ttf
    SomeSubtitleFont.otf

Key points:

  • Use clear language tokens such as en, tr, ja, or und
  • Put metadata words like forced and sdh in separate filename tokens
  • Keep media track files at the top level of the track folder
  • Keep append parts beside the main file
  • Use extracted single-track files for predictable muxing

TMDB Integration

G-TMCE can automatically download:

cover.jpg   small_cover.jpg   cover_land.jpg   small_cover_land.jpg   logo.png

It can also automatically generate tags.xml.

If tags.xml already exists it is not overwritten, but missing G-TMCE app tags are added. Existing artwork files are also kept and skipped by the TMDB download step. During muxing, --global-tags is automatically applied.


Output Naming

The final MKV filename is generated from the TMDB title using the selected artwork language.

Example:

Artwork language: tr
TMDB title:       Interstellar
Output:           Yıldızlararası.mkv

Find ID also attempts to detect title and year from folder names:

Project.Hail.Mary.2026.1080p...  →  Project Hail Mary (2026)

Language Handling

Tracks without a detectable language (und.*) automatically inherit the selected tag language during muxing.

Default Audio Selection

Language priority can be entered as:

en,tr,jp
  • The first matching language becomes default
  • Video tracks stay first
  • Audio tracks are grouped together after video tracks
  • Matching audio languages are moved to the top of the audio group

Default Subtitle Selection

If subtitle priority is empty, no subtitle track becomes default.

Subtitle tracks are grouped after audio tracks. When subtitle priority is set, matching languages are moved to the top of the subtitle group. Forced subtitles only become default if explicitly selected by language priority.


Automatic Template Generation

Template config is optional. If no config is provided, G-TMCE automatically generates a mux template using known track extensions such as:

*.h264   *.h265   *.ac3   *.eac3   *.srt

Automatic Chapters

If chapters.txt does not exist and automatic chapters are enabled, G-TMCE generates chapters using: chapter name, interval, start number, and end minute. When intro-end detection is enabled, the first automatic chapter is aligned to the detected intro end when the signal is reliable; otherwise the normal interval-based start is used.

Example output:

CHAPTER03=00:30:00.000
CHAPTER03NAME=ggrbz 3

Durations over 60 minutes are automatically written as:

01:00:00.000

Extraction Naming Rules

Second extracted tracks with the same language are numbered with parentheses so they stay separate from append parts:

eng.(2).srt
tur.(2).srt

Append parts still use plain numeric suffixes, such as eng.1.eac3 and eng.2.eac3, and are appended to eng.eac3.

Extracted video tracks include the detected FPS:

und.23.976.h264

If mkvmerge exits with code 1, the operation is still considered successful because MKVToolNix uses exit code 1 for warnings.


Settings

The following settings are saved automatically:

  • TMDB API key
  • Media type
  • Artwork language
  • Tag language
  • Video FPS
  • Chapter settings

Location: ~/.config/g-tmce/settings.json


Security

G-TMCE validates trusted HTTPS origins and redirects for metadata, subtitle, application-update, and third-party tool downloads; constrains archive extraction; avoids shell-based media tool execution; and removes API credentials and dangerous loader variables from third-party subprocess environments. Sensitive per-user settings are written atomically with private file permissions where supported.

The repository uses CI, CodeQL security-extended, Dependabot, and dependency auditing. Please report vulnerabilities privately as described in SECURITY.md.


Notes

  • Missing optional tracks are skipped automatically
  • Missing TMDB artwork does not stop muxing
  • Existing artwork files are reused if already present
  • Every mux operation writes a *.generated.mtxcfg file beside the output MKV for auditing and debugging

License

LICENSE

Local audio-to-subtitle engine

The Adjust Audio / Ses Ayarla window can create subtitles directly from each audio track. G-TMCE uses a local faster-whisper/CTranslate2 engine; audio is not uploaded to a transcription service. The track language is passed to the model explicitly (tr → Turkish, en → English, de → German, fr → French, etc.) and output is written next to the track as *.generated.srt.

The default model is turbo (large-v3-turbo). It is downloaded on first use and cached outside the application bundle. Advanced overrides are available through GTMCE_ASR_MODEL, GTMCE_ASR_MODEL_DIR, and GTMCE_ASR_DEVICE=auto|cpu|cuda.

Generated subtitles pass through a conservative hallucination-cleanup stage before long-gap recovery and again before the SRT is written. It removes subtitle-credit boilerplate (for example split Altyazı M.K.-style artifacts), detached punctuation/initial fragments, impossible multi-word micro-cues, and implausibly short creator/outro boilerplate while preserving ordinary dialogue. Cleanup counts and reasons are written to the ASR log.

ASR GPU runtime on Linux

When the source installer detects an NVIDIA GPU on Linux x86-64, it installs nvidia-cublas-cu12 and nvidia-cudnn-cu12 into G-TMCE's private vendor directory and exposes those libraries only to the G-TMCE launcher. This keeps the host Python environment untouched while satisfying current faster-whisper / CTranslate2 CUDA runtime requirements. The first ASR model download is cached under ~/.cache/G-TMCE/models and its progress is reported in the G-TMCE log.

Audio subtitle creation

Clicking Create Subtitle / Altyazı Oluştur starts the local faster-whisper transcription directly; there is no subtitle-type selector. Generated output remains *.generated.srt.

Normal dialogue transcription runs sensitive VAD rescue on subtitle gaps of 8 seconds or longer. The rescue pass still requires speech-like audio before invoking Whisper, so shorter genuine dialogue omissions can be recovered without blindly transcribing quiet film passages.

About

G-TMCE is a small Tkinter app for Linux and Windows that extracts media tracks, creates MKV files, adds TMDB-based tags.xml, titles and visuals.

Topics

Resources

Security policy

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages