G-TMCE

June 4, 2026 ยท View on GitHub

G-TMCE is a Tkinter application for extracting and creating MKV files, available on Linux and Windows.

It generates a tags.xml using the TMDB API, enriches MKV files with titles and visuals, and ensures MKV files are always created with a consistent structure.


๐Ÿ“š 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 from track folders
  • Optional TMDB artwork download
  • Automatic tags.xml generation
  • Automatic output title generation from TMDB metadata
  • Automatic chapter generation
  • Default audio/subtitle selection by language priority
  • Forced/SDH subtitle detection
  • Audio append support (eng.ac3 + eng.1.ac3 etc.)
  • Automatic FPS detection and override support
  • Generated .generated.mtxcfg audit file for every mux

MKV Extraction

  • Video, audio, and subtitle tracks
  • Attachments
  • Chapters
  • Tags
  • Automatic output naming
  • Forced/SDH subtitle naming
  • FPS detection for extracted video tracks

Audio Adjustment

  • Delay or cut audio tracks
  • Codec conversion
  • Bitrate / sample-rate / channel-layout adjustment
  • Volume boost
  • FPS speed synchronization presets

Requirements

Runtime:

  • Linux
  • Python 3.10+
  • Tkinter
  • Pillow

Supported Architectures:

ComponentSupported
MKVToolNix AppImageLinux x86_64
FFmpegLinux x86_64, Linux aarch64
Windows EXEWindows 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.

Optional native file dialog helpers:

sudo pacman -S --needed kdialog zenity

Clone Repository

git clone https://github.com/G-grbz/G-TMCE.git
cd G-TMCE

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 executables and AppImages are available on the Releases page.

Windows support has been added. A pre-built .exe is available for download on the Releases page.

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

Windows EXE:

py -3 -m pip install --upgrade pillow tkinterdnd2 pyinstaller
py -3 build_windows_exe.py

Output: dist\G-TMCE.exe

On first launch, the EXE registers a per-user Explorer context menu entry for supported media containers. The menu item is named Open with G-TMCE Extract. No admin permission is required as registry entries are written under HKEY_CURRENT_USER. If you move the portable EXE, launch it once from the new location to refresh the context menu command path.

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

AppImage:

chmod +x build_appimage.sh
./build_appimage.sh

Output: 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

TypeExtensions
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:

AliasLanguage
engen
turtr
jpnja
deu / gerde
fre / frafr
spaes

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. 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.

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 tracks with the same language are numbered:

eng.2.srt
tur.2.srt

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


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