VideoHelp Forum

+ Reply to Thread
Results 1 to 26 of 26
Thread
  1. Member
    Join Date
    Oct 2021
    Location
    Europe
    Search Comp PM
    Hi I am doing a personal project and I want to brighten the german video of DBZ Kai which after episode 54 gets very dark and saturated for some reason. I am using Davinci Resolve and I used the french video as reference because it doesnt have these issues. However I don't want to use the french video because it is bitstarved and possibly DNR'd as well because it has less grain and a few details get deleted, whereas the german video has as far as I can tell all the grain and has higher bitrate. It is much harder than I thought though, as I can't seem to match it exactly as something is always a bit off. But the biggest thing is that dark areas show a lot of blocking and that is what bothers me the most.

    Here is the german video untouched for example
    Image
    [Attachment 61314 - Click to enlarge]


    This is the french video
    Image
    [Attachment 61315 - Click to enlarge]


    And this is the best I have managed so far to make it look right
    Image
    [Attachment 61316 - Click to enlarge]


    So I would like it know if there is any way to fully restore the picture to what it should be because I have been trying for days and can't make it look exactly the same and I would like to know if it actually is possible to do so. Thanks!
    Quote Quote  
  2. iirc Davinci Resolve has some "Shot Match to This Clip" option have you tried that?
    If using Avisynth ColourLike (http://forum.doom9.org/showthread.php?t=96308) might be interessting.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  3. To reduce the posterization you'll need something like GradFun3() in AviSynth. Some temporal smoothing may help too. Upload video samples (and not reencoded), not images.
    Quote Quote  
  4. Member
    Join Date
    Oct 2021
    Location
    Europe
    Search Comp PM
    Originally Posted by Selur View Post
    iirc Davinci Resolve has some "Shot Match to This Clip" option have you tried that?
    If using Avisynth ColourLike (http://forum.doom9.org/showthread.php?t=96308) might be interessting.
    I tried that in Davinci Resolve but it isnt accurate at all really, it adds a lot of contrast and makes the blocking look very green. Does your program Hybrid have ColourLike? And I think it already has GradFun3 which jagabo mentioned.
    Quote Quote  
  5. No, Hybrid does not support ColorLike.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  6. Member
    Join Date
    Oct 2021
    Location
    Europe
    Search Comp PM
    Is there any GUI that uses ColourLike? Cause I don't know how to use avisynth from command line.
    Quote Quote  
  7. I don't know of any, yo if you don't know your way around Avisynth, this probably isn't an option unless you learn how to use Avisynth.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  8. Member lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    Using AviSynth, I had good results "matching" videos from different sources using GamMatch:

    https://forum.doom9.org/showthread.php?p=1846777#post1846777
    Quote Quote  
  9. Member
    Join Date
    Oct 2021
    Location
    Europe
    Search Comp PM
    Originally Posted by lollo View Post
    Using AviSynth, I had good results "matching" videos from different sources using GamMatch:

    https://forum.doom9.org/showthread.php?p=1846777#post1846777
    Alright that looks cool. Is Avisynth hard to learn?
    Quote Quote  
  10. Member lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    Is Avisynth hard to learn?
    In general it requires time and effort, but really depends on you. If you are familiar with programming is easier.
    Quote Quote  
  11. Member
    Join Date
    Oct 2021
    Location
    Europe
    Search Comp PM
    Originally Posted by lollo View Post
    Is Avisynth hard to learn?
    In general it requires time and effort, but really depends on you. If you are familiar with programming is easier.
    Yeah it looks pretty intimidating honestly idk. I'll see, thanks for the help.
    Last edited by WWEF; 17th Oct 2021 at 15:03.
    Quote Quote  
  12. Member
    Join Date
    Oct 2021
    Location
    Europe
    Search Comp PM
    Can I use those filters with StaxRip or MeGUI?
    Quote Quote  
  13. Originally Posted by WWEF View Post
    Can I use those filters with StaxRip or MeGUI?
    Yes, and another option is MatchHistogram , which has both avisynth and vapoursynth implementations
    Quote Quote  
  14. Originally Posted by WWEF View Post
    Is there any GUI that uses ColourLike? Cause I don't know how to use avisynth from command line.
    https://youtu.be/C4PyyQoz6eo . This video without the QTGMC part should help you.

    As for the encoding, you should use virtualdub2
    Quote Quote  
  15. Member
    Join Date
    Oct 2021
    Location
    Europe
    Search Comp PM
    Originally Posted by s-mp View Post
    Originally Posted by WWEF View Post
    Is there any GUI that uses ColourLike? Cause I don't know how to use avisynth from command line.
    https://youtu.be/C4PyyQoz6eo . This video without the QTGMC part should help you.

    As for the encoding, you should use virtualdub2
    Thanks I'll check them out.
    Quote Quote  
  16. Member
    Join Date
    Oct 2021
    Location
    Europe
    Search Comp PM
    Originally Posted by poisondeathray View Post
    Originally Posted by WWEF View Post
    Can I use those filters with StaxRip or MeGUI?
    Yes, and another option is MatchHistogram , which has both avisynth and vapoursynth implementations
    Ok cause if I can use try ColourLike and Gammatch with those programs that would be great. Ill see about MatchHistogram too.
    Quote Quote  
  17. Member
    Join Date
    Oct 2021
    Location
    Europe
    Search Comp PM
    I tried all those plugins with StaxRip but it keeps telling me I can’t use 32 bit plugins with 64 bit AviSynth and for GamMatch it says “AviSynth + script does not return a video clip”
    Quote Quote  
  18. Originally Posted by WWEF View Post
    I tried all those plugins with StaxRip but it keeps telling me I can’t use 32 bit plugins with 64 bit AviSynth and for GamMatch it says “AviSynth + script does not return a video clip”
    colourlike is an older plugin and nobody made a x64 version. You can use it with x86 avisynth, or you can use it with mp_pipeline (avisynth x64 host that can run x86 plugins and processes). It's a bit complicated and requires 3 passes (1st pass each for the source and reference to write their histograms to a text file, and a final pass for output) . It requires YV12 , so I cropped 1 line from bottom. (Why did upload a 3840x1776 screenshot instead of 1920x1080 ???) . It wasn't as close to the "French" reference, and there are not really any settings to tweak for a single image

    MatchHistogram is less complicated, doesn't require multiple passes or writing text files, and has a smoothing setting you can adjust where the interpolation of the histogram values can be smoothed more or less (more or less transition zones). It was the closest to the reference out of these 3

    GamMatch should work, post your script if you want to debug it. But it adjusts channel min and max, and average - the values in the middle are not adjusted as much, so it's less likely to match. You might be able to tweak some settings to get it to match more, I didn't play with it too much

    Here are previews on that single image with default settings (not necessarily reflective of what you get in other sections of actual video)

    In all cases, whenever you "brighten" a source, you usually reveal compression artifacts, blocking and increase posterization - what jagabo mentioned earlier - so you might want to apply other filtering
    Image Attached Thumbnails Click image for larger version

Name:	mp_pipeline_colourlike.png
Views:	6
Size:	4.86 MB
ID:	61329  

    Click image for larger version

Name:	matchhistogram.png
Views:	6
Size:	5.23 MB
ID:	61330  

    Click image for larger version

Name:	gammatch.png
Views:	4
Size:	6.09 MB
ID:	61331  

    Quote Quote  
  19. Member
    Join Date
    Oct 2021
    Location
    Europe
    Search Comp PM
    Originally Posted by poisondeathray View Post
    Originally Posted by WWEF View Post
    I tried all those plugins with StaxRip but it keeps telling me I can’t use 32 bit plugins with 64 bit AviSynth and for GamMatch it says “AviSynth + script does not return a video clip”
    colourlike is an older plugin and nobody made a x64 version. You can use it with x86 avisynth, or you can use it with mp_pipeline (avisynth x64 host that can run x86 plugins and processes). It's a bit complicated and requires 3 passes (1st pass each for the source and reference to write their histograms to a text file, and a final pass for output) . It requires YV12 , so I cropped 1 line from bottom. (Why did upload a 3840x1776 screenshot instead of 1920x1080 ???) . It wasn't as close to the "French" reference, and there are not really any settings to tweak for a single image

    MatchHistogram is less complicated, doesn't require multiple passes or writing text files, and has a smoothing setting you can adjust where the interpolation of the histogram values can be smoothed more or less (more or less transition zones). It was the closest to the reference out of these 3

    GamMatch should work, post your script if you want to debug it. But it adjusts channel min and max, and average - the values in the middle are not adjusted as much, so it's less likely to match. You might be able to tweak some settings to get it to match more, I didn't play with it too much

    Here are previews on that single image with default settings (not necessarily reflective of what you get in other sections of actual video)

    In all cases, whenever you "brighten" a source, you usually reveal compression artifacts, blocking and increase posterization - what jagabo mentioned earlier - so you might want to apply other filtering
    Yeah, I didn't realize it was 3840x1776 either before I posted them. I took a screenshot with madvr but I hadn't maximized the window to fullscreen and thats probably why. I am also using a 4K display, hence why the resolution is what it is. Thanks for this response though, very thorough. As long as the result is very close does it matter if it isn't the exact same? Even if it has a few imperfections?
    Quote Quote  
  20. Originally Posted by WWEF View Post
    As long as the result is very close does it matter if it isn't the exact same? Even if it has a few imperfections?
    For me, I would question if "matching" the French version is the right thing to do in the first place. You could just correct it normally however you want



    If you want to use one of these, e.g. MatchHistogram -

    I would check other sections to make sure. Because it's close on 1 frame doesn't mean it will be close on other sections. You can preview scripts in megui or staxrip (or other tools like vdub2 , avspmod, or media players like mpchc)

    You would edit the avisynth script that megui or staxrip generated for you , basically copy and paste the lines, edit the paths, change the source filters for the reference and your clip

    If you put the .dll in the appropriate plugins directory it will autoload, or you can use LoadPlugin explicitly in the script

    http://avisynth.nl/index.php/MatchHistogram


    Because I used an image that you uploaded, not a video, I had to change the source filter, and convert to YUV

    Code:
    ref=ImageSource("PATH\00013.m2ts_snapshot_11.26_[2021.10.16_21.58.35]_french.png").ConvertToYV24(matrix="rec709")
    clip=ImageSource("PATH\New folder (135)\00001.m2ts_snapshot_11.26_[2021.10.16_21.58.40]_german.png").ConvertToYV24(matrix="rec709")
    
    MatchHistogram(clip, ref, y=true, u=true, v=true)

    But yours might look something like this , it should already be in YV12

    Code:
    ref=LWLibavVideoSource("PATH\00013.m2ts")
    clip=LWLibavVideoSource("PATH\00001.m2ts")
    
    MatchHistogram(clip, ref, y=true, u=true, v=true)


    If you post the script, and what error messages (if any), or a log file someone can help you out . Or if you're using vapoursynth in staxrip, it's a bit different but I can help you out there too, you just have to provide some info
    Quote Quote  
  21. Member
    Join Date
    Oct 2021
    Location
    Europe
    Search Comp PM
    Ok so, if I want to try some filter with virtualdub2 how do I import them? I tried putting the dll files in the plugins folders and the plugins folder of AviSynth and they don't show up in vd2. Also for debanding I've seen that there's Gradfun, flash3k and vsplacebo for vapoursynth. Any suggestions for those?
    Quote Quote  
  22. Originally Posted by WWEF View Post
    Ok so, if I want to try some filter with virtualdub2 how do I import them? I tried putting the dll files in the plugins folders and the plugins folder of AviSynth and they don't show up in vd2. Also for debanding I've seen that there's Gradfun, flash3k and vsplacebo for vapoursynth. Any suggestions for those?
    vdub2 can only use vdub/vdub2 filters directly

    You can open avs or vpy scripts in vdub2, but the avs or vpy filters are applied in the scripts, not vdub2 . I would add the filters to your script

    vdub2 might have some debanding filters, I don't recall
    Quote Quote  
  23. Member
    Join Date
    Oct 2021
    Location
    Europe
    Search Comp PM
    Originally Posted by poisondeathray View Post
    Originally Posted by WWEF View Post
    Ok so, if I want to try some filter with virtualdub2 how do I import them? I tried putting the dll files in the plugins folders and the plugins folder of AviSynth and they don't show up in vd2. Also for debanding I've seen that there's Gradfun, flash3k and vsplacebo for vapoursynth. Any suggestions for those?
    vdub2 can only use vdub/vdub2 filters directly

    You can open avs or vpy scripts in vdub2, but the avs or vpy filters are applied in the scripts, not vdub2 . I would add the filters to your script

    vdub2 might have some debanding filters, I don't recall
    I see. I just want to see how I can properly deband right now. Flash3k seems to be the best option I think.
    Quote Quote  
  24. Originally Posted by WWEF View Post

    I see. I just want to see how I can properly deband right now. Flash3k seems to be the best option I think.

    Most debanding and dithering algorithms are really a form of "noise" . You're basically adding grain in a "smarter" fashion . But this means you wiill need higher bitrate to retain the dither and noise.

    The preview that you "see" is a lossless preview.

    But when you add lossy encoding into the mix , often much of the noise is smoothed away , so it's important to preview some sections of test encodes as well using your target encode settings. If you use insufficient bitrates to retain the dither, it will cause more problems - banding and splotchy patterns

    f3kdb tends to be the "noisest" using default settings of the common debanding filters, but it tends to remain better after lossy encoding. That also means it consumes more bitrate when using qp or crf encoding
    Quote Quote  
  25. Member
    Join Date
    Oct 2021
    Location
    Europe
    Search Comp PM
    Originally Posted by poisondeathray View Post
    Originally Posted by WWEF View Post

    I see. I just want to see how I can properly deband right now. Flash3k seems to be the best option I think.

    Most debanding and dithering algorithms are really a form of "noise" . You're basically adding grain in a "smarter" fashion . But this means you wiill need higher bitrate to retain the dither and noise.

    The preview that you "see" is a lossless preview.

    But when you add lossy encoding into the mix , often much of the noise is smoothed away , so it's important to preview some sections of test encodes as well using your target encode settings. If you use insufficient bitrates to retain the dither, it will cause more problems - banding and splotchy patterns

    f3kdb tends to be the "noisest" using default settings of the common debanding filters, but it tends to remain better after lossy encoding. That also means it consumes more bitrate when using qp or crf encoding
    I use crf 13 and the appropriate settings for x264 encoding. For this video this is what I managed to do so far.

    This is the german video and the adjustments I made without debanding (its uncompressed avi, hence why its so big)
    https://drive.google.com/file/d/19frI3aTYdHFu6AE0J9ELq8pu-_0fiyvG/view

    And this is after I used Flash3k a little
    https://drive.google.com/file/d/1DnJtmKOC0OMUvyhdkw-5URRVkFYdn1Z9/view
    Quote Quote  



Similar Threads