HandBrake & FFmpeg · Python GUI

Encode batches.
Pick tracks automatically.
Ship with presets.

Video Encoder (ffmpeg_encode) is a cross-platform desktop app: load HandBrake JSON presets, edit translated FFmpeg commands with placeholders, and let mkvinfo-backed rules choose English audio and Signs/Songs-style subtitles—then queue jobs with logs, ETA, and parallel or sequential modes.

3 Win · macOS · Linux
2 HandBrake + FFmpeg
Dry-run safe tests
Video Encoder
Files
HandBrake
FFmpeg
Settings
Debug
About
Scan Folder: C:\Users\ryanc\Downloads\RawAnime\Raw\2ToProcess
Save to: Same folder as input file Output folder C:\Users\ryanc\Downloads\RawAnime\Raw\Converted
Source Path Size Tracks Status
Shield Hero - S01E01.mkv 489.12 MB Not analyzed Pending
Shield Hero - S01E02.mkv 506.68 MB Not analyzed Pending
Shield Hero - S01E03.mkv 512.04 MB Not analyzed Pending
3 file(s) ready
ffmpeg -i input.mkv -map 0:v:0 -map 0:{AUDIO_TRACK} -c:v h264_nvenc -cq 22 -preset p4 -profile:v high -level 4.0 -vf scale=1920:1080:force_original_aspect_ratio=decrease,subtitles='{SUBTITLE_FILE}' -color_range tv -pix_fmt yuv420p -g 60 -c:a aac -b:a 160k -ac 2 -map_chapters 0 -map_metadata 0 -y output.mp4
Command Preview (read-only):
C:\...\ffmpeg.exe -i "Shield Hero - S01E01.mkv" -map 0:v:0 -map 0:1 -c:v h264_nvenc -cq 22 -preset p4 ... -y "Shield Hero - S01E01_encoded.mp4"
Placeholders: {INPUT} {OUTPUT} {AUDIO_TRACK} {SUBTITLE_TRACK} {SUBTITLE_FILE}
Dry Run Skip Existing Output Suffix: _encoded Sequential Parallel
Ready
Encoding Log
[INFO] Loaded preset: AppleTV 1080p30 Auto

Install

Run from source

Requires Python 3.8+, FFmpeg, HandBrake CLI, and MKVToolNix (mkvinfo). The app can auto-detect paths and offer installs via Chocolatey (Windows) or Homebrew (macOS)—see the repo README for Linux packages.

git clone https://github.com/Ryahn/ffmpeg_encode.git
cd ffmpeg_encode
pip install -r requirements.txt
python src/main.py

Presets, commands,
and real batch control.

Manage HandBrake presets, refine FFmpeg lines, and process folders with structure preserved—sequential or parallel encodes, skip-existing, dry run, and a live log with progress and ETA.

01
🎛
HandBrake Presets → FFmpeg

Load HandBrake JSON presets, keep a dropdown of recent presets with auto-save, and translate them into FFmpeg commands you can tweak. Last-used preset reloads on startup.

preset.json → FFmpeg tab (editable)
02
FFmpeg Commands & Placeholders

Save, load, and name custom command templates. Placeholders are replaced per job: input/output paths, resolved audio and subtitle track numbers, and extracted subtitle file paths when applicable.

-i "{INPUT}" -map 0:a:{AUDIO_TRACK} ... "{OUTPUT}"
03
🎯
mkvinfo Track Detection

For MKV files, mkvinfo supplies track language and names. Configure six groups in Settings: audio/subtitle language tags, comma-separated name regexes, and exclude regexes—plus Debug tab analysis when a file misbehaves.

tags: en, eng · names: English, ENG · exclude: 日本語
04
📁
Batch Workflow & Logs

Scan folders for common video types, preserve output folder layout, skip files that already have encodes, run parallel or sequential jobs, and watch encoding output in the built-in log viewer.

Files tab → Encode · dry run optional

Workflow

Three steps in
the GUI.

Pick inputs and presets, confirm which tracks mkvinfo resolved under your Settings rules, then encode with HandBrake or FFmpeg—optionally after a dry run that prints the command without processing.

01
Select Files & Preset

Use the Files tab to point at a folder of MKV, MP4, MOV, and other supported videos. Load a HandBrake preset JSON or build on a saved FFmpeg command template.

Files · HandBrake · FFmpeg tabs
02
mkvinfo + Detection Rules

For MKV, the app reads track metadata with mkvinfo, applies your language tags and comma-separated name/exclude regexes separately for audio and subtitles, and picks the first qualifying tracks. Debug tab shows raw mkvinfo and why a track won or lost.

mkvinfo → language tags + regex groups
03
Encode & Monitor

HandBrake CLI or FFmpeg runs with resolved paths and track indices injected into your command. Watch progress, ETA, and speed in the UI log; choose sequential or parallel queues and skip existing outputs when you want.

{INPUT} {OUTPUT} {AUDIO_TRACK} {SUBTITLE_TRACK}

See it in action

Real app.
Real workflow.

Watch a complete batch-encode session — scanning files, loading tracks, and running FFmpeg from start to finish.

Defaults from Track-Detection
wiki

Configure these in the app’s Settings tab as comma-separated lists. Language tags match mkvinfo language codes; name and exclude entries are regex. Try variants in the pattern playground above.

Audio language tags
en, eng
Track lang: en Track lang: eng
Audio name patterns
English, ENG
English 5.1 DTS ENG Stereo AAC
Audio exclude patterns
Japanese, JPN, 日本語
Filters JP dubs Filters 日本語 track names
Subtitle name patterns (Signs / Songs)
Signs.*Songs, Signs.*Song, Signs$, English Signs, ^Signs\s*$
English Signs & Songs Signs and Songs English Signs

Community Metrics

Global encoding
statistics.

Real-time stats from users running ffmpeg_encode.

0
Files Encoded
0 GB
Total Output Size
0h 0m
Total Encoding Time
Loading stats...