Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
![]() |
#241 | Link | |
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,738
|
Quote:
The thing is that a lut doesn't understand Dolby Vision metadata, it's just a matrix: numbers in, numbers out, so the results can change. Post a sample and I'll see what I can do. Oh, almost forgot: Merry Christmas! ![]() |
|
![]() |
![]() |
![]() |
#242 | Link | |
Registered User
Join Date: Oct 2022
Posts: 4
|
Quote:
Whenever I import "HLG_BT2020_to_Linear_BT709.cube " LUT in my resolve, it gives error". Attached is the screenshot. Other LUTs import worked fine from your collection. Below, I am giving original sample and processed videos as you asked. Original HLG video from iPhone 12: https://drive.google.com/file/d/1M_O...usp=share_link Processed SDR video in resolve with your "HLG_A_to_LinearBT709" LUT: https://drive.google.com/file/d/1RaN...usp=share_link Processed Dolby Vision Profile v5 video in Resolve: https://drive.google.com/file/d/1L4z...usp=share_link I am attaching project settings and export video settings of Resolve here for dolby vision export and SDR export for your information. |
|
![]() |
![]() |
![]() |
#243 | Link |
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,738
|
Happy New Year!
![]() So... let's first take a look at what we have here. The reference white of 75% has overshooting over 0.52V in what is supposed to be specular highlights like the reflections in the tiara and the other pieces of jewelry that the girl is wearing. Far from being an ideal shot, but I guess we can't expect much from a tiny sensor like the one we have in mobile phones (iPhones included): ![]() Although there's a great deal of motion blur at 29,970p, at least the real reference white is correctly positioned at 0.52V as we can see on the left hand side of the waveform monitor, so looks like Apple didn't screw this up completely after all: ![]() This is the conversion with the non public BBC LUT: Code:
video=LWLibavVideoSource("\\mibctvan000.avid.mi.bc.sky.it\Ingest\MEDIA\temp\Sample.mov") audio=LWLibavAudioSource("\\mibctvan000.avid.mi.bc.sky.it\Ingest\MEDIA\temp\Sample.mov") AudioDub(video, audio) ConvertBits(16) ConvertToPlanarRGB(matrix="Rec2020") Cube("C:\Program Files (x86)\AviSynth+\LUTs\8a_HLG_bt709_AC_mode-nar_in-nar_out-nar_nocomp.cube", fullrange=true) ConverttoYUV420(matrix="Rec709") ![]() ![]() Now, I know that the BBC LUT is correct, which means that there's something deeply wrong in the way Apple's logic saved the BT.2020 colours as there's a huge shift towards the magenta and red. As always, my HLG_A_to_LinearBT709 LUT was done in 2021 to address that and in fact the result is quite pleasing: Code:
video=LWLibavVideoSource("\\mibctvan000.avid.mi.bc.sky.it\Ingest\MEDIA\temp\Sample.mov") audio=LWLibavAudioSource("\\mibctvan000.avid.mi.bc.sky.it\Ingest\MEDIA\temp\Sample.mov") AudioDub(video, audio) ConvertBits(16) ConvertToPlanarRGB(matrix="Rec2020") Cube("C:\Program Files (x86)\AviSynth+\LUTs\HLG_A_to_LinearBT709.cube", fullrange=true) ConverttoYUV420(matrix="Rec709") ![]() ![]() The magenta shift is still quite noticeable, though, in your case, so I would still consider color shifting a bit more or reduce the saturation in the magenta part only altogether. I think something like this looks much more natural: Code:
video=LWLibavVideoSource("\\mibctvan000.avid.mi.bc.sky.it\Ingest\MEDIA\temp\Sample.mov") audio=LWLibavAudioSource("\\mibctvan000.avid.mi.bc.sky.it\Ingest\MEDIA\temp\Sample.mov") AudioDub(video, audio) ConvertBits(16) ConvertToPlanarRGB(matrix="Rec2020") Cube("C:\Program Files (x86)\AviSynth+\LUTs\HLG_A_to_LinearBT709.cube", fullrange=true) ConverttoYUV420(matrix="Rec709") tweak(StartHue=75, EndHue=135, sat=0.70, dither=true) ![]() Last edited by FranceBB; 4th January 2023 at 12:18. |
![]() |
![]() |
![]() |
#244 | Link |
Registered User
Join Date: Oct 2022
Posts: 4
|
Happy New Year. That's one hell of analysis which is certainly above my understanding and requirement. Thanks for the detailed reply though.
I shoot lots of home videos of my daughter. I normally convert them in Dolby Vision (for my TV) and Rec709 (for sharing). Just wanted to have quick LUT which can give me Rec709 video in color grades like Dolby Vision. I guess I will just use your LUT which gives decent colours in Rec709. ![]() |
![]() |
![]() |
![]() |
#245 | Link | |
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,738
|
Oh, I didn't know that she was your daughter.
It's nice that you get to spend some time with your family. ![]() Quote:
The "official" use we have of that LUT is for our News channel. Essentially we get people/viewers sending us videos from all over the world 'cause everyone has a smartphone around these days and people started sending us videos in HLG shot with the iPhone in early 2021, so we needed to cope with those, especially given that the news channel is still in FULL HD BT709, hence the LUT. ![]() The other use we had for this LUT was during the America's Cup 'cause we couldn't send cameramen physically on the boats as they would slow them down, so we had the crew recording videos on their iPhone in HLG and sending those over (I talked about this early on in this topic if you're curious ![]() |
|
![]() |
![]() |
![]() |
#246 | Link |
Registered User
Join Date: Feb 2020
Posts: 529
|
There are now HDR10+ EETFs in libplacebo and in ffmpeg. https://github.com/FFmpeg/FFmpeg/com...2530c2e0d86450
So initial support for the base of Dolby Vision curves too, another part of ST2094 |
![]() |
![]() |
![]() |
#247 | Link |
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,738
|
Any chance of having a CPU only version of libplacebo in FFMpeg as well as the current GPU one?
I mean, currently it requires GPU acceleration, which is fine for on prem, but not very cloud friendly given the limits of most AWS EC2... Ideally, if a GPU isn't available, it should be able to have a CPU only fallback instead of failing. |
![]() |
![]() |
![]() |
#248 | Link | |||
Registered User
Join Date: Jan 2019
Location: Canada
Posts: 565
|
Quote:
https://archlinux.org/packages/extra...vulkan-swrast/ Following the Arch Wiki example for "Software Vulkan: lavapipe" at: https://wiki.archlinux.org/title/Vulkan. Quote:
Quote:
In FFmpeg, vf_libplacebo is currently only supported for Vulkan frames. It's a GPU library, after all.
__________________
LG C2 OLED | GitHub Projects Last edited by quietvoid; 23rd February 2023 at 18:39. |
|||
![]() |
![]() |
![]() |
#250 | Link | |
hlg-tools Maintainer
Join Date: Feb 2008
Posts: 376
|
Quote:
I don't remember anything about basket weaving. |
|
![]() |
![]() |
![]() |
#251 | Link |
Registered User
Join Date: Feb 2014
Posts: 351
|
Thank you for sharing your LUTs, FranceBB
![]() _____________ Edit: Please ignore the above; I just remembered that the reason I'm even here is because you posted a link when helping me on the HDRTools Plugins thread (which has your script ![]() Last edited by LouieChuckyMerry; 17th June 2023 at 21:51. Reason: D'oh |
![]() |
![]() |
![]() |
#252 | Link | ||
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,738
|
Quote:
Quote:
In other words, if you were to run it manually in Avisynth, it would be: Code:
#Indexing FFVideoSource("D:\TestClip2[2160p].mkv") #Bringng everything to 16bit planar ConvertBits(16) #Going from YUV limited tv range to RGB full range ConverttoPlanarRGB(matrix="Rec2020") #From BT2020 PQ to BT709 SDR Cube("PQ_to_BT709_v2.cube", fullrange=true) #Going back from RGB full Range to YUV limited tv range Converttoyuv420(matrix="Rec709") #Dithering down to 8bit planar with the Floyd Steinberg Error Diffusion ConvertBits(bits=8, dither=1) OR if you use my plugin, LinearTransformation(), you can easily just do: Code:
FFVideoSource("D:\TestClip2[2160p].mkv") LinearTransformation(Input="BT2100_PQ", Output="Linear_BT709") |
||
![]() |
![]() |
![]() |
#253 | Link |
Registered User
Join Date: Feb 2014
Posts: 351
|
Happy Saturday! I finally found some time to figure things out and run some tests, and was curious for your learned opinion. I tried your LinearTransformation:
Code:
ConvertToPlanarRGB(Matrix="Rec2020",Interlaced=False) ConvertBits(Bits=16) Spline36Resize(1920,1080) Cube("F:\InstalledPrograms\AviSynth+\LUTs\PQ_to_BT709_v2.cube",Fullrange=True) ConvertToYUV420() Code:
ConvertToYUV420() ConvertBits(Bits=16) Spline36Resize(1920,1080) DGHDRToSDR() ![]() and ![]() and ![]() and ![]() and ![]() and ![]() I think the results with Avidemux look the best, but I'd prefer to use your LinearTransformation because it's faster and I can fine-tune the resizing and encoding options. Would you have a suggestion(s) how to tweak the settings to "brighten" the results? Edit: Apologies for the massive images; not sure how fix that... Last edited by LouieChuckyMerry; 24th June 2023 at 20:50. Reason: Image Links; Image Sizes |
![]() |
![]() |
![]() |
#254 | Link |
Big Bit Savings Now !
Join Date: Feb 2007
Location: close to the wall
Posts: 1,476
|
No apologies needed, nice comparison !
Judging from two panels (10bit-100%DCI-P3 + 8bit-100%NTSC) both France BB and Donald Grafts look fabulous, France BB seems to match the hi-end panels, DG seems to match the majority of panels ATM (and AviDemux seems overdone).
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain) "Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..." Last edited by Emulgator; 24th June 2023 at 22:27. |
![]() |
![]() |
![]() |
#255 | Link |
Registered User
Join Date: Feb 2014
Posts: 351
|
Emulgator: Thanks for your informative reply
![]() |
![]() |
![]() |
![]() |
#256 | Link | |
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,738
|
I noticed that you're using the v2 cube.
That version targets 50k$ Sony reference monitors for up to 4000 nits PQ contents (technically also above as it doesn't clip but rolls back to 100 nits all values 'till 10000 with a knee, but still). Your content clearly has a much lower MaxCLL, therefore you should really use v1. To put it in your own code: Code:
ConvertToPlanarRGB(Matrix="Rec2020", Interlaced=False) ConvertBits(Bits=16) Spline36Resize(1920,1080) Cube("F:\InstalledPrograms\AviSynth+\LUTs\PQ_to_BT709_v1.cube", Fullrange=True) ConvertToYUV420(Matrix="Rec709") Quote:
![]() Yeah, Avidemux is really off in this case. And you're right, I did it targeting the professional broadcast monitors we have here at work while looking at the Tektronix Waveform Monitor connected via SDI, so not really surprising ehehehehehehe But I'm glad it all checks out. ![]() Last edited by FranceBB; 26th June 2023 at 14:52. |
|
![]() |
![]() |
![]() |
#257 | Link |
Registered User
Join Date: Feb 2014
Posts: 351
|
Emulgator: Oooweeee! I'm glad I checked things out on my HDTV. And I admire your restraint, as "overdone" is very generous of you. Actually, "...France BB seems to match the hi-end panels, DG seems to match the majority of panels ATM..." seems spot on. Thanks again
![]() _____________ FranceBB: Thanks for the information and suggestion; I'll run new tests comparing The Donald Graft Method to The New, Improved FranceBB Technique then make a choice. Ahhh, and don't blame Avidemux; it was 100% operator error ;-) . _____________ EDIT: Happy Friday! The results with PQ_to_BT709_v1.cube are excellent for color and black & white sources, and I thank you again for your kind help ![]() Last edited by LouieChuckyMerry; 14th July 2023 at 16:55. |
![]() |
![]() |
![]() |
#258 | Link |
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,738
|
Linear Transformation v2.5 Released!
- Introduced a new optional parameter "Interpolation" which is a string and can be set either to Trilinear or to Tetrahedral (default is Tetrahedral) - Temporarily removed x86 support as version 1.4 of the main dependency, Donald Graft's avscube, is now x64 only ![]() As an example, a new way to call the function is now: Code:
LinearTransformation(Input="Linear_BT709", Output="DCI_XYZ", Interpolation="Tetrahedral") The interpolation parameter can either be set to "Trilinear" or "Tetrahedral" and by default it's set to Tetrahedral as it achieves better results. Source (left) - Trilinear (center) - Tetrahedral (right): ![]() As you can see, in the right hand side waveform (tetrahedral) there are no ripples, unlike the ones you can see in the trilinear interpolation at the center. I've already ported the new parameters to FFAStrans 1.4 as well so that they can be selected from the GUI ![]() although FFAStrans 1.4 is still in beta so it's not public yet as we're testing it extensively. |
![]() |
![]() |
![]() |
#260 | Link |
Registered User
Join Date: Mar 2020
Posts: 264
|
Hi FranceBB
can you tell me a working FFmpeg command line to apply your LUTs? If I apply this: ffmpeg -i input_HDR -vf lut3d=your_lut ... I always get wrong colors (to much contrast, to much red). TIA prowo EDIT: Found it. -colorspace -color_primaries -color_trc must be specified explicitly after the lut. Last edited by ProWo; 9th October 2023 at 08:15. |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|