Skip to content

About

Video toolkit: HEVC/AV1 encoding with hardware-encoder detection, track muxing, chapter editing (ffmpeg + mkvtoolnix)

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

50 Commits

Folders and files

Repository files navigation

MediaForge

Cross-platform (Windows/macOS/Linux) video toolkit — encode to HEVC/AV1 with automatic hardware-encoder detection (Intel QuickSync, AMD AMF, NVIDIA NVENC, Apple VideoToolbox, or software libx265/libsvtav1), mux tracks, and edit chapters. Built around fine per-file control (stream selection, trim, real bitrate, track titles, tag fixes) for files that differ from one another, rather than around batch processing — encoding can also run across a whole folder at once, which is mainly useful when the source files are similar (e.g. clips from the same phone or camcorder sharing the same settings).

Why HEVC/AV1: these are the two codec families actually worth targeting today. HEVC is the most advanced codec with genuinely wide playback compatibility (hardware decode on essentially every modern TV, phone, and media player); AV1 compresses better still, but needs dedicated encode/decode hardware to be practical and is supported by fewer players — worth it when you control the playback side, not a safe default otherwise.

MediaForge screenshot

Features

  • Encode: HEVC or AV1, with an optional scaling cap (1080p/720p, off by default), aspect ratio/FPS/flip filters, per-stream selection (video/audio/subtitles), trim, and a live command preview — for one file with its own settings, or a whole folder of similar files at once
  • Quality (CRF) defaults to a value computed from the selected file's resolution and the chosen encoder — higher resolution and more efficient codecs (AV1) can use a higher CRF for the same perceived quality — instead of one fixed number for every file; stays put once you edit it by hand, with a button to re-enable the automatic default
  • A stalled encode (typically a subtitle track with a corrupted timestamp confusing the muxer's interleaving — seen as time= frozen in the progress line, sometimes alongside a burst of Starting new cluster due to timestamp messages) is detected automatically and retried without subtitles, which are then muxed back in afterward with no re-encoding; the same "exclude, mux back in afterward" behavior is also available as a manual subtitle option to sidestep the issue proactively instead of waiting for the automatic retry. Subtitles muxed back in this way honor the same trim as the rest of the file, instead of being pulled in full from the source
  • Available encoders are detected automatically at startup by actually probing ffmpeg on the current machine (not just checking what it was compiled with), so the app proposes the right one per machine (AMF on AMD, QSV on Intel, VideoToolbox on Apple Silicon…)
  • Rate control: constant quality (CRF) or a target average bitrate in kbps (single-pass VBR, verified with QSV HEVC and libx265; the AMF/NVENC/VideoToolbox/AV1 variants are untested), with an optional 2-pass mode for the software encoders (libx265, SVT-AV1)
  • QSV (HEVC) offers 3 real preset levels (fast / normal / slow), and its default CRF follows measured values per resolution (480p=16, 720p=18, 1080p=20, 4K=22)
  • On Windows with a QSV encoder, decoding and the resolution-cap scaling both run on the GPU (d3d11va decode, frames kept on the GPU through scale_qsv to the encoder), with HDR/10-bit files keeping their color depth and HDR metadata; other filters (crop/pad/fps/flip) are software and only then pull the frames back to system memory. If hardware decoding fails on a specific file, the app retries it automatically with software decoding
  • "Stop and keep file" closes the current encode cleanly and keeps the playable partial file (the regular "Interrompi" button discards it)
  • "Check original FPS": counts the real (non-duplicated) frames on 5 short clips and compares them with the declared rate (e.g. a 24 fps film stored as 30 fps); proposes the matching FPS limit, and also flags variable frame rate
  • Log panel text is selectable and copyable (mouse or Ctrl+C/Ctrl+A) while staying read-only
  • Exact real video bitrate (from packet sizes, not an estimate) and two maintenance tools: fix the HEVC tag some players need for HEVC-in-MP4, and fix a stale/wrong bitrate tag
  • Audio-only mode for extracting/transcoding just the audio track
  • Mux: combine or replace tracks across files without re-encoding, add external audio/ subtitle tracks, edit track titles, extract a single track back out to its own file
  • Chapters: edit a chapter list, import/export in OGM chapter format, apply via mkvpropedit when available (fast, no remux) or a full ffmpeg remux otherwise

Requirements

  • ffmpeg/ffprobe in PATH
  • Python 3 with tkinter (standard library)
  • tkinterdnd2 — optional, enables drag-and-drop file loading
  • mkvtoolnix (mkvpropedit) — optional, enables fast chapter/tag edits without a full remux

Running

pythonw MediaForge.pyw

Structure

  • MediaForge.pyw — main application (a single App class), three tabs (Encode / Mux / Chapters) sharing one log panel

License

MIT

About

Video toolkit: HEVC/AV1 encoding with hardware-encoder detection, track muxing, chapter editing (ffmpeg + mkvtoolnix)

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages