Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 25th March 2020, 22:42   #221  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,409
It could be the "randomness" introduced by the dithering algorithm. The same can be said for MCTD . Each run is not necessarily bit identical

Quote:
AutoAdjust have a smoothing & dithering algorithm to avoid banding issue.
use_dither [default: true]
poisondeathray is offline   Reply With Quote
Old 25th March 2020, 22:50   #222  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Nice appraisal PDR, dither did not even cross my mind.
For RandomSource(), was suggested by IanB and another, that random frames should always be repeatable (perhaps repeatable only if some arg set),
perhaps AutoAdjust() is not random repeatable, or just defaults to non-repeatable if some arg is defaulted.

EDIT: Does not seem to be any control over dither (I assume use_dither is a bool. EDIT: Yes is bool, PDR says so above)
Code:
    AutoAdjust ( [clip], external_clip,
                 auto_gain,
                 dark_limit, bright_limit, gamma_limit, 
                 dark_exclude, bright_exclude, 
                 gain_mode, chroma_process, avg_safety,
                 input_tv, output_tv,
                 auto_balance,
                 chroma_limit, balance_str,
                 scd_threshold, temporal_radius, change_status,
                 use_interp, use_dither,
                 high_quality, high_bitdepth, 
                 threads_count, asm_opt,
                 debug_view )
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 25th March 2020 at 22:58.
StainlessS is offline   Reply With Quote
Old 12th April 2021, 08:34   #223  |  Link
Pauly Dunne
Grumpy Old Man.
 
Pauly Dunne's Avatar
 
Join Date: Jul 2019
Location: Out There....
Posts: 692
I'm having a strange problem trying to use AutoAdjust in Ripbot264, certain commands in the script will preview a half screen of just a swirled up colourful "mess", but the weirdest thing, on a script that actually works (graphically), I have to remove the audio track for the filter to process.

Any suggestions ??
__________________
Not poorly done, just doin' it my way !!!
Live every day like it's your last, because one day, it will be !! (M$B)
Pauly Dunne is offline   Reply With Quote
Old 20th May 2021, 18:32   #224  |  Link
Treaties Of Warp
Registered User
 
Join Date: Apr 2019
Posts: 16
Is there any kind of equivalent filter to this on 64 bit (either AviSynth 64 or VapourSynth)?

I continue to have problems with this when it's run with other filters. It produces very noticeable color flashes in some cases. Almost like the "temporal radius" is "resetting" or something. Sometimes I can get it to be stable for about 20 - 30 minutes of video, then it starts the color flashing thing. (Almost reminds me of VHS Macrovision.)

When AutoAdjust works it works great, and there's just nothing else like it. But when it does this color flashing thing it can be a nightmare to try to solve.
Treaties Of Warp is offline   Reply With Quote
Old 20th May 2021, 19:12   #225  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
Maybe try cutting the video in some parts with trim (scenechange!) and apply AutoAdjust to each section.
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 28th May 2021, 22:09   #226  |  Link
Mounir
Registered User
 
Join Date: Nov 2006
Posts: 776
Quote:
Originally Posted by Treaties Of Warp View Post
Is there any kind of equivalent filter to this on 64 bit (either AviSynth 64 or VapourSynth)?

