WI
will-molloy/auto-handbrake-encoding
Automating HandBrake encoding
auto-handbrake-encoding
Automating HandBrake encoding with Java
Use cases
Converting to CFR video
Why?
- You might have variable/peak frame rate (VFR/PFR) recordings, leading to audio sync issues in video editing software
- This is a problem with NVIDIA ShadowPlay and AMD ReLive
How?
- Recursively scans input directory for
.mp4files to encode - Encodes
.mp4files with a Constant Frame Rate (CFR) preset- Encoded files are named with the suffix
.cfr.mp4 - The preset used is "Production Standard" H.264
- It works with any video resolution
- It works with any framerate
- It creates quite a large file afterwards, but it's ideal "as an intermediate format for video editing"
- I recommend deleting the encoded file after using it, and retaining the original archived file
- Encoded files are named with the suffix
- Archives original videos
Run with Docker:
The app requires the following arguments:
inputdirectory containing.mp4files to encodeoutputwhere you want encoded files to be savedarchivewhere you want archived files to be saved- (These can all be the same directory, personally I record and encode to an SSD, then archive to NAS)
docker pull ghcr.io/will-molloy/auto-handbrake-cfr:latest
docker run --rm -v <INPUT_DIR>:/input -v <OUTPUT_DIR>:/output -v <ARCHIVE_DIR>:/archive ghcr.io/will-molloy/auto-handbrake-cfrProject layout
| Module | Description |
|---|---|
| auto-handbrake-core | Core interface and classes required to run HandBrake via Java |
| auto-handbrake-cfr | CFR conversion, described above |
On this page
Languages
Java99.9%Dockerfile0.1%
GNU General Public License v2.0
Created December 22, 2021
Updated October 5, 2025