oof
28th September 2003, 19:18
In an effort to prevent MY VHS tapes from being lost due to
old age, I have decided to put them on DVD via analog capture.
Most of them have an irritating defect wherein the Luma level
appears to change periodically when captured with any device
that has Automatic Gain Control. I would like to investigate the
possibility of adjusting this problem with a software rather than
hardware solution.
I am using an ATI 8500. Its tendency to refuse to capture at all
has been circumvented by modifying an unnecessary DLL. I am
left with how to fix the contrast changes.
I have a solution which is more than 95 % sucessful on a random
movie.
I occurs to me that other people may wish to play with this and
help improve it, purely as an academic exercise.
Here is what I have so far. Comments/Insults welcome.
I'm afraid notepad was the editor
#Avisynth Script
sp = " "
CR = chr(13)
hi_threshold = 15 # Percent
lo_threshold = -15 #
GAIN = 1.7 # Luma adjustment
global y0 = 0
global y1 = 0
global ry = 0
global c0 = 0
global c1 = 0
global rc = 0
global mv_on = false
avisource( "foo.vdr" ).ConvertToYV12()
ov = last # remember the original
# Use ratios for luma change
ScriptClip( last , " y1 = AverageLuma( ) " + CR + \
" ry = (((y1/ y0 )-1)*100) " + CR + \
" y0 = y1 " + CR + \
" mv_on = ( ry <lo_threshold ) ? true : mv_on " + CR + \
" mv_on = ( ry >hi_threshold) ? false : mv_on " + CR + \
" (mv_on) ? Tweak( last , bright = 0 , cont = GAIN ) : last " )
# See what the chroma does
FrameEvaluate( last , " c1 = abs( AverageChromaU( ) + AverageChromaV( ) ) " + CR + \
" rc = ((c1/c0 )-1) *100 " + CR + \
" c0 = c1 " )
ScriptClip( last , "Subtitle( String(ry ) + sp + String(YDifferenceFromPrevious() ) + sp + String( mv_on ) )" )
stackhorizontal( ov, last )
old age, I have decided to put them on DVD via analog capture.
Most of them have an irritating defect wherein the Luma level
appears to change periodically when captured with any device
that has Automatic Gain Control. I would like to investigate the
possibility of adjusting this problem with a software rather than
hardware solution.
I am using an ATI 8500. Its tendency to refuse to capture at all
has been circumvented by modifying an unnecessary DLL. I am
left with how to fix the contrast changes.
I have a solution which is more than 95 % sucessful on a random
movie.
I occurs to me that other people may wish to play with this and
help improve it, purely as an academic exercise.
Here is what I have so far. Comments/Insults welcome.
I'm afraid notepad was the editor
#Avisynth Script
sp = " "
CR = chr(13)
hi_threshold = 15 # Percent
lo_threshold = -15 #
GAIN = 1.7 # Luma adjustment
global y0 = 0
global y1 = 0
global ry = 0
global c0 = 0
global c1 = 0
global rc = 0
global mv_on = false
avisource( "foo.vdr" ).ConvertToYV12()
ov = last # remember the original
# Use ratios for luma change
ScriptClip( last , " y1 = AverageLuma( ) " + CR + \
" ry = (((y1/ y0 )-1)*100) " + CR + \
" y0 = y1 " + CR + \
" mv_on = ( ry <lo_threshold ) ? true : mv_on " + CR + \
" mv_on = ( ry >hi_threshold) ? false : mv_on " + CR + \
" (mv_on) ? Tweak( last , bright = 0 , cont = GAIN ) : last " )
# See what the chroma does
FrameEvaluate( last , " c1 = abs( AverageChromaU( ) + AverageChromaV( ) ) " + CR + \
" rc = ((c1/c0 )-1) *100 " + CR + \
" c0 = c1 " )
ScriptClip( last , "Subtitle( String(ry ) + sp + String(YDifferenceFromPrevious() ) + sp + String( mv_on ) )" )
stackhorizontal( ov, last )