When AutoAdjust works it works great, and there's just nothing else like it. But when it does this color flashing thing it can be a nightmare to try to solve.
Have you tried to lower the number of temporal frames (20 by default that's a lot !) try 5 or lower
Quote:
temporal_radius=5
Mounir is offline   Reply With Quote
Old 10th July 2021, 02:50   #227  |  Link
Treaties Of Warp
Registered User
 
Join Date: Apr 2019
Posts: 16
I did realize there was a AviSynth64 port of AutoAdjust included with Selur Hybrid. Not sure who authored it, but it has the same date as the 32 bit one.

Still looking for a way to port this over to VapourSynth. It has its own dll so I'm guessing this will probably never happen.

AviSynth x86 is way too slow for 4K. VapourSynth works great for 4K. AviSynth64 seems fine, but if working in VapourSynth, using AutoAdjust requires additional workflow and hard drive space. (Encode in AviSynth64 first to lossless file, then encode with additional filters etc. in VapourSynth.)

I did try playing with temporal radius. I got extremely poor results with any setting other than 20. Not sure what's up with that!
Treaties Of Warp is offline   Reply With Quote
Old 10th July 2021, 09:06   #228  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,338
Quote:
I did realize there was a AviSynth64 port of AutoAdjust included with Selur Hybrid. Not sure who authored it, but it has the same date as the 32 bit one.
Download in the first post here includes a 32bit and 64bit Avisynth AutoAdjust build.
Quote:
Still looking for a way to port this over to VapourSynth.
Yup, a Vapoursynth version of AutoAdjust would be nice.

---
As a side note:
When in Windows you could use Avisynth64Bit Filters in Vapoursynth (even in Hybrid when using a custom section).
Using:
Code:
core.avs.LoadPlugin("I:/Hybrid/64bit/Avisynth/avisynthPlugins/AutoAdjust.dll")
clip = clip.avs.AutoAdjust(auto_gain=True)
would create something like:
Code:
# Imports
import vapoursynth as vs
# getting Vapoursynth core
core = vs.core
# Loading Plugins
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/SourceFilter/FFMS2/ffms2.dll")
# defining beforeDeCross-function - START
def beforeDeCross(clip):
  core.avs.LoadPlugin("I:/Hybrid/64bit/Avisynth/avisynthPlugins/AutoAdjust.dll")
  clip = clip.avs.AutoAdjust(auto_gain=True)
  return clip
# defining beforeDeCross-function - END

# source: 'G:\TestClips&Co\test.avi'
# current color space: YUV420P8, bit depth: 8, resolution: 640x352, fps: 25, color matrix: 470bg, yuv luminance scale: limited, scanorder: progressive
# Loading source using FFMS2
clip = core.ffms2.Source(source="G:/TestClips&Co/test.avi",cachefile="E:/Temp/avi_9dec25d3f707eb4813d42334c7f1a8d6_853323747.ffindex",format=vs.YUV420P8,alpha=False)
# making sure input color matrix is set as 470bg
clip = core.resize.Point(clip, matrix_in_s="470bg",range_s="limited")
# making sure frame rate is set to 25
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# Setting color range to TV (limited) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
clip = beforeDeCross(clip)
# adjusting output color from: YUV420P8 to YUV420P10 for x265Model (i420@8)
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10, range_s="limited")
# set output frame rate to 25.000fps
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# Output
clip.set_output()
which works fine here.

Cu Selur
__________________
Hybrid here in the forum, homepage

Last edited by Selur; 10th July 2021 at 09:31.
Selur is offline   Reply With Quote
Old 10th July 2021, 13:09   #229  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
I used AutoAdjust for many encodes in VS. Only HBD mode is broken (also in avisynth I think), everything else works great in VapourSynth.
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 10th July 2021, 15:52   #230  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,338
Still a native Vapoursynth version would be cool.
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 30th July 2021, 12:17   #231  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,588
LaTo last post was in 2016, and all his plugins close source so the hope for any update is so far...

maybe someone can use AutoLevels as a base and remake it? since don't know if it even possible to reverse engineering it or even get the source from LaTo
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 3rd October 2022, 14:43   #232  |  Link
Stereodude
Registered User
 
Join Date: Dec 2002
Location: Region 0
Posts: 1,436
Quote:
Originally Posted by Stereodude View Post
Ideally I would like a mode to prevent clipping of any of the RGB color channels (even if chroma processing is not enabled). Currently it looks like it only considers Y which can cause an individual R,G, or B color channel to fall above or below the limits resulting in color channel clipping.
So I figured out how to make AutoAdjust do this well enough for some of my uses. As I mentioned earlier in the thread I use it to fix poorly mastered/graded DVDs/Blu-rays where the black levels are elevated. Where AutoAdjust doesn't give a very good result is where someone took some artistic intent to shift the blacks toward a color. AutoAdjust works based on the Y channel and then one of the colors (RGB) can get crushed. I've been using the external clip argument with a blurred and slightly cropped version of the video to eliminate sharpening artifacts from messing up the calculations. I realized I could also use the Extract_ command in AVIsynth+ on the external clip so that all the decisions level adjustments are based on the channel that's being crushed. It works well as long as the intentional color shift is consistent and the video is pretty dark (has a lot of consistent black).

Example script snippet where the red channel was getting crushed due to a black balance color shift:
Code:
alt=source_16b.crop(4,4,-4,-6).ConvertToRGB64(matrix="PC.601").ExtractR.ConvertToYUV420(matrix="PC.601").FastBlur(2.0).ConvertToStacked()

source_16b.ConvertToStacked()
AutoAdjust(external_clip = alt, auto_gain=true, gain_mode=1, dark_limit=2.50, bright_limit=1.00, dark_exclude=0.01, bright_exclude=0.01, gamma_limit=1.00, auto_balance=false, chroma_limit=1.00, high_bitdepth=true, high_quality=true, use_dither=false, debug_view=false, input_tv=false, output_tv=true)
ConvertFromStacked(bits=16)
Stereodude is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:20.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.