VideoHelp Forum




+ Reply to Thread
Results 1 to 16 of 16
  1. 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).
    Quote Quote  
  2. Mod Neophyte redwudz's Avatar
    Join Date
    Sep 2002
    Location
    USA
    Search Comp PM
    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.
    Quote Quote  
  3. 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
    Quote Quote  
  4. Mod Neophyte redwudz's Avatar
    Join Date
    Sep 2002
    Location
    USA
    Search Comp PM
    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.
    Quote Quote  
  5. 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
    Quote Quote  
  6. Member
    Join Date
    Jun 2002
    Location
    Redding, California
    Search Comp PM
    Load the test file in TMPGEnc. Goto Setting/Advanced/Source-range (double click) and enter the value in Audio gap correct.

    Chas
    Quote Quote  
  7. 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).
    Quote Quote  
  8. 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
    Quote Quote  
  9. 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.
    Quote Quote  
  10. 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.
    Quote Quote  
  11. Originally Posted by fellini
    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.
    NO, it's 48 KHz MP2.
    Quote Quote  
  12. OK. Still you got delay. Whay is that? Is it a bug in the codec?
    Quote Quote  
  13. The Old One SatStorm's Avatar
    Join Date
    Aug 2000
    Location
    Hellas (Greece), E.U.
    Search Comp PM
    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?
    Quote Quote  
  14. 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
    Quote Quote  
  15. 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.
    Quote Quote  
  16. 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)
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!