When adding or dropping frames with whatever function, such as Trim, I recall the audio being unaffected, is there any way for the audio to correspond to the edits made with Avisynth?
+ Reply to Thread
Results 1 to 11 of 11
As pdr says, Trim() does affect the audio.
So does Loop().
But DeleteFrame(), DuplicateFrame() and FreezeFrame() leave audio unchanged.
Use EnsureVBRMP3sync() and that will force Avisynth to seek audio from the beginning of the file, rather than calculating the time, which it does incorrectly with VBR audio.
This makes it slower to play if you are jumping around in VirtualDub, but it will be perfectly in sync.
Also use ++ (aligned splice) rather than + (unaligned) to join trims.
E.g., this worked fine for me:
AVISource("S2_3.avi") EnsureVBRMP3Sync() AmplifydB(0.75) LanczosResize(704,576).AddBorders(8,0,8,0) BlankClip(last,75)++Trim(1382,86802) ++Trim(87654,0)
So you can skip through the file and it plays in sync without delay.
FFmpegSource2("S2_3.avi",atrack=-1,fpsnum=-1,fpsden=1) AmplifydB(0.75) LanczosResize(704,576).AddBorders(8,0,8,0) BlankClip(last,75)++Trim(1382,86802) ++Trim(87654,0)
It doesn't make sense for some functions to affect audio
For example, something like dedup is exporting VFR timecodes, so video speeds up in sections that has removed frames. Audio is supposed to be unchanged
If you have some function that removes duplicates and audio, think of the case where you have some frame removed every say, 30 frames. There will be an audio "blip" every time a frame is removed. Think of how you would remove a single audio sample equivalent to 1 video frame duration in an audio editor - it's impossible without a "blip"
Videos shot from my old camera (which I still use) sometimes lag and there is no sound during the lags, so it gets really choppy. It takes forever to remove the duplicate frames by hand.
The blips you speak of are easily remedied with click removal.
Not sure what you're doing this for, but have you considered using filldrops() or related functions? Instead of removing, they use mvtools to synthesize a replacement "inbetween" frame where the duplicates are detected. Audio is unaltered of course
Not sure what I'm doing it for? K listen, the camera lags and a single frame becomes up to 50 like you'd see on a webcam with a dial-up connection. I'm not familiar with filldrops but it wouldn't remedy the audio.
Well, if the audio is going out of sync because of duplicate video frames, look at
You can use "Dup" to detect duplicates, (maybe its log can help to make a script) or try dedup to remove them automatically.