digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   Avisynth: Need script to select a time (http://www.digitalfaq.com/archives/avisynth/9453-avisynth-script-select.html)

eqlb02 05-04-2004 02:14 PM

Avisynth: Need script to select a time
 
i was wondering if there is a
way in a avisynth script to
select a time. okay what
i mean is that i ripped a
episode off of a dvd.
made it a little too dark and
what not. so the main question is
is there away in a avisynth script
to select a time lets say 12 minutes
to 14 minutes and change the brightness?

kwag 05-04-2004 02:22 PM

You would have to use conditional evaluation, so when you are in the selected range, you apply the brightness level you want, and if the condition is not met, nothing happens.

In pseudo code:

Code:

if current_frame >= start_frame AND current_frame <= end_frame
        increase_brightness
else
        do_nothing

Where start_frame and end_frame are the "bracket" range you want to apply brightness.

Read here: http://www.avisynth.org/index.php?pa...ditionalFilter

-kwag

eqlb02 05-04-2004 06:13 PM

is there a way to have a set number in
tweak and then have the avisynth script
auotdetect if there is a change
like they can do with audio
if the audio is to high or
too low then it adjust to the levels that
you want

and second part if that cant be done :-p
is whats the best way to get the frame number
from the minutes

p.s.
thanks i wouldn't have thought of doing that

kwag 05-04-2004 06:50 PM

Quote:

Originally Posted by eqlb02
is there a way to have a set number in
tweak and then have the avisynth script
auotdetect if there is a change
like they can do with audio
if the audio is to high or
too low then it adjust to the levels that
you want

You mean like an automatic gain control, or normalization :?:
Yes, probably, but to what reference are you going to adjust the frame brightness :?:
You would need some sort of "map" (like a first pass analisys), so you could apply the correct increase or decrease in brightness, for each frame. So I think this is a no no :lol: (anyone, corect me if I'm wrong :!: )
Quote:


and second part if that cant be done :-p
is whats the best way to get the frame number
from the minutes
framerate * seconds = frame number
Or load your video in VirtualDub, scroll to your starting position, and read the frame number. Do the same for the end frame.
Quote:


p.s.
thanks i wouldn't have thought of doing that
;)

-kwag

Dialhot 05-04-2004 09:38 PM

You can use ColorYUV that has a autogain feature.

http://www.avisynth.org/index.php?page=ColorYUV

kwag 05-04-2004 09:53 PM

Quote:

Originally Posted by Dialhot
You can use ColorYUV that has a autogain feature.

http://www.avisynth.org/index.php?page=ColorYUV

You're right Phil :D

With this:
Code:

# Recovers visibility on "very bad" recordings:
ColorYUV(autogain=true, autowhite=true)

together with a frame range, he can apply it to his wanted section only.

-kwag

eqlb02 05-05-2004 12:09 AM

bad news that coloryuv turns the black scenes pure white hehe
at least you can see it :P . whats better for adjusting the color
tweak, coloryuv, or levels.

Whats is the best way to setup up a ConditionalFilter, i don't
know how to setup up one..never had to worry that much
with them.

is it some thing like this

Code:


function cb(clip, b)

  b1 = tweak(0, 1, b, 1) 
}

okay for the
Code:

if current_frame >= start_frame AND current_frame <= end_frame
        increase_brightness
else
        do_nothing

how would i do a multi parts ie frame 1150 to 1600 is black and so is frame 2000 to 2400..could i do that in a functions? or would that just contnew(sp) from the code to the next code

Boulder 05-05-2004 03:26 AM

Here's one option:

http://forum.doom9.org/showthread.php?s=&threadid=73110


All times are GMT -5. The time now is 03:19 AM  —  vBulletin © Jelsoft Enterprises Ltd

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.