Log in

View Full Version : Still another a/v sync question (solved)


jahlah
28th July 2005, 17:01
Hello Doomers9,

this is my very first post on this forum and i will try not to be very stupid.
I've been dealing with digital video for some years, but only recently i moved to DVD/mpeg2 format.
I've been reading and doing a lot of searching, but so far the a/v sync issues I found are very specific to .avi format, corrupted files, or improper dvd ripping.
What i am trying to do is to compile some DivX avi's spread out on some CD's to a DVD with menu, subtitles etc.
The problem is the same. Every time I try to convert an AVI to MPEG2 with TMPEGEnc there are a/v sync mismatches from the middle to the end of the encoded file.
I tried to cut the avi in smaller clips with VDub, then reencode. It doesn´t work.
I tried to rip the WAV with Vdub, then resampling it with SForge to 48kHz, then encode with TMPEGEnc. It doesn't work too.
I tried to convert the wav to mp2 with SForge, the avi with no audio to MPEG2 (NTSC) with TMPEGEnc, checked out their lenghts, then mux the two sreams togheter with MPEG Tools of TMPEGEnc. Doesn't work either.
There seems to be a pattern while using TMPEGEnc; either video is stretched up or audio is stretched down in the proccess;
I've never went into this problem when encoding MPEG1 files to VCD with TMPEGEnc.
With avi's files, Virtual dub is very friendly at adjusting delays and checking it prior to encoding.
The funny thing is that, when i try to use TMPEGEnc Xpress to encode the separate streams of a/v, even though they have the same lenght, sometimes Xpress shows they have different leghts.
I am running out of ideas. Besides, MPEG2 is very time -consuming and it takes a lot of time to test an idea.
VDubMod does a great job in previewing encoding, but i can't actually perform multiplexing or encoding of mpeg2 files with it - or am I missing something ?
The question is - are there any other way to encode/multiplex mpeg2 streams other (and better) than TMPEGEnc ?
And i tried DVDLabPro too to generate VOB's with subtitles. Same issues, the VOB files shows progressive audio delay. Needles to say, the original avi's are perfectly in-sync.
Thank you all for this great forum

Cogar
28th July 2005, 19:56
My first guess is that some parameter may not be set up correctly. (I am not saying that is the case, but it is something that needs checking since most others do not encounter this problem.) You might want to go through any guides you can find for TMPGEnc, TSUNAMI MPEG Video Encoder XPress, etc. for ideas.

If that looks OK, there is a way to manually fix sync problems, as explained here:
http://www.rita.lt/video_tools/fix%20gradual%20loss%20of%20sync%20once%20and%20for%20all.html

Guest
28th July 2005, 19:56
Welcome to the forum!

Are you trying to make NTSC or PAL DVDs? What is the frame rate of the AVIs? What are your TMPGEnc settings?

jahlah
28th July 2005, 20:55
Sorry.
Video: MPEG-2 NTSC, 29.970fps, 720x480, CQ, closed GOP's, default matrix, no tweaks.
Audio: MPEG-1 layer 2, 48.000Hz, 384kbps.
Actually i am stuck with this issue and left the dvd project apart until I am able to convert an avi (DivX, i mean) to mpeg2 properly.
Interestingly enough, the first segment of the avi (after i decided to cut it in pieces in an attempt to reduce the audio delay) did it well, and it is a 20 min long.
The problem arises from the second clip on.
I cut the big avi using VirtualDub.
Also, I notice that i took no advantage from this procedure. The audio delay at the end of the big avi after converted to MPEG-2 seems to be of the same magnitude of the audio delay at the end of the small converted clips. It is not increasing with time lenght. :confused:

jahlah
28th July 2005, 21:35
If that looks OK, there is a way to manually fix sync problems, as explained here:
http://www.rita.lt/video_tools/fix%20gradual%20loss%20of%20sync%20once%20and%20for%20all.html

In fact, Cogar, this avi comes captured from a VHS tape, so this might well be the case (uncorrect audio capture sampling rate). This also would explain why the first part of the avi worked out ok. Anyway is quite a different approach of everything I was trying to do, and I will give it a try ASAP.
Thanx for the clue :thanks:

Cogar
28th July 2005, 22:10
I hope it helps. Incidentally, out of curiosity, what video capture program did you use? If you use VirtualVCR, it has the capability of resampling the audio stream dynamically during capture and (theoretically at least) avoiding audio synch problems.

jahlah
28th July 2005, 23:01
For this capture i remember using VirtualDub, but i'm not sure what version.
Nowadays I use VirtualVCR or iuVCR, both of which performs capture far better than VDub.

jahlah
29th July 2005, 02:19
Ok, thanks to Cogar and ACID Agent, a little tweaking with sound forge and time stretching fixed things up. I am convinced now that my problem may be due to capture sampling rates, although I could not understand why it does not happen to show up on the avi files. Maybe it has to do with the different sampling rates of the avi and mp2 audio streams. Anyway, I was not able to do it the way ACID Agent did, tweaking with resampling. I'd rather succeeded with time stretching. Maybe I did not understood completely the procedure of resampling, then saving at the original sample rate (it is like doing and undoing something, isn't it ?).
Anyway, thank you guys for the lending hand. :thanks: :thanks:

p.s. actually I later figured out ACID Agent method; I was doing it wrong. Indeed is a more precise way of doing than stretching. Only one have to read it carefully: http://www.rita.lt/video_tools/fix%20gradual%20loss%20of%20sync%20once%20and%20for%20all.html

niann
29th July 2005, 15:24
Glad to see you got your problem solved, and thank you much for explaining what you did to fix it. Welcome to the forum and Cheers!

:helpful: