Welcome Guest ( Log In | Register )


Important

The forums will be closing permanently the weekend of March 15th. Please see the notice in the announcements forum for details.

 
Append Avis And Sound Sync Issues
« Next Oldest | Next Newest » Track this topic | Email this topic | Print this topic
Oba
Posted: Nov 26 2014, 09:06 AM


Member


Group: Members
Posts: 13
Member No.: 38447
Joined: 26-November 14



Im trying to create a video by selecting parts from dvds, with the 'hope' to append them to 1 file. The video parts as stand alones work fine once encoded, and audio is in sync, but when i join them all, somewhere alone the line desync kicks in.

I use DVDShrink to cut the dvd piece in Re-author mode, DGIndex to create the .d2v file and a simple Avisynth script to perform Trim, Normalization and Dub video with audio. My simple script is as follows:

LoadPlugin("C:\Path to plugin\DGDecode.dll")
Video = Mpeg2Source("C:\Path to D2V\VTS_01_1.d2v")
Audio = WavSource("Path to WAV\VTS_01_1 Ta0 48K 16bit 2ch.wav")
Audio = Normalize(audio, 0.98)
Video = AudioDub(Video, Audio).EnsureVBRMP3Sync().Trim(1,0,false)
video = FadeOut(video,10)
Return video


I tried adjusting the frame rate in vdub,because each individual file gets reported with different framerates under Gspot, but where it solves sync issues for 1 instance, it creates desync somewhere else, as video progresses.

In the Video Frame control tab I keep 29.970 for all, hense i can append them in the end. If i select "Change so video and audio durations match", then appending them isn't possible because of different frame rates.

For encoding the avi file, I use Xvid and LameMP3.

I assume that there is an issue either with the length of audio, or that it is frame rate related.

Any input or help appreciated

Thanks

 
     Top
dloneranger
Posted: Nov 26 2014, 01:58 PM


Moderator


Group: Moderators
Posts: 2366
Member No.: 22158
Joined: 26-September 07



Try using an avisynth script to join the part instead, it can fill in the end gaps with blanks audio
http://avisynth.nl/index.php/Splice



--------------------
MultiAdjust JoinWav WavNormalize FFMPeg Input Plugin v1827 UnSharpMask
Windows7/8 Codec Chooser
All FccHandlers Stuff inc. Installers for acm codecs AAC, AC3, LameMp3
 
    Top
Oba
Posted: Nov 26 2014, 02:57 PM


Member


Group: Members
Posts: 13
Member No.: 38447
Joined: 26-November 14



It seems that it is audio related, as I append the files one after the other, the audio stream seems to push the next one a bit further, resulting in desync , so i need a way to normalize the audio stream length to video length. I actually joined the videos without sound , then joined the audio together and mux the whole thing, there it became evident
 
     Top
dloneranger
Posted: Nov 26 2014, 03:20 PM


Moderator


Group: Moderators
Posts: 2366
Member No.: 22158
Joined: 26-September 07



Did you read the link, joining the parts and keeping them in sync is what it does?

--------------------
MultiAdjust JoinWav WavNormalize FFMPeg Input Plugin v1827 UnSharpMask
Windows7/8 Codec Chooser
All FccHandlers Stuff inc. Installers for acm codecs AAC, AC3, LameMp3
 
    Top
Oba
Posted: Nov 26 2014, 03:23 PM


Member


Group: Members
Posts: 13
Member No.: 38447
Joined: 26-November 14



Yes I did, and I will try it, but Im afraid there are no gaps.

Thanks
 
     Top
dloneranger
Posted: Nov 26 2014, 03:28 PM


Moderator


Group: Moderators
Posts: 2366
Member No.: 22158
Joined: 26-September 07



QUOTE
AlignedSplice cuts off the first sound track or inserts silence as necessary to ensure that the second sound track remains synchronized with the video


Alternately, you could just rip the entire thing so the sound is ok all the way through and then just edit it afterwards

--------------------
MultiAdjust JoinWav WavNormalize FFMPeg Input Plugin v1827 UnSharpMask
Windows7/8 Codec Chooser
All FccHandlers Stuff inc. Installers for acm codecs AAC, AC3, LameMp3
 
    Top
Oba
Posted: Nov 26 2014, 03:38 PM


Member


Group: Members
Posts: 13
Member No.: 38447
Joined: 26-November 14



hopefully the splice will work, now i have to figure a way to equalize the frame rates, 1st video is 29.970002 and second is 29.970004...... go figure
 
     Top
Oba
Posted: Nov 26 2014, 03:49 PM


Member


Group: Members
Posts: 13
Member No.: 38447
Joined: 26-November 14



Worked like a charm, thanks a bunch!
 
     Top
dloneranger
Posted: Nov 26 2014, 03:52 PM


Moderator


Group: Moderators
Posts: 2366
Member No.: 22158
Joined: 26-September 07



Avisynth again
http://avisynth.org.ru/docs/english/corefi...filters/fps.htm
With that small a difference i'd just use assumefps on each clip so they're the same and then aligned splice them

--------------------
MultiAdjust JoinWav WavNormalize FFMPeg Input Plugin v1827 UnSharpMask
Windows7/8 Codec Chooser
All FccHandlers Stuff inc. Installers for acm codecs AAC, AC3, LameMp3
 
    Top
Oba
Posted: Nov 26 2014, 05:14 PM


Member


Group: Members
Posts: 13
Member No.: 38447
Joined: 26-November 14



well I used those functions but to no good results. So instead of appending every individual file 1 by 1 and having to deal with all the issues that arisen, I just processed them all together with the ++ operator. Result is 0 desync, every segment fades out and in properly, trim function didnt cause any desync as well, there is only a small gap in the sound when segments 2 and 3 connect, and thats probably because the audio stream was lengthier and ++ took care of it. Overall, job was very well done

laugh.gif
 
     Top
Oba
Posted: Nov 27 2014, 07:20 AM


Member


Group: Members
Posts: 13
Member No.: 38447
Joined: 26-November 14



Seems like there is another interesting workaround to this. Instead of using the ++ operator and encode all parts at once, you can process each part separately and make sure avi sticks to sync by adding Trim(0,0) to the return video argument. So, in my script:

Video = Mpeg2Source("PATH TO FILE\VTS_01_1.d2v").Trim(0,2080,false) #"normal trim"#
Audio = WavSource("PATH TO FILE\VTS_01_1 Ta0 48K 16bit 2ch.wav")
Audio = Normalize(audio, 0.98)
Video = AudioDub(Video, Audio)
Return video.Trim(0,0)

For some reason Trim(0,0) does more or less what ++ does to the file, equalizing the length of vid and aud.

Ok, thats it

o/

 
     Top
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
10 replies since Nov 26 2014, 09:06 AM Track this topic | Email this topic | Print this topic

<< Back to Newbie Questions