cdgriffith / FastFlix

FastFlix is a free GUI for HEVC and AV1 encoding, GIF/WebP/AVIF creation, and more!
MIT License
1.08k stars 54 forks source link

Implement Dolby Vision support #300

Open Genine-Collin opened 2 years ago

Genine-Collin commented 2 years ago

would it be possible to implement the new feature --dolby-vision from version 5.43 nvencc

cdgriffith commented 2 years ago

From a tech standpoint that's not hard. However adding it as a specific option in a GUI may incur the wrath of Dolby lawyers, as I believe encoding with DV requires licensing. Unless I get direct allowance from them or some legal council myself saying it's okay, I won't be able to add it in.

GrapeBacon commented 8 months ago

Wondering if you will revisit this now that Handbrake nightly is adding dovi support (H265 10bit software only at this time). Apparently they don't seem to be worried about legal issues from this.

https://www.reddit.com/r/handbrake/comments/11jau5t/nightly_branch_dolby_vision/?rdt=56203

Sample encode log (quick test for this issue)

HandBrake Nightly 20231018071745-43c78c3d5-master (2023102001)
OS: Microsoft Windows NT 10.0.22621.0
CPU: 13th Gen Intel(R) Core(TM) i5-13500H
Ram: 65089 MB, 
GPU Information:
  Intel(R) Iris(R) Xe Graphics - 31.0.101.4900
Screen: 1920x1200
Temp Dir: D:\temp\
Install Dir: C:\Program Files\HandBrake Nightly\
Data Dir: C:\Users\???\AppData\Roaming\HandBrake\Nightly

~~~

[18:43:41] scan: decoding previews for title 1
[18:43:41] scan: audio 0x1: truehd, rate=48000Hz, bitrate=1 English (Dolby TrueHD + Dolby Atmos, 7.1 ch)
[18:43:41] scan: audio 0x2: ac3, rate=48000Hz, bitrate=448000 English (AC3, 5.1 ch, 448 kbps)
[matroska,webm @ 000000002ce8dec0] File is broken, keyframes not correctly marked!
[18:43:44] using container PAR 1:1
[18:43:44] scan: 10 previews, 3840x2160, 23.976 fps, autocrop = 42/42/0/0, aspect 16:9, PAR 1:1, color profile: 9-16-9, chroma location: topleft
[18:43:44] scan: mastering display metadata: r(0.6800,0.3200) g(0.2650,0.6900) b(0.1500 0.0600) wp(0.3127, 0.3290) min_luminance=0.000100, max_luminance=1000.000000
[18:43:44] scan: content light level: max_cll=1000, max_fall=412
[18:43:44] scan: dolby vision configuration record: version: 1.0, profile: 7, level: 6, rpu flag: 1, el flag: 1, bl flag: 1, compatibility id: 6
[18:43:44] scan: hdr10+ dynamic metadata found
[18:43:44] scan: supported video decoders: avcodec qsv
[18:43:44] libhb: scan thread found 1 valid title(s)
[18:43:44] Starting Task: Encoding Pass
[18:43:44] work: track 1, dithering not supported by codec
[18:43:44] work: track 2, dithering not supported by codec
[18:43:44] job configuration:
[18:43:44]  * source
[18:43:44]    + F:\Source\???.mkv
[18:43:44]    + title 1, chapter(s) 1 to 20
[18:43:44]    + container: matroska,webm
[18:43:44]    + data rate: 71679 kbps
[18:43:44]  * destination
[18:43:44]    + E:\???.mkv
[18:43:44]    + container: Matroska (libavformat)
[18:43:44]      + chapter markers
[18:43:44]  * video track
[18:43:44]    + decoder: hevc 10-bit (yuv420p10le)
[18:43:44]    + filters
[18:43:44]      + Framerate Shaper (mode=1)
[18:43:44]        + frame rate: 23.976 fps -> constant 23.976 fps
[18:43:44]      + Crop and Scale (width=3840:height=2076:crop-top=42:crop-bottom=42:crop-left=0:crop-right=0)
[18:43:44]        + source: 3840 * 2160, crop (42/42/0/0): 3840 * 2076, scale: 3840 * 2076
[18:43:44]      + RPU converter (mode=3:scale-factor-x=1.000000:scale-factor-y=1.000000:crop-top=42:crop-bottom=42:crop-left=0:crop-right=0:pad-top=0:pad-bottom=0:pad-left=0:pad-right=0)
[18:43:44]    + Output geometry
[18:43:44]      + storage dimensions: 3840 x 2076
[18:43:44]      + pixel aspect ratio: 1 : 1
[18:43:44]      + display dimensions: 3840 x 2076
[18:43:44]    + encoder: H.265 10-bit (libx265)
[18:43:44]      + preset:  fast
[18:43:44]      + profile: auto
[18:43:44]      + level:   auto
[18:43:44]      + quality: 28.00 (RF)
[18:43:44]      + color profile: 9-16-9
[18:43:44]      + chroma location: topleft
[18:43:44]      + mastering display metadata: r(0.6800,0.3200) g(0.2650,0.6900) b(0.1500 0.0600) wp(0.3127, 0.3290) min_luminance=0.000100, max_luminance=1000.000000
[18:43:44]      + content light level: max_cll=1000, max_fall=412
[18:43:44]      + dolby vision configuration record: version: 1.0, profile: 8, level: 6, rpu flag: 1, el flag: 0, bl flag: 1, compatibility id: 1
[18:43:44]      + hdr10+ dynamic metadata
cdgriffith commented 8 months ago

@GrapeBacon they can take that chance if they want. They are a team, and if lawyers go after them it would most likely be removal / edit of their software.

As this is a personally owned project, they could potentially target me directly. I won't take that risk.

GrapeBacon commented 8 months ago

Ok, so do you plan to remove: ""Handbrake didn't do it for ya?" I found it rather tasteless anyway.

I understand you not wanting to have to deal with legal issues. I wish you and your project the best.

cdgriffith commented 8 months ago

Going to lock this, as it's not a topic up for debate.

Thank you both for the contributions to this thread, I honestly appreciate the input and wish I could implement this!