HandBrake / HandBrake

HandBrake's main development repository
https://handbrake.fr
Other
17.61k stars 1.34k forks source link

Natively Support SVT-AV1-PSY #6257

Closed gianni-rosato closed 1 month ago

gianni-rosato commented 1 month ago

Description of the feature or enhancement you'd like to see in HandBrake

I would like to request the integration of the SVT-AV1-PSY encoder into HandBrake. SVT-AV1-PSY is an enhanced version of the SVT-AV1 encoder, designed specifically for psychovisually optimized AV1 encoding. It introduces several advanced features aimed at improving perceptual quality, making it an ideal choice for users seeking high visual fidelity. Below, I've outlined some features that may be useful to Handbrake:

  1. Enhanced Perceptual Quality Out of the Box

    • SVT-AV1-PSY offers additional tuning options, such as SSIM with Subjective Quality Tuning (Tune 3, essentially a better Tune 0) and Still Picture optimization (Tune 4, for AVIF)
    • The defaults are more sane for visual quality compared to mainline's defaults, and have been thoroughly tested in order to ensure they provide optimal visual fidelity.
  2. Extended CRF

    • The Extended CRF feature provides more granular control over quality and bitrate, which is particularly useful for low bitrate scenarios. You can now set CRF in quarter-step increments, and the range has been extended to go up to 70.
  3. Support for High Dynamic Range and Dolby Vision

    • SVT-AV1-PSY includes native support for Dolby Vision and HDR10+ through parameters like --dolby-vision-rpu and --hdr10plus-json when the binary has been linked to the respective libraries. This makes it a superior choice for users working with HDR content.
  4. Improved Film Grain Synthesis

    • The encoder includes features like --fgs-table and --adaptive-film-grain to handle synthetic film grain more effectively, ensuring consistent quality across different types of content. In particular, --adaptive-film-grain is enabled by default for film grain synthesis & allows the grain sampling block to scale adaptively based on resolution.
  5. Compatibility and Continuous Development

    • The SVT-AV1-PSY project is actively maintained, with frequent micro-releases & continuous improvements. Our testing is consistent and reliable.
    • The encoder retains compatibility with existing SVT-AV1 projects, making it a seamless addition to HandBrake's suite of tools.

Adopting SVT-AV1-PSY would position HandBrake as a leader in offering cutting-edge video encoding technology to its users. The encoder’s focus on visual fidelity aligns with HandBrake’s mission to provide high-quality video conversion tools, making it a valuable addition for users who prioritize perceptual quality - especially in the context of HDR content.

Thank you for considering this feature request. I believe that adding support for SVT-AV1-PSY would significantly enhance HandBrake's value to users encoding AV1.

What Operating System are you running?

Arch Linux

What version of HandBrake are you running?

1.8.2

Where did you download HandBrake from?

Flathub

Activity Log, Crash Log or any other details

N/A
sr55 commented 1 month ago

We have no plans to use a fork of SVT-AV1.

If / When enhancements in any forks get pushed back to the main project, you'll see them in HandBrake when we update. In this case it seems they've already pushed a number of enhancements back

I'd note we already have support for HDR+DV when using SVT as well in HandBrake also.

gianni-rosato commented 1 month ago

Seems like your decision was quite popular!

I would like to humbly request you reconsider - there are a number of changes that will likely not make it to Mainline due to different goals. Are there any specific reasons you are against supporting this fork?

Dysthymia-1 commented 1 month ago

I've been using Handbrake as an enthusiast for 7 years. I'd be thrilled if SVT-AV1-PSY could be included with the official download.

Littux-Dustux commented 1 month ago

A fork would be better

Use ffmpeg if you're focused on quality. It isn't that hard to use ffmpeg and you won't regret it after learning it. There are a bunch of cool things you can do with ffmpeg. You can offload encoding to another device using ssh. I do that to offload encoding from my phone to my PC.

ffmpeg also supports more hardware acceleration methods.

sr55 commented 1 month ago

Forks ultimately come with risks associated with them and often either now or later overheads for us, so unless we have a significant problem with upstream, we'll tend to avoid them.

It's not a reflection of the work your doing and I do hope you eventually succeed in getting more of your work up-streamed.

galad87 commented 1 month ago

Nothing prevents HandBrake from using different defaults than SVT-AV1 in its presets. For example variance boost should definitely be enabled in HandBrake's AV1 presets, and it's something I plan to do. So even if some upstreamed features are not enabled by default, we can at least enable it in our built-in presets.

plonk264 commented 1 month ago

maybe could the occasional hb.dll with SVT-AV1-PSY be provided as an alternative download every so often?

or an easy way to integrate SVT-AV1-PSY into it...

LastBreeze commented 1 month ago

maybe could the occasional hb.dll with SVT-AV1-PSY be provided as an alternative download every so often?

https://github.com/vincejv/docker-handbrake/releases/tag/v1.0.2-windows.3 Some projects are already doing this periodically

galad87 commented 1 month ago

If someone wants to make a fork with SVT-AV1-PSY, all they need to do is:

  1. fork the repository on GitHub
  2. update contrib/svt-av1/modules.defs to point to SVT-AV1-PSY
  3. make some small changes like https://github.com/vincejv/docker-handbrake/blob/v1.0.2-windows.3/src/handbrake/0001-Add-subjective-ssim-in-gui-presets.patch , https://github.com/vincejv/docker-handbrake/blob/v1.0.2-windows.3/src/handbrake/0001-Allow-the-use-of-extended-CRF.patch , https://github.com/vincejv/docker-handbrake/blob/v1.0.2-windows.3/src/handbrake/0001-Fix-CRF-greater-63.patch to get the tunes and the extended CRF in the GUI
  4. commit and wait for GitHub CI to build all the versions