Hello guest, if you like this forum, why don't you register? https://fanrestore.com/member.php?action=register (December 14, 2021) x


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Promising SDR <--> HDR back/forward convertor, check it out
#1
This can do SDR <-> HDR back/forward conversion, realtime preview, edit metadata, MaxCLL, MaxFALL, etc.

Free trial w/ all features, limited to 1 minute export max
https://www.acrovid.com/neofootage_ai.htm

[Image: XW1itLO.jpg]

[Image: AKuhjxc.jpg]
Reply
Thanks given by: PDB
#2
I found a pretty easy way to do SDR to HDR conversion in Avisynth+. I wanted to include SDR extended scenes in an HDR main feature, which meant converting them to HDR for editing together. The key to it is FranceBB's LinearTransformations LUTs. Using the AVSCube plugin, you can load his BT601_NTSC_to_BT2100_PQ LUT that will convert standard range video to HDR. I still needed to apply a level adjustment after that to increase brightness 20% to match surrounding footage, but overall its an easy and free method with great results. The following converts standard 1080p SDR to 4K HDR that matches UHD format:

Code:
LoadPlugin("vscube.dll")

deletedScenes = FFMS2("y:\Deleted Scenes.m2ts")
\.Spline36Resize(3840, 2160)
\.ConvertBits(16)
\.ConvertToPlanarRGB()
\.Cube("BT601_NTSC_to_BT2100_PQ.cube")
\.ConvertToYUV420()
\.ConvertBits(10)
\.Levels(0, 1, 816, 0, 1020)
Reply
Thanks given by: PDB , stwd4nder2 , CSchmidlapp , alexp2000 , Bilbofett
#3
I really need to learn how to use avisynth
Reply
Thanks given by:
#4
(2025-01-21, 05:54 PM)stwd4nder2 Wrote: I really need to learn how to use avisynth

It's definitely a little overwhelming to start, but very powerful once you get the hang of the basics. I recommend grabbing the 64-bit Avisynth+ (it works out of the box with higher bit depth video), and AvsPmod to use as your script editor and preview. The only plugin that is really necessary is FFMS2 (basically FFMPEG in a wrapper avisynth can use), as it can open pretty much any video file with frame accuracy. Just download the latest release and put the files from the x64 folder into C:\Program Files (x86)\AviSynth+\plugins64 and you are set.
Reply
Thanks given by: stwd4nder2
#5
(2025-01-21, 04:50 PM)bronan Wrote: I found a pretty easy way to do SDR to HDR conversion in Avisynth+. I wanted to include SDR extended scenes in an HDR main feature, which meant converting them to HDR for editing together. The key to it is FranceBB's LinearTransformations LUTs. Using the AVSCube plugin, you can load his BT601_NTSC_to_BT2100_PQ LUT that will convert standard range video to HDR. I still needed to apply a level adjustment after that to increase brightness 20% to match surrounding footage, but overall its an easy and free method with great results. The following converts standard 1080p SDR to 4K HDR that matches UHD format:

Code:
LoadPlugin("vscube.dll")

deletedScenes = FFMS2("y:\Deleted Scenes.m2ts")
\.Spline36Resize(3840, 2160)
\.ConvertBits(16)
\.ConvertToPlanarRGB()
\.Cube("BT601_NTSC_to_BT2100_PQ.cube")
\.ConvertToYUV420()
\.ConvertBits(10)
\.Levels(0, 1, 816, 0, 1020)

Great find and tip, thanks! P.S. Why didn't you just leave it in 16-bit? Thats 2 color conversions you're doing
Reply
Thanks given by:
#6
(2025-01-24, 04:27 AM)Bilbofett Wrote: Great find and tip, thanks! P.S. Why didn't you just leave it in 16-bit? Thats 2 color conversions you're doing

AVScube only allows RGBP16 color space.

DGcube (a CUDA varient if you have an appropriate Nvidia card) allows RGBP16 and YUV420P16 (with a few "limits"), so you can keep in YUV 4.2.0 but still have to do bit depth changes.

Script im currently playing with based on above...

