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?
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 11 of 11
Thread
-
-
-
As pdr says, Trim() does affect the audio.
So does Loop().
But DeleteFrame(), DuplicateFrame() and FreezeFrame() leave audio unchanged. -
AviSynth's various Fade filters also affect audio.
http://avisynth.org/mediawiki/Fade -
If audio doesn't stay in sync, you probably have VBR audio in the video file.
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:
Code: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.
Like this:
Code: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
http://avisynth.org/mediawiki/External_filters#Duplicate_Frame_Detectors
You can use "Dup" to detect duplicates, (maybe its log can help to make a script) or try dedup to remove them automatically.
Similar Threads
-
Intuitive avisynth editing
By Mephesto in forum EditingReplies: 5Last Post: 25th Feb 2012, 09:31 -
Software that export editing operation as avisynth script
By Nykoo in forum EditingReplies: 4Last Post: 3rd May 2009, 13:12 -
Avisynth editing
By jwfc in forum Newbie / General discussionsReplies: 1Last Post: 17th May 2008, 16:52 -
Audio in AviSynth script
By leghorn in forum EditingReplies: 1Last Post: 1st Jul 2007, 04:03 -
Lossless editing of .m2t (MPEG-2 TS) in Avisynth
By Tigon in forum Camcorders (DV/HDV/AVCHD/HD)Replies: 2Last Post: 8th May 2007, 08:23