VideoHelp Forum
+ Reply to Thread
Results 1 to 12 of 12
Thread
  1. I cannot figure out how to deblock using either x264/x265 in AviDemux Nightly 2.7.9.

    I have attached a sample below, which is sourced from a .bik (BINK) file, extracted losslessly to an image sequence (.png for AviDemux support).


    Configure > Frame > Loop Filter in x264/x265 does nothing.

    Video > PostProcessing > Horizontal/Vertical deblocking does nothing.

    I sort of figured out I may need to insert deblock=x:x:x somewhere, but I'm all new to this so I'm pretty clueless.


    Q: Why do I use AviDemux?

    A: I need to edit the video somewhat, add blanking, fade in/out of black, cut it shorter etc.


    The excerpt attached below clearly shows the issue, it's basically present all throughout, but right there it's pretty heavy.

    Would anyone of you more experienced video editors be able to crack this issue?


    I used RAD Video Tools for the image sequence - Scaling Type... > Highest Quality (Bi-cubic): https://www.videohelp.com/software/Rad-Video-Tools


    Much appreciated!
    Image Attached Files
    Quote Quote  
  2. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    If you're trying to deblock a video, why have you uploaded a series of stills?
    upload a video sample
    Quote Quote  
  3. Originally Posted by davexnet View Post
    If you're trying to deblock a video, why have you uploaded a series of stills?
    upload a video sample
    Sorry, I thought a series of stills would be the easiest way of replicating my procedure.

    I have attached three video samples below, all sourced from the stills previously uploaded.


    x264-loopfilter-6-6 is a render of +6 strength and +6 threshold (Configure > Frame).

    x264-loopfilter-6-0 is a render of +6 strength and 0 threshold (Configure > Frame).

    x265-loopfilter-checked is a render with (Configure > Frame > Loop Filter) checked.


    On all samples (Video > PostProcessing > Horizontal/Vertical deblocking) were checked.
    Image Attached Files
    Quote Quote  
  4. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    I loaded your stills into Avidemux to understand what you're doing. You want to create a video but to remove the
    block and banding. Is this correct? I don't think you're going to do it with these x264 switches, probably have better luck
    with an Avisynth script and some external filters.
    Quote Quote  
  5. Originally Posted by davexnet View Post
    I loaded your stills into Avidemux to understand what you're doing. You want to create a video but to remove the
    block and banding. Is this correct? I don't think you're going to do it with these x264 switches, probably have better luck
    with an Avisynth script and some external filters.
    Yes, correct, the stills are extracted losslessly from a .bik file, I want to refine the final image quality by re-rendering, also edit a little bit.

    Would you know where to start looking for great deblock scripts/commands to use with Avisynth?

    Can these scripts be inserted into either AviDemux or VirtualDub2?

    Thank you so much!
    Quote Quote  
  6. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    I would do your editing in Avidemux if it does what you need and you're used to it.
    Deselect "use advanced configuration", then set the encoder to CRF 0, and according to this page, it's considered lossless.
    Settings of Ultrafast or very slow only affect the amount of compression used.
    https://trac.ffmpeg.org/wiki/Encode/H.264

    This will be your intermediate file. Use that as input to your Avisynth script, where you do the denoise

    Either I or somebody else in this thread should be able to help with that
    Last edited by davexnet; 17th May 2021 at 21:48.
    Quote Quote  
  7. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    It's all a compromise of course, this kind of filter softens the image slightly, but you can tweak it and find the right trade-off
    Using
    Code:
    Gradfun3(thr=0.80)
    http://avisynth.nl/index.php/Dither_tools
    Image Attached Files
    Quote Quote  
  8. Thank you for all your help, your sample looked interesting!

    I have tried a couple of filters/features lately, but they all seem to remove some of the sharpness of the image, or the fine detail found in the footage.

    I would guess that the blocking I see in the source footage cannot be removed without sacrificing some of the definition.

    The blocking is most likely caused by the original compression into the .bik file, the source file would not be having these blocks, that's my guess.

    Unfortunately there's no better source file to come across, I'll have to play with what I've got, thanks yet again for all your help, you've been great!
    Quote Quote  
  9. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Originally Posted by simple View Post
    Thank you for all your help, your sample looked interesting!

    I have tried a couple of filters/features lately, but they all seem to remove some of the sharpness of the image, or the fine detail found in the footage.

    I would guess that the blocking I see in the source footage cannot be removed without sacrificing some of the definition.

    The blocking is most likely caused by the original compression into the .bik file, the source file would not be having these blocks, that's my guess.

    Unfortunately there's no better source file to come across, I'll have to play with what I've got, thanks yet again for all your help, you've been great!
    Are you sure you're not losing something when you save those stills as png? Isn't there a lossless choice?
    Or is the png stills the source itself?
    Did you try adding some kind of sharpening in the script?
    Quote Quote  
  10. Originally Posted by davexnet View Post
    Are you sure you're not losing something when you save those stills as png? Isn't there a lossless choice?
    Or is the png stills the source itself?
    Did you try adding some kind of sharpening in the script?
    I'm not experienced with scripting, I actually transfered to using VirtualDub2 rather than AviDemux lately.

    There's a plugin from Infognition called Super Resolution 2.0, see below:
    http://www.infognition.com/super_resolution_vdf/

    It can upscale my 1080p footage to 3840p as required by my Panasonic UB-9000 blu-ray player to avoid causing 3:2 pulldown from a 60p forced playback.
    The firmware in the Panasonic has a bug/strange behaviour which forces anything lower than a 3840px horizontal resolution file to be played back at 60p.
    As soon as the file is 3840px horizontal it will playback the file with true 23.976/24p capabilities.

    Strange, yes, but can be avoided/fixed, so I prefer to upscale my files at the same time as footage actually gets crispier.
    You could always add a bit of sharpness to finalize the image, VirtualDub2 has a great sharpening that doesn't cause artifacts when used in moderation.
    Inside VirtualDub2, there's another plugin I downloaded called MSU DeBlocking Filter v.2.2 which is excellent at removing blocking, but definition is lost, sadly.

    You can find the plugin at the bottom of this page, lots of different interesting plugins there, actually:
    https://videoprocessing.ai/video_filters/virtualdub/

    Here's the deblocking plugin:
    https://videoprocessing.ai/video_filters/deblocking.html


    About the source file, it's a .bik (Bink) video source file, which I assume by nature has been compressed to madness once packaged into the .bik format.
    I need to extract it, or maybe not extract it, but at least take the footage out of the .bik file in a lossless manner as you cannot uncompress it.

    I use Rad Video Tools to do this, see below:
    https://www.videohelp.com/software/Rad-Video-Tools

    You can either export/extract the footage to .avi, but file sizes are a whopping 120GB for like 4 minutes of 1080p30.
    You can also choose .mp4, but then there's some built-in scripting that's being used to render the extract/export, I don't want that, but then there's no blocking!
    I want a much higher quality extract/export so I choose .png or .tiff as I know these formats are lossless by nature.

    No matter the format, you need to choose scaling method to use for re-rendering, I guess, there are three options:

    1) dupes or drops pixels
    2) bilinear (medium quality)
    3) bicubic (high quality)

    I use #3 for highest quality, but then there's blocking, bit of a sigh.

    I think I will try to use my .tiff exports and import the image sequence in VirtualDub2, apply the upscaling filters and maybe a tiny bit of deblocking somehow.

    Have you ever used VirtualDub2?
    Quote Quote  
  11. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Good point, I had forgotten png was lossless. Yes, I'm familiar with Virtualdub2. It's normal to have to apply some sharpening after
    debanding or deblocking if it's heavy enough. Finding the right balance is the key
    What do you intend to do with your finished video?

    Here's another attempt I made
    some deblock, deband and sharpening - also saved it with FFv1, lossless codec
    Image Attached Files
    Quote Quote  
  12. What do you intend to do with your finished video?

    Not much, it's for personal use only, it's a cinematic trailer for Star Wars: The Old Republic - Knights Of The Eternal Throne:
    https://www.youtube.com/watch?v=LbpDxrew4A0

    Will cut/fade out at 04:48, don't want the last bit exhibiting the daughters return as a villian, leaves a rather amazing/exciting ending to be re-watched.
    Just upscale, address the blocking, perhaps a bit of color correction, then just let the surround upmixer in my A/V receiver handle the rest.
    It's hard to compare quality in that short snippet, however I can barely notice any blocking, so that's nice.
    Still not entirely convinced that deblocking is the way to do it, I crave as much quality as possible as well.
    Quote Quote  



Similar Threads

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