VideoHelp Forum




+ Reply to Thread
Results 1 to 6 of 6
  1. Hi, patience with the cat. Thanks



    Please download my drone footage:

    https://www.swisstransfer.com/d/0fccfac9-fad7-4b63-a8b7-210789c70960

    Normal.MP4
    HLG.MP4
    DLOGM.MP4

    they are the same scene, recorded with normal mode, hlg and dlogM

    for the HLG.mp4 (it's arib-std-b67) I try

    Code:
    Import("v:\avisynth\plugins\IResize.avsi")
    Import("V:\AviSynth\plugins\smoothFPS2.avsi")
    Import("V:\AviSynth\plugins\smoothFPS3.avsi")
    Import("v:\AviSynth\plugins\CropResizedic2017.avsi")
    Import("V:\AviSynth\FrameRateConverter2021\FrameRateConverter.avsi")
    Import("V:\AviSynth\LinearTransformation-3.0\LinearTransformation.avsi")
    LoadPlugin("V:\AviSynth\LinearTransformation-3.0\vscube.dll")
    LoadPlugin("v:\AviSynth\FrameRateConverter2021\X64\FrameRateConverter.dll")
    LoadPlugin("v:\AviSynth\ffms2-2.40-msvc\ffms2-2.40-msvc\x64\ffms2.dll")
    Import("V:\AviSynth\FFMS2_AVSI_2019\ffms2.avsi")
    LoadPlugin("v:\AviSynth\LSMASH_AGO_2023\x64\LSMASHSource.dll")
    LoadCPlugin("v:\avisynth\plugins64\yadif.dll") 
    LoadPlugin("V:\AviSynth\MaskTool2\X64\masktools2.dll") 
    LoadPlugin("V:\AviSynth\Santiag\ResampleMT.dll") 
    LoadPlugin("V:\AviSynth\Santiag\nnedi3.dll") 
    LoadPlugin("V:\AviSynth\Santiag\aWarpsharpMT.dll") 
    LoadPlugin("V:\AviSynth\Santiag\eedi3.dll") 
    LoadPlugin("V:\AviSynth\Santiag\EEDI2.dll") 
    LoadPlugin("V:\AviSynth\Santiag\GScript_26_64.dll") 
    LoadPlugin("V:\AviSynth\Santiag\SangNom2.dll") 
    Import("V:\AviSynth\Santiag\santiag.avsi")
    Import("V:\AviSynth\QTGMC2025\QTGMC.avsi")
    Import("V:\AviSynth\QTGMC2025\Zs_RF_Shared.avsi")
    LoadPlugin("V:\AviSynth\QTGMC2025\mvtools2.dll")
    LoadPlugin("V:\AviSynth\QTGMC2025\RgTools.dll")
    LoadPlugin("v:\AviSynth\BestSource\BestSource.dll") 
    LoadPlugin("V:\AviSynth\RIFE\RIFE.dll")
    LoadPlugin("V:\AviSynth\RIFE\avsresize.dll")
    LoadPlugin("V:\AviSynth\RIFE\PlanarTools.dll")
    vid=FFMS2("W:\tuttiFormati\drone\HLG.MP4")
    aud=LWLibavAudioSource("v:\system\empty.wav",stream_index=0)
    left=GetChannel(aud, 1)
    right=GetChannel(aud, 2)
    both=mergechannels(left, right)
    audiodub(vid, both)
    ConvertAudioTo16Bit()
    
    
    z_ConvertFormat(pixel_type="YUV422P8", colorspace_op="709:auto:auto:limited=>709:same:same:limited", interlaced=false)
    
    emask = mt_convolution(vertical="-1 2 -1").ColorYUV(off_y=-64).ColorYUV(gain_y=128).mt_expand(chroma="-128").Blur(0.8)
    Overlay(last, Blur(0.6, 0.7), mask=emask)
    
    Convertbits(8).ConvertToYUY2(interlaced=false)
    assumeFPS(50)
    Prefetch(8)
    but I think I need a LUT and apply a lut, what lut, where I can download it or how I can do?

    I wonder if does exist a function like a "color conform" that automatically do all
    Last edited by marcorocchini; 27th Sep 2025 at 13:42.
    Quote Quote  
  2. You can use the HLG_A_to_LinearBT709.cube from FranceBB's LUT collection.
    https://github.com/FranceBB/LinearTransformation
    Quote Quote  
  3. Code:
    FFMS2("W:\tuttiFormati\drone\HLG.MP4")
    Convertbits(8)
    
    LinearTransformation(Input="BT2020_HLG", Output="Linear_BT709")
    
    z_ConvertFormat(pixel_type="YUV422P8", colorspace_op="709:auto:auto:limited=>709:same:same:limited", interlaced=false)
    
    emask = mt_convolution(vertical="-1 2 -1").ColorYUV(off_y=-64).ColorYUV(gain_y=128).mt_expand(chroma="-128").Blur(0.8)
    Overlay(last, Blur(0.6, 0.7), mask=emask)
    Convertbits(8).ConvertToYUY2(interlaced=false)
    assumeFPS(50)
    Prefetch(8)
    do you mean:
    LinearTransformation(Input="BT2020_HLG", Output="Linear_BT709") ?

    but output seems to me a little flat, or I mistake.

    Can I do in avisynth with HDRTools?

    or I have try


    Code:
    FFMS2("W:\tuttiFormati\drone\HLG.MP4")
    
    Convertbits(8)
    #PackedToPlanar()
    
    
    
    LoadPlugin("C:\HDRTools.dll")
    
    z_ConvertFormat(pixel_type="RGBPS") 
    ConvertRGB_Reinhard_HDRtoSDR()
    
    
    z_ConvertFormat(pixel_type="YUV422P8")
    but maybe need level correction
    Last edited by marcorocchini; 28th Sep 2025 at 08:31.
    Quote Quote  
  4. Search for francebb in
    https://forum.doom9.se/
    for the correct use in avisynth
    Quote Quote  
  5. I try but seems that doom9 forum is not working at the moment

    however I found this commandline that produce an output "similar" to the normal source, or closer to the "normal"


    Code:
    v:\FFMPEG_AGO2025\ffmpeg.exe -y -i "W:\hlg.MP4" -vf zscale=t=linear:npl=120,format=gbrpf32le,zscale=p=bt709,tonemap=hable:desat=0,zscale=t=bt709:m=bt709:r=pc,format=yuv422p -c:v libx264 -crf 18 -preset medium -tune fastdecode v:\videoOutputPClevelsHable.mp4
    so I wonder, what to the same in avisynth?
    Quote Quote  
  6. Originally Posted by marcorocchini View Post
    I try but seems that doom9 forum is not working at the moment
    It works with my link above.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!