Log in

View Full Version : AVS tool for detecting audio gaps?


fvisagie
27th August 2009, 13:53
Hi All,

My rendered DV AVI contains annoying 1-frame audio gaps on clip boundaries here and there, caused by the editor. Currently I'm stepping through the movie looking for these and fixing them up.

Without going into the details, for this particular project analysing either DATECODEs or timecodes isn't a failsafe way of detecting clip boundaries. I'm using video-based scene detection to help get to clip boundaries quicker, and then I look for gaps in the audio waveform there.

However, it occurred to me that the primary objective being identifying audio gaps, perhaps there's some tool that could do that directly. I've had a look at the filter listings but saw nothing that directly fitted the bill. MinMaxAudio looks useful, but using that I'd have to devise and script my own algorithm for thresholds and so on (some frames aren't completely silent; they might contain very few samples at the beginning and/or end).

Do you know of any AVS-based tool that can identify audio gaps? If need be I can create an elementary audio stream from the video.

Many thanks,
Francois

fvisagie
28th August 2009, 15:51
In case there's another lost soul looking for a solution to this problem like me, I ended up with an alternative approach which in hindsight I much prefer. It works for timecoded DV video files. (The footage without timecodes in this project I just did manually).

Here are the steps:

1. Use the Avisynth-based utility at http://forum.doom9.org/showthread.php?p=1317470#post1317470 to generate an ASS subtitle format scene file for your video
2. In Aegisub, open the subtitle scene file, open the video and click the toggle button to enable auto-scroll of video, open its audio and set the waveform display to amplitude (i.e. not spectrum mode)
3. In VirtualDub, open the subtitle scene file (with VSFilter's TextSub - http://sourceforge.net/projects/guliverkli2/files), open the video and turn on audio waveform display. The subtitles and audio waveform aren't necessary here but simplify accurate navigation and cross-referencing.
4. In Aegisub, step through the scenes by moving from subtitle to subtitle, and at each check the audio waveform for any gap
5. For any gaps you identify, in VirtualDub navigate to the same frame and delete it :)

That's it, enjoy!

Kind regards,
Francois