Quantcast Avisynth: Need Script to Select a Time - digitalFAQ.com Forums [Archives]
  #1  
05-04-2004, 02:14 PM
eqlb02 eqlb02 is offline
Free Member
 
Join Date: Jan 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
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?
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Site Staff / Ad Manager
 
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
05-04-2004, 02:22 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply With Quote
  #3  
05-04-2004, 06:13 PM
eqlb02 eqlb02 is offline
Free Member
 
Join Date: Jan 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply With Quote
  #4  
05-04-2004, 06:50 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
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 (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
Reply With Quote
  #5  
05-04-2004, 09:38 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
You can use ColorYUV that has a autogain feature.

http://www.avisynth.org/index.php?page=ColorYUV
Reply With Quote
  #6  
05-04-2004, 09:53 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
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

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
Reply With Quote
  #7  
05-05-2004, 12:09 AM
eqlb02 eqlb02 is offline
Free Member
 
Join Date: Jan 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply With Quote
  #8  
05-05-2004, 03:26 AM
Boulder Boulder is offline
Free Member
 
Join Date: Sep 2002
Location: Lahti, Finland
Posts: 1,652
Thanks: 0
Thanked 0 Times in 0 Posts
Here's one option:

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




Similar Threads
Thread Thread Starter Forum Replies Last Post
Avisynth: Time For A Review of my Script Bud Avisynth Scripting 1 10-11-2003 02:30 PM
Avisynth: How to select source range with Avisynth? rs008f Avisynth Scripting 4 09-21-2003 11:31 PM
how do you select the full screen version in DVD Decrypter? nicksteel Video Encoding and Conversion 2 04-15-2003 04:13 PM
DVD2SVCD: Select source range like you can in TMPGEnc? jrv331 Video Encoding and Conversion 3 11-18-2002 01:32 PM
How to select bitrate in Headac3he? a_star62 Audio Conversion 1 07-18-2002 10:53 PM

Thread Tools



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