VideoHelp Forum
+ Reply to Thread
Results 1 to 12 of 12
Thread
  1. Good afternoon friends, I would be grateful if someone could help me!

    I have an archive of a show that was filmed from cameras with little ability to capture colors and lighting, so to make it closer to real lighting I needed to calibrate the brightness, contrast, and correct the colors.
    The big problem is that when you change the lighting of a video with low light and few colors, you end up having ''damages'' in the image in addition to the artifacts and grains of forced lighting. I manage to remove these grains of lighting with NeatVideo, but there is a defect that I cannot remove, which would be this gradient of the blue lighting that cannot be uniform...
    I read in some articles that this could be about 8-bit images (frames) that suffer large changes in brightness, they face this unpleasant gradient effect in the frame, I don't know if this is the real problem.
    Does anyone know a technique to remove this color splitting effect and make them smoother and more uniform?
    Detail: The video is still in low quality (704 x 576) and I will upscale the image after finding out if it is possible to solve the problem.


    Thanks
    Image Attached Files
    Quote Quote  
  2. The "gradient" you see is usually called "contouring." It results from not using enough bit depth to encode the color. I don't think I have seen a script which attempts to solve that problem, but my sense is that something like that would be possible.
    Quote Quote  
  3. Originally Posted by johnmeyer View Post
    The "gradient" you see is usually called "contouring." It results from not using enough bit depth to encode the color. I don't think I have seen a script which attempts to solve that problem, but my sense is that something like that would be possible.
    Hi Yes,
    I thought it was a problem with not having enough bits for the colors.
    I tried converting each frame from 8 to 16 bits using Photoshop, but I returned the frames to Vegas and it didn't help, the outline remains, I don't know if the conversion was fake. Could there be a way to artificially convert an 8-bit video to 16-bit 😔
    Quote Quote  
  4. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    If it starts with inadequate color depth, simply changing the bitdepth from 8bits to 10/12/16 bits does nothing except store a lot of extra 0s in those new bit levels. You need an algorithm that interpolates to generate those missing intermediate levels (hopefully in a smart & visually pleasant way).
    And then, if you must return to a limited bit pallette, you should dither prior to rounding/truncation in order to retain the visual equivalent of those intermediate levels.


    Scott
    Quote Quote  
  5. Originally Posted by Cornucopia View Post
    If it starts with inadequate color depth, simply changing the bitdepth from 8bits to 10/12/16 bits does nothing except store a lot of extra 0s in those new bit levels. You need an algorithm that interpolates to generate those missing intermediate levels (hopefully in a smart & visually pleasant way).
    And then, if you must return to a limited bit pallette, you should dither prior to rounding/truncation in order to retain the visual equivalent of those intermediate levels.


    Scott
    I understand,
    But is there any tool that I can do this?
    Quote Quote  
  6. AviSynth has filters for that:

    Code:
    LWLibavVideoSource("mp4.mp4") 
    TDecimate(Cycle=5, CycleR=3) # remove duplicate frames
    GradFun2db() # reduce posterization, alternate filter GradFun3()
    ConvertBIts(10)
    SMDegrain(thsad=100, tr=2, PreFilter=4) # temporal smooth a bit
    You need to encode with a high bitrate and/or use a 10 bit encoder to keep them from coming back.
    Image Attached Files
    Last edited by jagabo; 22nd Aug 2023 at 23:38.
    Quote Quote  
  7. Originally Posted by jagabo View Post
    AviSynth has filters for that:

    Code:
    LWLibavVideoSource("mp4.mp4") 
    TDecimate(Cycle=5, CycleR=3) # remove duplicate frames
    GradFun2db() # reduce posterization, alternate filter GradFun3()
    ConvertBIts(10)
    SMDegrain(thsad=100, tr=2, PreFilter=4) # temporal smooth a bit
    You need to encode with a high bitrate and/or use a 10 bit encoder to keep them from coming back.
    Wow, it turned out perfect buddy!
    With this Script you sent, can I achieve this effect?
    Quote Quote  
  8. That's the script I used. I encoded as 10 bit HEVC with Intel's QSV (GPU) encoder via ffmpeg. You might need to add more grain if you intend to encode with an 8 bit encoder.

    Note that the short sample has lots of duplicate frames. I removed those (maybe a few unique frames too?) before processing. If other parts of the video don't have all those duplicate frames you should leave out the TDecimate line.
    Quote Quote  
  9. Originally Posted by jagabo View Post
    That's the script I used. I encoded as 10 bit HEVC with Intel's QSV (GPU) encoder via ffmpeg. You might need to add more grain if you intend to encode with an 8 bit encoder.

    Note that the short sample has lots of duplicate frames. I removed those (maybe a few unique frames too?) before processing. If other parts of the video don't have all those duplicate frames you should leave out the TDecimate line.
    thank you very much friend
    I will try to do this! 🤝🏻
    Quote Quote  
  10. Originally Posted by jagabo View Post
    AviSynth has filters for that:

    Code:
    LWLibavVideoSource("mp4.mp4") 
    TDecimate(Cycle=5, CycleR=3) # remove duplicate frames
    GradFun2db() # reduce posterization, alternate filter GradFun3()
    ConvertBIts(10)
    SMDegrain(thsad=100, tr=2, PreFilter=4) # temporal smooth a bit
    You need to encode with a high bitrate and/or use a 10 bit encoder to keep them from coming back.
    Friend, I can't download the SMDegrain filter, is there any other filter similar to it for this case?
    Image Attached Thumbnails Click image for larger version

Name:	Sem título.png
Views:	7
Size:	532.7 KB
ID:	73918  

    Quote Quote  
  11. Try this one: https://github.com/Dogway/Avisynth-Scripts/tree/master/SMDegrain

    Or you can use any mild, motion compensated temporal denoiser. like MCTemporalDenoise().
    Quote Quote  
  12. Originally Posted by jagabo View Post
    Try this one: https://github.com/Dogway/Avisynth-Scripts/tree/master/SMDegrain

    Or you can use any mild, motion compensated temporal denoiser. like MCTemporalDenoise().
    thanks
    Quote Quote  



Similar Threads

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