Log in

View Full Version : brief audio gaps with Trim / UnalignedSplice


brendt
28th February 2012, 00:29
I recorded a rather long video, all in one take, with the idea of using Trim and UnalignedSplice to edit it down to exactly what I wanted. But at the start of every segment (created by Trim), there is a short silence (that appears to be one frame long - it's right at 0.0333333 second) being added. Because there is background noise throughout the video, the contrast of the absolute silence is very obvious.

Actually, it's probably not technically correct to say it's being *added*, as the A/V sync doesn't get thrown off no matter how many segments that I have. More like the first frame in each segment is being muted.

I have tried the "pad_audio" boolean -- both true and false -- in Trim, and I have tried both AlignedSplice and UnalignedSplice -- all to no avail. Given the fact that the issue is at the START of each segment -- I can tell this by looking at an audio editor -- I'm thinking that the culprit is Trim and not Un/AlignedSplice. But does anyone have any idea what's going on, or (more importantly) how to fix it?

poisondeathray
28th February 2012, 00:31
what format is the recording?

what format is the audio?

if you don't know use mediainfo

how are you loading it into avisynth (what source filter) ?

brendt
28th February 2012, 00:46
It definitely is Trim - just occurred to me to try it with a single segment and I get the same problem.

Creating a simple ".avs" file and loading it into VirtualDub. Here's a sample. (Note: as I said before, I've tried "true", "false", and removing that option altogether)

AVISource("C:\Users\Brendt\Videos\problem\SDV_0597_xvid.avi")
Trim(34,259,false)

Here are the formats, according to MediaInfo:

http://csaproductions.com/doom9stash/formats.gif

poisondeathray
28th February 2012, 00:51
Try
EnsureVBRMP3Sync()

http://avisynth.org/mediawiki/EnsureVBRMP3Sync


Or load the videos with ffms2, and use seekmode=0

brendt
28th February 2012, 00:59
Dude, you rock!

EnsureVBRMP3Sync() worked like a charm. Thanks VERY much!

poisondeathray
28th February 2012, 01:01
as a general rule, and in the future, you probably don't want to use VBR audio for recordings - it can cause problems with many programs, not just avisynth

but it's usually fine as a final format (ie. after you've done editing or whatever)

brendt
28th February 2012, 01:04
Duly noted - thanks for the bonus tip! :D

brendt
28th February 2012, 01:11
I was starting with an MP4 and converting it. You will probably not be surprised that when I told the converter to use PCM instead of MP3, the problem doesn't occur, even without the use of EnsureVBRMP3Sync()

Thank you for a very thorough analysis!

StainlessS
28th February 2012, 12:37
I usually find it simplest in that case to select Video-Direct Copy and Audio-Full Process
in VD and save another copy. (loaded direct into VD).