Code:
LWLibavVidioSource("VIDEO FILE")
z_ConvertFormat(pixel_type="YUV420P16")
DGCube("BT601_NTSC_to_BT2100_PQ.cube", in ="lim", lut="full", out="lim", interp="tetrahedral")
z_ConvertFormat(pixel_type="YUV420P10")
v=Levels(0, 1, 816, 0, 1020)
a=LWLibavAudioSource("VIDEO FILE", stream_index=2)
audiodub(v, a)
Reply
Thanks given by:
#7
Can you show some examples?
HDR BT 2020 is not an easy colour space to grade.
But may be useful for simple tasks.
Reply
Thanks given by:
#8
(2025-01-24, 04:27 AM)Bilbofett Wrote: Great find and tip, thanks! P.S. Why didn't you just leave it in 16-bit? Thats 2 color conversions you're doing

It seemed to work OK without the 16-bit line, but that code is straight from the LinearTransformations Git so I decided to not question it Smile He says the following:

Code:
The transformation is performed with 16bit precision, which means that if your input source is lower, let's say, 8bit planar yv12, it will be brought to 16bit planar RGB internally, the linear transformation will be applied with 16bit planar precision and then the result will be brought down to 8bit planar yv12.
Planar RGB 16bit is strongly suggested as your source as it's gonna be faster, in fact 4:2:0, 4:2:2, 4:4:4 planar up to 16bit will be converted back and forth internally.

How to use my LUTs in Avisynth without using the function "Linear Transformation()":
FFVideoSource("example.mxf")
ConvertBits(16)
ConvertToPlanarRGB()
Cube("C:\Programmi\AviSynth+\LUTs\example.cube")
Reply
Thanks given by: CSchmidlapp
#9
(2025-01-24, 05:09 PM)bronan Wrote:
(2025-01-24, 04:27 AM)Bilbofett Wrote: Great find and tip, thanks! P.S. Why didn't you just leave it in 16-bit? Thats 2 color conversions you're doing

It seemed to work OK without the 16-bit line, but that code is straight from the LinearTransformations Git so I decided to not question it Smile He says the following:

Code:
The transformation is performed with 16bit precision, which means that if your input source is lower, let's say, 8bit planar yv12, it will be brought to 16bit planar RGB internally, the linear transformation will be applied with 16bit planar precision and then the result will be brought down to 8bit planar yv12.
Planar RGB 16bit is strongly suggested as your source as it's gonna be faster, in fact 4:2:0, 4:2:2, 4:4:4 planar up to 16bit will be converted back and forth internally.

How to use my LUTs in Avisynth without using the function "Linear Transformation()":
FFVideoSource("example.mxf")
ConvertBits(16)
ConvertToPlanarRGB()
Cube("C:\Programmi\AviSynth+\LUTs\example.cube")

How about a dither command after it converts back down to 10-bit?
Reply
Thanks given by:
#10
(2025-01-21, 04:50 PM)bronan Wrote: I found a pretty easy way to do SDR to HDR conversion in Avisynth+. I wanted to include SDR extended scenes in an HDR main feature, which meant converting them to HDR for editing together. The key to it is FranceBB's LinearTransformations LUTs. Using the AVSCube plugin, you can load his BT601_NTSC_to_BT2100_PQ LUT that will convert standard range video to HDR. I still needed to apply a level adjustment after that to increase brightness 20% to match surrounding footage, but overall its an easy and free method with great results. The following converts standard 1080p SDR to 4K HDR that matches UHD format:

Code:
LoadPlugin("vscube.dll")

deletedScenes = FFMS2("y:\Deleted Scenes.m2ts")
\.Spline36Resize(3840, 2160)
\.ConvertBits(16)
\.ConvertToPlanarRGB()
\.Cube("BT601_NTSC_to_BT2100_PQ.cube")
\.ConvertToYUV420()
\.ConvertBits(10)
\.Levels(0, 1, 816, 0, 1020)
I tried this.
But got a blank output in avsmod.
Sad
Reply
Thanks given by:


Possibly Related Threads…
Thread Author Replies Views Last Post
Big Grin [Idea] Avidemux - easy method to slow 25fps footage back to 24, and vice versa SpaceBlackKnight 11 11,789 2018-12-27, 03:43 AM
Last Post: SpaceBlackKnight

Forum Jump:


Users browsing this thread: 4 Guest(s)