ikarus
1st July 2004, 21:03
well, i spent virtually my whole day on this now.
the issue:
capping tv-series plus rerun (next day) to cut out commercial breaks and following logos/advertisement. somehow those 2 caps don't have the same audio delay, resulting in loss / dooubling ob audio part at the site where i merge those 2 sources togehter.
the problem:
i'm to dumb to code a true avisynth filter
my approach:
play around with existing filters an maybe script an avisynth coustum function.
my idea(s):
i was using the audiograph filter to visualize the audio part (slow, but hell, i don't know any other way to compare audio in avisynth).
the using crop to (almost) only have the graph displayed.
this is done for both videoclips
substracting those clips yields a gray background with some colordots/lines wehre the graph was, the less color, the better the sync (gives good values when compared to the difference of the clips without the audiograph) i got a PSNR value of >32 for a synced clip, whereas already 1 ms desync only gave a value of <29.
just as i wanted to start writing a function, i realized that compare just writes its data on screen or to a logfile. both destinations where ia cannot use the obtained values for further processing directly from a avisynth function.
anyone some tips on this matter?
this is my "try it" part of the script
video1 = trim(18239,18249).crop(0,260,704,56).bilinearresize(704,112)
video2 = delayaudio(0.183).trim(64863,64870).crop(0,260,704,56).bilinearresize(704,112)
video3 = subtract(video1.audiograph(0), video2.audiograph(0))
video4 = subtract(video1,video2)
compare(video3,video4,"","g:\compare.log")
the delayaudio is to adjust the delay (so what!), the resizing was only used to get all values of compare displayed.
for human eye recognition, resampling the audio to 800 Hz gave nice results, but PSNR seems to be the same for 800Hz or 44kHz
so maybe somecould give me a finger (i don't ask for a whole hand) on this.
thanks
ikarus
the issue:
capping tv-series plus rerun (next day) to cut out commercial breaks and following logos/advertisement. somehow those 2 caps don't have the same audio delay, resulting in loss / dooubling ob audio part at the site where i merge those 2 sources togehter.
the problem:
i'm to dumb to code a true avisynth filter
my approach:
play around with existing filters an maybe script an avisynth coustum function.
my idea(s):
i was using the audiograph filter to visualize the audio part (slow, but hell, i don't know any other way to compare audio in avisynth).
the using crop to (almost) only have the graph displayed.
this is done for both videoclips
substracting those clips yields a gray background with some colordots/lines wehre the graph was, the less color, the better the sync (gives good values when compared to the difference of the clips without the audiograph) i got a PSNR value of >32 for a synced clip, whereas already 1 ms desync only gave a value of <29.
just as i wanted to start writing a function, i realized that compare just writes its data on screen or to a logfile. both destinations where ia cannot use the obtained values for further processing directly from a avisynth function.
anyone some tips on this matter?
this is my "try it" part of the script
video1 = trim(18239,18249).crop(0,260,704,56).bilinearresize(704,112)
video2 = delayaudio(0.183).trim(64863,64870).crop(0,260,704,56).bilinearresize(704,112)
video3 = subtract(video1.audiograph(0), video2.audiograph(0))
video4 = subtract(video1,video2)
compare(video3,video4,"","g:\compare.log")
the delayaudio is to adjust the delay (so what!), the resizing was only used to get all values of compare displayed.
for human eye recognition, resampling the audio to 800 Hz gave nice results, but PSNR seems to be the same for 800Hz or 44kHz
so maybe somecould give me a finger (i don't ask for a whole hand) on this.
thanks
ikarus