Hello,
I've download trial versions of the following MPEG-2 encoding softwares: TMPGEnc, Cinema Craft, Procoder and Mainconcept.
The only problem is with a constant delay in sound in the traget file.
I have test file of 2 minutes containing bars and tones which appears for 1 frame (40ms) simultaneously. These bars and tones scattered along the file. The first bars and tones appeares at 00:00:05:00 in the AVI file for 1 frame (till 00:00:05:039 including).
After I've encode it, the MPEG-2 file was synced perfectly regarding the video stream. The bars appeared exactly were they should have - 00:00:05:00 (till 00:00:05:039 including) but the audio was offset 34ms and appeared at 00:00:05:34 (till 00:00:05:073 including). Of course they should have appeared in the exact time and duration like the bars.
I've tried the following:
1. Change the target audio bit rate (192Kbps to 384Kbps Mpeg-1 Layer 2).
2. Change the target sample rate (48Khz to 44.1Khz Mpeg-1 Layer 2).
3. Change the target audio file type (from Mpeg-1 Layer 2 to uncompressed Wav).
4. Change the video bit rate (CBR / VBR etc).
5. Encode only audio with elementary audio (WAV and Mpeg-1 Layer 2).
6. Change the source from QuickTime Uncompressed with PCM Audio to AVI-DV with PCM Audio.
None of those eliminated the problem. The only discovery was: If the source file is in 44.1Khz and I choose to encode it to 44.1Khz as well, the offset reduce to 10ms.
BTW: I've tried to take the original wave to an AC-3 encoder and even there wan an offset (a bit smaller: 18ms)
Do you have any idea how to resolve this problem?
Thanks,
Lior
fellini@netvision.net.il
P.S
The original file is perfectly synced. I've checked it on Final Cut and Premiere (video vs. audio waveform).
+ Reply to Thread
Results 1 to 16 of 16
-
-
I'm not sure why it would go out of sync. Do you have the same problem with other similar files? I'm assuming the file is some sort of AVI? You might want to drop it in Gspot and post a screen shot of that.
If I had that problem with a video file, I would put it into VirtualDub (Mod) and change the audio offset to -34MS and see how that encodes. -
Thanks for your reply.
If I making a file -34ms then encode it to MPEG-1 Layer 2, It's perfectly synced.
Can you please download the following wave file from the attachment and encode in to MPEG-1 Layer 2? It would be great help if someone else would also check it. The wave is a 4 seconds segment containing mostly silence. a single tone appears exactly at 2 seconds from the begining of the file for 40ms. Beyond this point there's a silence again till the end of the file.
Please check the wave file and the encoded MPEG-1 Layer 2 file in audio editor and see if it has shifted in some way. If you don't have audio editor, you can download the following shareware from this link:
http://www.goldwave.com/release.php
Thanks so much for your help.
Lior
P.S
Your can also download the audio test file from here: http://s6.yousendit.com/d.aspx?id=1A...K0XGAI96V4P1E5
4sec_tone_test.zip -
I encoded it to MP2 audio with TMPGEnc Plus 2.5 and it was exactly in sync at 2.0 seconds, the same as the test input. I don't know where your problem is comming from, but it worked fine for me. I used Audacity and compared the original to the MP2 as a separate track. No difference.
-
First, thanks for your time and patience.
I've download the software you've mentioned and got the same result.
I've attchaed the MP2 file from TMPGEnc to this message. If you'll zoom it to the millisecond level, you'll see the shift.
Maybe you could attached your MP2 file as well so I can check your result.
Thanks!
4sec_tone_test_mp2.zip -
TNX. I can see that I can reduce the delay by this feature. Of course I could do that im my audio editor as well. The question is why is there a delay at the begining. I don't like to do things automatically without understanding why. It seems a bit odd that no one have notice that a constant delay of 34ms appears when converting uncompressed audio to MPEG-1 Layer 2 audio (both in elementary and program traget stream).
-
I've made a better test. Took 4 sec AVI - inserted 3 tones an bars for 1 frame each time along the file:
00:00:00:000 - 00:00:00:040 Tone and Bars (40ms length)
00:00:00:040 - 00:00:02:000 Silence
00:00:02:000 - 00:00:02:040 Tone and Bars (40ms length)
00:00:02:040 - 00:00:03:960 Silence
00:00:03:960 - 00:00:04:000 Tone and Bars (40ms length)
I've took the AVI file and put it in CCE / TMPGEnc / MainConcept MPEG Encoder, chose System MPEG-2 with MPEG-1 Layer 2 codec, convert it and opened it. This is what I've got:
00:00:00:000 - 00:00:00:010 Silence
00:00:00:010 - 00:00:00:030 Tone
00:00:00:030 - 00:00:00:034 Silence
00:00:00:034 - 00:00:00:074 Tone
00:00:00:074 - 00:00:02:034 Silence
00:00:02:034 - 00:00:02:074 Tone
00:00:02:074 - 00:00:03:994 Silence
00:00:03:994 - 00:00:04:008 Tone
The video Bars however stayed the same!!!
I don't know where to begin to descibe the abnormality:
1. Everything shifted 34ms forward.
2. The tone from the end of the file appeared 10ms from the begining of the mpeg file but only for 20ms (instead of 40ms).
3. The duration of the new mpeg file has an extra 8ms.
I've attached these 2 files.
You can also download it from here: http://s4.yousendit.com/d.aspx?id=1QXLMLX4HI12G2BNU013VGV4XP
Thanks,
Lior
tests.zip -
I'm seeing a consistent 10 millisecond delay for the audio with TMPGEnc.
I started with your AVI file but only used the first 50 frames. So I had one frame of test pattern with a 40 ms burst of audio followed by 49 black frames and silence. I then duplicated that segment 8 times to create a 16 second AVI file. So the pattern repeats exactly every 2 seconds. Examining this AVI file with TMPGEnc's "Source Range" dialog I could see that every 50th frame had the test pattern and the burst of audio perfectly lined up. All other frames were black and silent.
Encoding that with TMPGEnc 2.521.58.169 and examining the MPEG result showed that the audio was delayed 10 ms over the entire video. -
Well that's because you traget 44.1Khz MPEG-1 Layer 2. If you'll set it to 48Khz you'll get 34ms delay.
Try and tell me if I'm correct. -
On the old days, they use to advice to skip the first couple of seconds of any capture, because the first frames may produce audio delays.
So, we use to capture, load to Virtualdub, cut the first 10 sec or so, frameserve to TMPGenc and encode to whatever...
Why you don't try that? -
As I've explained earlier, I get the video from our post production in M2V video elementary stream. Then I need to attach the audio. I will not re-encode the video again in video encoding software. Therefor I need to take the WAV uncompressed file I've produced, convert it to MPEG-1 Layer 2, then multiplex it with the M2V.
The only solution is to cut the 34ms from the original WAV in order to avoid sync problem. This is a very primitive way to do it, and this is the reason I've emailed to the support department of these encoding softwares.
BTW: They all found the 34ms delay and they have said they will try to solve it.
Lior -
The delay problem seems to be endemic to MPEG audio compressors. I converted with AVIDemux2 and got the same 10 ms audio delay. Using VirtualDub and Lame, I got a ~20 ms delay. Converting just the WAV audio to MP3 with MusicMatch Jukebox and got a ~35 ms delay.
-
Yes. I know it's a 'bug' which appears only when converting to MPEG audio. But unfortunately my hardware MPEG-2 player can only support MPEG-1 Layer 2 Audio (Adtec's Soloist-2).
8)
Similar Threads
-
Why should get a delay when converting H.264/MPEG-4 AVC?
By Leo99 in forum Video ConversionReplies: 31Last Post: 16th Apr 2012, 13:40 -
Delay Video Without Re-encoding
By FrozenInferno in forum EditingReplies: 5Last Post: 23rd Aug 2011, 06:04 -
Convert mkv to mpeg 2 audio delay.
By Mastertreetop in forum Video ConversionReplies: 1Last Post: 4th Jul 2011, 16:04 -
audio delay after encoding, but not after ripping the DVD
By codemaster in forum DVD RippingReplies: 18Last Post: 21st Mar 2011, 16:03 -
Adding audio (wav) to video (avi) (want to delay start of audio)
By Lanton in forum Newbie / General discussionsReplies: 2Last Post: 12th Apr 2010, 12:50