Repository navigation
Conversation
Nomis101
marked this pull request as draft
February 18, 2026 21:03
Contributor
|
It would be better to split each change in a different PR. |
Contributor
Author
|
OK, sure. Can work on splitting this next week. |
1 of 3 tasks
1 of 3 tasks
1 of 3 tasks
1 of 3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds support for FFmpeg audio and video filters in HandBrake, accessible via CLI options and the preset/job JSON API. This enables a range of audio processing and video enhancement capabilities powered by FFmpeg's libavfilter.
This is a first attempt for bug #1993, working on that for a few month now. As a first step to add FFmpeg filters, I focused solely on HandBrakeCLI. This was a bit complicated, therefore I had some help. I think the most difficult part is incorporating everything into a GUI, which was too complicated for me at this point. Therefore I focused on CLI only. I also focused only on filters that can be implemented without extra dependencies. I mainly implemented audio filters, as HandBrake doesn't have any yet.
What I had to left out is a filter for video stabilization, as this requires a 2-pass procedure. First, a pass that analyzes the video and writes a file, and then a second pass that reads the file and re-encodes the video with this data. What is also not included is the vibrance filter, as it didn't work with HDR.
Included are the following filter:
Video filters:
BM3D denoising
e.g. HandBrakeCLI -i in.mkv -o out.mkv -e svt_av1_10bit --bm3d[=string]
(presets: default/medium/strong, or custom params)
Deband (Remove banding artifacts from input video)
e.g. HandBrakeCLI -i in.mkv -o out.mkv -e svt_av1_10bit --deband[=string]
Equalizer (brightness/contrast/saturation/gamma)
e.g. HandBrakeCLI -i in.mkv -o out.mkv -e svt_av1_10bit --eq[=string]
(presets: brighten/darken/vivid)
Audio filters (stereowiden, dialoguenhance, crossfeed are stereo input only):
De-click (Remove impulsive noise from input audio)
e.g. HandBrakeCLI -i in.mkv -o out.mkv -e svt_av1_10bit --adeclick[=string]
De-clip (Remove clipped samples from input audio)
e.g. HandBrakeCLI -i in.mkv -o out.mkv -e svt_av1_10bit --adeclip[=string]
Compressor (Dynamic range compression)
e.g. HandBrakeCLI -i in.mkv -o out.mkv -e svt_av1_10bit --acompressor[=string]
Limiter
e.g. HandBrakeCLI -i in.mkv -o out.mkv -e svt_av1_10bit --alimiter[=string]
FFT denoiser
e.g. HandBrakeCLI -i in.mkv -o out.mkv -e svt_av1_10bit --afftdn[=string]
Non-local means denoiser (Reduce broadband noise)
e.g. HandBrakeCLI -i in.mkv -o out.mkv -e svt_av1_10bit --anlmdn[=string]
Noise gate
e.g. HandBrakeCLI -i in.mkv -o out.mkv -e svt_av1_10bit --agate[=string]
Crossfeed (headphone crossfeed filter, needs stereo input)
e.g. HandBrakeCLI -i in.mkv -o out.mkv -e svt_av1_10bit --crossfeed[=string]
Dialog enhancement (Enhance dialogue in stereo audio, output is 3.0 audio)
e.g. HandBrakeCLI -i in.mkv -o out.mkv -e svt_av1_10bit --dialoguenhance[=string]
Surround upmix (audio surround upmix, needs multichannel encoder)
e.g. HandBrakeCLI -i in.mkv -o out.mkv -e svt_av1_10bit --surround -E ac3
Loudness normalization (EBU R128)
e.g. HandBrakeCLI -i in.mkv -o out.mkv -e svt_av1_10bit --loudnorm[=string]
Stereowiden (Stereo image widening, needs stereo input)
e.g. HandBrakeCLI -i in.mkv -o out.mkv -e svt_av1_10bit --stereowiden[=string]
Note: Because of its complexity this is the first time I've used AI assistance (Claude Code). This implementation was developed with assistance from Claude Code for exploring and understanding the relevant codebase, debugging and for helpful tips. I have carefully written the code, ensured they integrate correctly with the existing codebase, and validated the behavior through testing. I tested with several input formats, output formats and filter variations. And I removed parts that turned out to not work (e.g. vibrance filter).
Tested on: