VideoHelp Forum




+ Reply to Thread
Results 1 to 25 of 25
  1. Hi

    and however the cats.



    however I have this DJI_0002.MP4 footage, underexposed, wrong shot, wrong color, all wrong.

    https://www.swisstransfer.com/d/3af0f130-1d7b-4919-85c6-a107758dc975

    I wonder if is there a way to "adjust" exposure/color/levels of the entire clip with a dynamic adjustment if as possible and in the limits of a postprocessing, keep as reference considering levels/color of another camera in the same interview, this:

    https://www.swisstransfer.com/d/93ab278e-765c-4682-ad98-7aed55133981



    thanks
    Quote Quote  
  2. I think you have a solid videoeditor now, not sure which one. You can do a fast fix using curves.
    Image Attached Thumbnails Click image for larger version

Name:	fast fix.png
Views:	74
Size:	1.25 MB
ID:	68157  

    Quote Quote  
  3. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    1.5gb is a big file to download. I suggest you trim in down (eg with AVIDemux); people are more likely to look at it then. In AVIDemux, trim it with the A and B buttons then save it with Video Output>Copy Audio Output>Copy then Output Format>MP4 Muxer.
    Quote Quote  
  4. Something like:

    Code:
    ColorYUV(off_y=5).ConvertToRGB(matrix="rec709").RGBAdjust(r=2.5, g=2.5, b=2.5, rg=1.3, gg=1.3, bg=1.3).ConvertToYV12(matrix="rec709")
    The sky is blown out though.

    Image
    [Attachment 68167 - Click to enlarge]
    Last edited by jagabo; 16th Dec 2022 at 06:18.
    Quote Quote  
  5. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    Virtual Dub 2 with the Colormill filter. Mid levels boosted to 100, low up 25, high up 10, with a slight increase in saturation (up 13).

    Image
    [Attachment 68159 - Click to enlarge]
    Quote Quote  
  6. Try Retinex or autoadjust (less flicker) for dynamic adjustments (just a quickshot, not optimzed)
    Image
    [Attachment 68161 - Click to enlarge]
    Image Attached Files
    Last edited by Sharc; 16th Dec 2022 at 04:10.
    Quote Quote  
  7. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    --
    Image Attached Thumbnails Click image for larger version

Name:	Image1.png
Views:	189
Size:	2.05 MB
ID:	68162  

    Quote Quote  
  8. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    Original:
    Image Attached Thumbnails Click image for larger version

Name:	ref.mp4_snapshot_00.02.016.png
Views:	198
Size:	3.90 MB
ID:	68163  

    Quote Quote  
  9. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    @Sharc, what's Retinox and how do you use it?

    @RGR, pointless if you don't tell us how you did it with what.
    Quote Quote  
  10. Originally Posted by Alwyn View Post
    @Sharc, what's Retinox and how do you use it?
    https://github.com/Asd-g/AviSynth-Retinex

    You find it also in Selur's Hybrid under Vapoursynth filters (I didn't find it under Avisynth)
    Quote Quote  
  11. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    @Sharc, thanks for that. I googled it and it sounded like spooky stuff.
    Quote Quote  
  12. I just noticed that later in the clip the sun comes out and it gets brighter. Some further adjustments are required for that.
    Quote Quote  
  13. Here a less aggressive Retinex setting which includes the changing sunlight scene
    Image Attached Files
    Quote Quote  
  14. thanks, but the super mysterious retinex how have to be used?

    Code:
    FFVideoSource("C:\Users\Administrator\Desktop\DJI_0002.MP4")
    
    converttoYV24()
    #MSRCP(fulls=false,fulld=true,lower_thr=0.9,upper_thr=0.1,chroma_protect=1)
    
    MSRCP(sigma=[300,300,300], lower_thr=0.001, upper_thr=0.001, fulls=false, fulld=True, chroma_protect=1)
    
    converttoYUY2()
    
    Prefetch(8)
    I try casual settings after download and locate the .dll on the avisynth folder

    Image
    [Attachment 68173 - Click to enlarge]


    but how to use it?
    Quote Quote  
  15. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Are they the original camera files?
    Quote Quote  
  16. Originally Posted by marcorocchini View Post
    thanks, but the super mysterious retinex how have to be used?
    Code:
    converttoYV24(matrix="Rec709")
    MSRCP(sigma=2000,fulls=false,fulld=false,lower_thr=0.0001,upper_thr=0.0001,chroma_protect=2)
    converttoYV16(matrix="Rec709")
    or

    Code:
    smoothtweak(Brightness=4)
    converttoPlanarRGB(matrix="Rec709")
    MSRCR(sigma=500,fulls=false,fulld=true,lower_thr=0.0001,upper_thr=0.0001)
    converttoYV16(matrix="Rec709")
    I am using the 32bit retinex.dll in the AviSynth+ plugins folder

    The attached Retinex_3.mp4 is an example for the 2nd code above. The colors are more saturated.
    Image Attached Files
    Last edited by Sharc; 17th Dec 2022 at 03:51.
    Quote Quote  
  17. Here's mt_lut() with a quarter wave sinusoidal adjustment, plus a little gamma and saturation with ColorYUV(). Frame 9000:

    Image
    [Attachment 68179 - Click to enlarge]


    A little like _Al_'s curve in post #2.
    Last edited by jagabo; 17th Dec 2022 at 12:48.
    Quote Quote  
  18. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    Originally Posted by Alwyn View Post
    @RGR, pointless if you don't tell us how you did it with what.
    It doesn't matter if it's not good enough. Vegas: brightness and contrast only. I will not give more, because I did not save, and the computer has restarted.
    Quote Quote  
  19. retinex might be ok, but most often it gives weird results, perhaps it needs to be tweaked a lot to come up with a good result, tried Sharc's lines (though in Vapoursynth) and it did not look good, not sure what was going on:
    Code:
    yuv444 = clip.resize.Bicubic(format =vs.YUV444P16)
    fixed = core.retinex.MSRCP(yuv444,lower_thr=0.0001, upper_thr=0.0001, fulls=False, fulld=True, chroma_protect=2)
    but if using videoeditor it really could be beneficial even if batch fixing files later for some reason, because in videoeditor one can come up really quickly with a color grading fix, then exporting a cube LUT (like in Magix Vegas) and then using Vapoursynth and a encoder for some batch re-encoding. Though if using a videoeditor those LUTs can be imported as well so rather not using external encoder as well.
    If for some reason batch re-encoding is needed, using available LUT (from Vegas) , using vapoursynth:
    Code:
    clip = core.lsmas.LibavSMASHSource(r'DJI_0002.MP4')
    rgb_float = core.resize.Bicubic(clip, format = vs.RGBS, matrix_in_s='709')
    rgb_float = core.timecube.Cube(rgb_float, r"underexposed_event.cube") #https://github.com/sekrit-twc/timecube/releases
    clip_lut_applied = core.resize.Bicubic(rgb_float, format=vs.YUV420P8, matrix_s='709')
    that LUT was made in Magix Vegas using color grading using curves, bringing darks down using levels, also saturation tiny bit up
    Image Attached Thumbnails Click image for larger version

