VideoHelp Forum
+ Reply to Thread
Results 1 to 22 of 22
Thread
  1. (f.c.o) please how y gamma can be changed inside avisynth? thanks
    Quote Quote  
  2. Member
    Join Date
    May 2014
    Location
    Memphis TN, US
    Search PM
    Use the gamma_y setting in Avisynth's internal filter, ColorYUV().
    http://avisynth.org.ru/docs/english/corefilters/coloryuv.htm

    Or use Avisynth's built=in Levels() function.
    http://avisynth.nl/index.php/Levels
    - My sister Ann's brother
    Quote Quote  
  3. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    That's a very-trivial task
    Image Attached Thumbnails Click image for larger version

Name:	avisynth-dox.png
Views:	558
Size:	61.1 KB
ID:	27902  

    Quote Quote  
  4. Member
    Join Date
    May 2014
    Location
    Memphis TN, US
    Search PM
    You can get to Avisynth's installed documentation a little faster by going to Start ->, look for the All Programs or Programs listing, find AVisynth 2.5, expand the Avisynth program group an click Avisynth Documentation. Or do what lots of folks do and make a desktop shortcut to the "Index.htm" file shown in the above image. The online documentation page has an A-to-Z index in the upper left hand corner.
    - My sister Ann's brother
    Quote Quote  
  5. marcorocchini isn't interested in reading documentation to learn anything. He wants all of you to write his scripts for him. That's why I've stopped responding to his posts. Next he'll be pointing you to one of his videos and asking you what gamma setting he should use.
    Quote Quote  
  6. Member
    Join Date
    May 2014
    Location
    Memphis TN, US
    Search PM
    Yep. Still waiting for the other shoe to drop.
    - My sister Ann's brother
    Quote Quote  
  7. And then he'll be asking for a script to automate gamma adjustments for all his videos in a batch process.
    Quote Quote  
  8. Member
    Join Date
    May 2014
    Location
    Memphis TN, US
    Search PM
    Yep. Then he'll get a new batch of videos, won't remember a thing that anyone posted, and it'll start all over again.

    As it is, there's already some confusion about gamma anyway. https://forum.videohelp.com/threads/367549-same-mp4-opened-in-VD-and-avisynth-is-differ...=1#post2349845
    - My sister Ann's brother
    Quote Quote  
  9. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    Originally Posted by LMotlow View Post
    Yep. Then he'll get a new batch of videos, won't remember a thing that anyone posted, and it'll start all over again.
    Very true I daresay he is an Italian gamemaniaco who sniffs cats instead of DVD-fungus
    Quote Quote  
  10. OH, first of all I'm a cat: a beautiful cat. "Italian gamemaniaco" ?!?
    It is a fact that in avisynth gamma correction does not have an elementary syntax command: is a fact that avisynth is not easy to use.
    Hell Heggunte is an anti-cats and anti-my-nle, but also thanks to all
    Last edited by marcorocchini; 6th Oct 2014 at 02:11.
    Quote Quote  
  11. Originally Posted by jagabo View Post
    And then he'll be asking for a script to automate gamma adjustments for all his videos in a batch process.
    however I try to change gamma in a fixed point, not autogamma or autolevels.

    I would do a batch that to this: if recognized that input file is a GOPRO MP4 file

    Code:
            Set "TokenS=0"
            Set "isMP4GOPRO=0"
            IF "%~x1"==".MP4" Set "TokenS=1" 
            IF "%~x1"==".mp4" Set "TokenS=1"
            If "%TokenS%"=="1" Set "isMP4=1"
            IF "%isMP4%"=="1" (v:\automazioneclip\virtualdub\mediainfo.exe "%CD%\%~n1.mp4" dumpinfo:unicodefile.txt
            TYPE unicodefile.txt>mediainfo.txt)
            findstr /c:"Title                                    : GoPro AVC" "mediainfo.txt"
            IF NOT ERRORLEVEL 1 (set "GoPROAVC=1")
            if "%ismp4%"=="1" if "%Goproavc%"=="1" (set "MP4gopro=1")
            findstr /c:"Frame rate                               : 50.000 fps" "mediainfo.txt"
            IF NOT ERRORLEVEL 1 (set "gopro50fps=yes")
            findstr /c:"Scan type                                : Progressive" "mediainfo.txt"
            IF NOT ERRORLEVEL 1 (set "goproProgressive=yes")
            IF "%MP4gopro%"=="1" if "%gopro50fps%"=="yes" if "%goproProgressive%"=="yes" (set "MP4gopro50fpsProgressive=1")
    do: gamma correction (in a fixed point)
    Quote Quote  
  12. Member Alex_ander's Avatar
    Join Date
    Oct 2006
    Location
    Russian Federation
    Search Comp PM
    I use SmoothAdjust plugin (it works with internal bit-depth upconversion), like this:

    SmoothLevels(gamma=1.2)
    Quote Quote  
  13. Member
    Join Date
    May 2014
    Location
    Memphis TN, US
    Search PM
    Yep. The shoe drops.

    Originally Posted by marcorocchini View Post
    It is a fact that in avisynth gamma correction does not have an elementary syntax command
    Sure it does. Avisynth's ColorYUV(), Levels(), and RGBAdjust() functions have parameters for gamma adjustment.

    Sample: ColorYUV(gamma_y=10)
    Sample: Levels(gamma=1.2)
    Sample: RGBAdjust(rg=1.2, gg=1.2, bg=1.2)
    Last edited by LMotlow; 6th Oct 2014 at 22:52.
    - My sister Ann's brother
    Quote Quote  
  14. Hint: VirtualDub Levels filter ~= AviSynth Levels().
    Quote Quote  
  15. Member
    Join Date
    May 2014
    Location
    Memphis TN, US
    Search PM
    All of the filters mentioned will adjust gamma. The problem with automation is deciding how much or how little to adjust. It will be different for different videos. The GOPRO video submitted has serious problems with gamma, which varies during the video from too low to too high because of the GOPRO's autogain feature. Using autogain under widely varying light conditions is a serious mistake commonly made by amateurs. There is no remedy for it. "Auto" filters either don't improve it or make it look worse.
    - My sister Ann's brother
    Quote Quote  
  16. thanks alex_ander, SmoothLevels(gamma=1.2) work easy

    for YUY2:
    ColorYUV(gamma_y=-15, gamma_u=-15, gamma_v=-15)
    Quote Quote  
  17. gamma_u and gamma_v do nothing in ColorYUV(). Gamma adjustments make no sense for the chroma channels.
    Quote Quote  
  18. ops, using ColorYUV(gamma_y=1.2) it seemed to me give back an error but not, work well and work well in YUY2
    Quote Quote  
  19. ColorYUV() requires integers, scaled by 256.
    Quote Quote  
  20. Member
    Join Date
    May 2014
    Location
    Memphis TN, US
    Search PM
    Originally Posted by jagabo View Post
    ColorYUV() requires integers, scaled by 256.
    Yep, you're right. Sharp eye for spotting that one. I changed my code with ColorYUV a couple of posts back. gamma_y is defined in the docs as float rather than integer, but with a range of -256 to +256 a decimal value like 1.2 doesn't make much sense, even if it worked (maybe the online Help needs correction?).
    - My sister Ann's brother
    Quote Quote  
  21. Originally Posted by LMotlow View Post
    gamma_y is defined in the docs as float rather than integer, but with a range of -256 to +256
    You're right, all the numeric arguments are floats. I wonder if it used to be integers, otherwise why would they use scaled values? That's normally done so that program doesn't have to use floating point calculations (which used to be interminably slow).
    Quote Quote  
  22. ColorYUV(gamma_y=-15)
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!