VideoHelp Forum




+ Reply to Thread
Results 1 to 24 of 24
  1. 1080i Source clip: https://www.dropbox.com/s/h5g4fqmd5in8ml7/Gradient%20Problem%201080i%20source.mkv?dl=0
    720p conversion: https://www.dropbox.com/s/ze70ahfyokq2z7r/Gradient%20Problem%20720p%20conversion.m2ts?dl=0

    The wall on the background has a bad color banding artifact. It's made far worse when you convert to 720p. Is there any way to fix this preferably with a non-CPU intensive script?
    Quote Quote  
  2. Member
    Join Date
    May 2014
    Location
    Memphis TN, US
    Search PM
    You've been through the same thing earlier: https://forum.videohelp.com/threads/365403-Fixing-Color-Banding-and-junk-in-gradients?h...hlight=banding. Same problems, same cause, same answers.
    - My sister Ann's brother
    Quote Quote  
  3. Retain/add noise, use sufficient bitrate.
    Quote Quote  
  4. OK thanks. I thought the earlier problem was pixellation on the walls. This is banding. The banding can be seen in the source so I don't think using a higher bitrate is going to fix it?

    I tried various debanding extensions from the Avisynth website but none of them did anything. I just used the default options. What's the point of those plugins if they don't actually fix banding?

    Was wondering if the banding is simply due to the video being 8-bit? I've seen BBC1 HD using half the bitrate of the ITV HD source I provided and it doesn't have banding problems and the picture looks better. Suppose it's just a better encoder they use? But they both use the h264 codec so not sure why the BBC1 videos always look better?
    Quote Quote  
  5. Banned
    Join Date
    Oct 2014
    Location
    Northern California
    Search PM
    Adding noise, apply some channel blur, adding variation to the color or regional desaturation can help but the best solution is to color correct and render it as 10bit video.
    Quote Quote  
  6. Member
    Join Date
    May 2014
    Location
    Memphis TN, US
    Search PM
    Originally Posted by VideoFanatic View Post
    The banding can be seen in the source so I don't think using a higher bitrate is going to fix it?
    Higher bitrate helps prevent it and/or helps prevent it getting worse. If banding is already in the low-bitrate source, why do you think a cheap-low bitrate like 2200 for big HD frames won't make it worse?

    Originally Posted by VideoFanatic View Post
    I tried various debanding extensions from the Avisynth website but none of them did anything. I just used the default options. What's the point of those plugins if they don't actually fix banding?
    In addition to jagabo's suggestions, try:
    GradFun3(thr=1.2,mask=0)
    dither_16 resize options (dither plugin). The html comes with specific examples.
    AddGrainC

    Originally Posted by VideoFanatic View Post
    Was wondering if the banding is simply due to the video being 8-bit?
    Not specifically. Lots of retail video is 8-bit.

    Originally Posted by VideoFanatic View Post
    I've seen BBC1 HD using half the bitrate of the ITV HD source I provided and it doesn't have banding problems and the picture looks better. Suppose it's just a better encoder they use?
    You bet. You and I can't afford the encoders used for broadcast masters.

    Originally Posted by VideoFanatic View Post
    But they both use the h264 codec so not sure why the BBC1 videos always look better?
    H264 isn't used for broadcast. BBC1 usually looks better because the techs insist on better work. Yanks don't know any better, they'll watch anything and pay to watch it as well.
    - My sister Ann's brother
    Quote Quote  
  7. Originally Posted by LMotlow View Post
    H264 isn't used for broadcast.
    It is across the pond. In N. America we are strictly MPEG2




    Another option is to use a debanding filter during playback instead of wasting time filtering, re-encoding
    Quote Quote  
  8. Seriously? American's only get HD TV broadcasts in MPEG2? Why is that?

    Any idea what bitrate USA HD TV is in? Free channels in the UK use a max of 9.8 Mbps h264. UK Sky TV Subscription channels use about 17 Mbps h264 max.
    Quote Quote  
  9. Originally Posted by VideoFanatic View Post


    I tried various debanding extensions from the Avisynth website but none of them did anything. I just used the default options. What's the point of those plugins if they don't actually fix banding?
    They all work to some extent at the default options. It should be a huge difference even at default settings, just preview it.

    If you didn't see it working in the final encode, probably you didn't encode it properly (especially bitrate) . That's another reason to use the filters during playback, not to "fix" and re-encode. On average , you might need 2-3x the original size to properly "retain" the dither and noise for typical scenarios
    Quote Quote  
  10. Banned
    Join Date
    Oct 2014
    Location
    Northern California
    Search PM
    Originally Posted by VideoFanatic View Post
    American's only get HD TV broadcasts in MPEG2?
    Job security for stuffy old engineers?

    Originally Posted by LMotlow View Post
    Higher bitrate helps prevent it and/or helps prevent it getting worse. If banding is already in the low-bitrate source, why do you think a cheap-low bitrate like 2200 for big HD frames won't make it worse?
    Banding is primarily a problem due to 8bit video, a low bitrate encoding could make things worse although not always, also sometimes people mistake macroblock type compression artifacts with banding.
    Quote Quote  
  11. Try something like this:

    Code:
    ffVideoSource("Gradient Problem 1080i source.mkv") 
    Yadif(mode=1, order=1)
    BicubicResize(1280,720)
    GradFun2dbMod()
    Then encode with this batch file:

    Code:
    x264.exe --preset=slow --crf=18 --aq-mode=2 --aq-strength=1.8 --keyint=50 --sar=1:1 --colormatrix=bt709 --output %1.mkv %1
    That will give you a video about 50 percent bigger than your 720p encoding but with more detail and less banding.
    Image Attached Files
    Quote Quote  
  12. Member
    Join Date
    May 2014
    Location
    Memphis TN, US
    Search PM
    Looks good, jagabo (thanks for the x264 settings. A couple of mine were goofy). I used a Spline resizer, but I see where Bicubic softens that noise just right.

    I keep trying that 2200 bitrate of videofanatic's, but it's still a mess. No way.
    - My sister Ann's brother
    Quote Quote  
  13. Radical approach is:

    reduce bit per component to 7 - 5 bits with strong low-medium frequency dither, set encoder to preserve grain - sadly i must say there is no free encoder with dither preservation (commercial one may introduce particularly tuned encoding path to preserve dithering without sacrificing quality) btw use static dither avoid floyd-steinberg or noise like - things like "addition based" dither from ffmpeg may work significantly better but they are NOT implemented for anything except palette color (any video mode where full chroma interpolation doesn't work)

    "addition based" dither

    http://pippin.gimp.org/a_dither/
    Quote Quote  
  14. Thanks everyone. Just wondering, if just doing a general 1080i to 720p conversion without any special filters, is BicubicResize the best downscaler and will that give a better picture quality or different file size?

    What about upscaling? I've got some 544 x 576i 16:9 recordings copied directly from my satellite box. I need to upscale to 720 x 576. At the moment I'm just doing Lanczos4Resize but was wondering if there's anything better as I'd like the best picture quality possible.
    Quote Quote  
  15. Which resize filter you want to use depends on the source and your personal taste. Resizing filters that sharpen will increase noise, increase aliasing and moire artifacts, and produce halos on edges that are already sharp. Resizers that blur will reduce noise, edges will be less sharp and you'll get less moire, and small details may disappear. But the result is a little more natural and you won't get oversharpening halos. Ie, downscaling to half size (each dimension) will look more like what you see by viewing the original image from twice as far away.

    For upscaling I like to use nnedi3_rpow2(). It keeps sharp edges smooth (less aliasing) and doesn't produce oversharpening halos.
    Quote Quote  
  16. Tried that and it gives this error: nnedi3_rpow2: 2 <= rfactor <= 1024, and rfactor be a power of 2! My video is 544 x 576. I'm trying to upscale to 720 x 576

    I'm just trying to get the best picture quality, not interested in sharpening the picture. I don't want artifacts or halos. I know nnedi3 is the best upscaler but as far as I'm aware it doesn't work on 544 x 576 videos when upscaling to 720 x 576. It only seems to work when the video is half resolution 360 x 576.

    With regards to downscaling 1080i to 720p I'm just trying to get the best picture quality, not interested in sharpening the picture. I don't want artifacts

    On another project I'm doing the same thing but was wondering if there's a different downscaler which will lower the file size. I'm using Lancoz4Resize at the moment.
    Quote Quote  
  17. Member
    Join Date
    May 2014
    Location
    Memphis TN, US
    Search PM
    Originally Posted by VideoFanatic View Post
    On another project I'm doing the same thing but was wondering if there's a different downscaler which will lower the file size.
    No.

    Keep it simple, with fewer artifacts: Spline36Resize
    - My sister Ann's brother
    Quote Quote  
  18. Originally Posted by VideoFanatic View Post
    Tried that and it gives this error: nnedi3_rpow2: 2 <= rfactor <= 1024, and rfactor be a power of 2! My video is 544 x 576. I'm trying to upscale to 720 x 576
    Assuming your video is progressive:

    Code:
    nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=720, fheight=576)
    You can replace Spline36Resize with any of the other resizers. With that minor resize you probably won't see much difference between nnedi3 and a simple Spline36Resize.
    Quote Quote  
  19. OK thanks. My video is interlaced so what should I use?
    Quote Quote  
  20. For interlaced video and only resizing the width:

    Code:
    SeparateFields()
    nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=720, fheight=height)
    Weave()
    Quote Quote  
  21. Thanks. Would this be OK too?

    Code:
    QTGMC(Preset="Super Fast")
    nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=720, fheight=height)
    SeparateFields() SelectEvery(4,0,3) Weave()
    So is nnedi doubling the resolution then Spline is downscaling? Is so why do I keep the height if nnedi has doubled the height which will be bigger than 720?
    Quote Quote  
  22. [QUOTE=VideoFanatic;2359487]Thanks. Would this be OK too?

    Code:
    QTGMC(Preset="Super Fast")
    nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=720, fheight=height)
    SeparateFields() SelectEvery(4,0,3) Weave()
    Yes. That's even better.

    Originally Posted by VideoFanatic View Post
    So is nnedi doubling the resolution then Spline is downscaling?
    Basically.

    Originally Posted by VideoFanatic View Post
    Is so why do I keep the height if nnedi has doubled the height which will be bigger than 720?
    "height" at that point is the height of the input video.
    Quote Quote  
  23. I don't understand I thought the height at that point is double what it originally was, as nnedi doubles it?
    Quote Quote  
  24. Until the new video is created by nnedi3 (ie until the next line) "height" is still the height of the "last" video. Don't take my word for it -- just try it.
    Last edited by jagabo; 28th Nov 2014 at 17:01.
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!