Name:	underexposed_event.png
Views:	55
Size:	1.11 MB
ID:	68184  

    Last edited by _Al_; 17th Dec 2022 at 14:53.
    Quote Quote  
  20. Here's something very simple that doesn't require any third party filters:

    Code:
    Overlay(last, last.ColorYUV(gamma_y=500), opacity=0.7)
    ColorYUV(gain_y=110, off_y=-80)
    Image
    [Attachment 68192 - Click to enlarge]


    The first line blends the original video with a gamma adjusted version. You can change the opacity to get more or less of the gamma adjusted values. ColorYUV on the second line is used to adjust the black and white levels.
    Quote Quote  
  21. Video Restorer lordsmurf's Avatar
    Join Date
    Jun 2003
    Location
    dFAQ.us/lordsmurf
    Search Comp PM
    HDR filters probably do this.
    Premiere, Avid, FCP, etc. All of them, even many basic softwares.
    Want my help? Ask here! (not via PM!)
    FAQs: Best Blank DiscsBest TBCsBest VCRs for captureRestore VHS
    Quote Quote  
  22. Originally Posted by _Al_ View Post
    retinex might be ok, but most often it gives weird results, perhaps it needs to be tweaked a lot to come up with a good result, tried Sharc's lines (though in Vapoursynth) and it did not look good, not sure what was going on:
    Code:
    yuv444 = clip.resize.Bicubic(format =vs.YUV444P16)
    fixed = core.retinex.MSRCP(yuv444,lower_thr=0.0001, upper_thr=0.0001, fulls=False, fulld=True, chroma_protect=2)
    I have no experience with the Vapoursynth variant of Retinex, but it looks like you missed the variable 'sigma' (the default isn't very suitable for this clip), and the boolean 'fulld' should be false for the YUV format as I understand.
    Filters like Retinex and AutoAdjust have their quirks (e.g. flicker) as they are attempts to make adjustments dynamically according to the prevailing scene, as opposed to a static optimizations which may fix a certain scene but may fall off when the conditions change. A mask based on luma can further help to improve the result of the auto-correcting tools. Requires more experimentation though.

    Edit:
    I just noticed that the retinex output depends on the resolution of the frame. For my former SBS comparisons I reduced the frame size of the source before applying the filter. For the original resolution one would have to adjust the settings (boost the sigma) it seems, for MSRCR something like

    Code:
    smoothtweak(brightness=4,saturation=0.6) #adjust the saturation to taste
    converttoPlanarRGB(matrix="Rec709")
    MSRCR(sigma=3500, fulls=false, fulld=true, lower_thr=0.0001, upper_thr=0.0001)
    converttoYV16(matrix="Rec709") #or YUY2, YV12
    Image Attached Files
    Last edited by Sharc; 18th Dec 2022 at 08:00.
    Quote Quote  
  23. By the way, if you crop away the bright sky MSRCR makes both the darker and lighter frames look about the same.
    Quote Quote  
  24. Originally Posted by jagabo View Post
    By the way, if you crop away the bright sky MSRCR makes both the darker and lighter frames look about the same.
    Probably a similar effect will happen when (luma-) masking certain parts of the image.

    Edit: ..... however for more obvious reasons, as the masked part will not be tweaked the same.
    If one prefers to leave the sky untouched and only tweak the rest, one could use for example:
    Code:
    lumamask=clip.mt_binarize(threshold=80,upper=true).converttoYV12(matrix="Rec709").GaussianBlur(varY=2000.0)    # build a luma mask
    overlay(clip, clip.smoothtweak(brightness=4, saturation=0.6).converttoPlanarRGB(Matrix="Rec709").MSRCR(sigma=3500,fulls=false,fulld=true,lower_thr=0.0001,upper_thr=0.0001), mask=lumamask)
    converttoYV16(matrix="Rec709") #or YUY2, YV12
    Here the same as Retinex_4 above, but preserving the original sky colors. Can be helpful for backlight shots.
    Image Attached Files
    Last edited by Sharc; 19th Dec 2022 at 01:40.
    Quote Quote  



Similar Threads

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