Back Forum Reply New

Audio delay after encoding MPEG-2

.il

Hi!The first bars and tones appeares at 00:00:05:00 in the AVI file for 1 frame (till 00:00:05:039 including).

1) What is the format of the audisotream in this .AVI? If it is .MP3, is it CBR or VBR?

2) Does the .AVI play synchronously?

The AVI contains DV-PAL codec for the Video and Uncompressed PCM 48Khz codec for the Audio. I've also tried Quicktime Uncompressed 10 Bit codec for the Video and Little Endian PCM 48Khz / 44.1Khz.

The problem is not in the file. Take any uncompressed audio (WAVE or AIFF), open it in an audio editor software. See where the first waveform appears along the timeline (make sure the timeline represent milliseconds) and then convert it with MPEG-2 software convertor directly to elementary MPEG-1 Layer 2 audio stream and open the stream with the same audio editor software. You'll see that a positive offset of 34ms will appear.

I think it's native to the codec. I've found some reference in the following link: " target="_blank">faq/layer3.faq

In General it says: Quality, complexity - what about the codec delay?
A: Well, the standard gives some figures of the theoretical minimum delay:  Layer-1: 19 ms (lt;50 ms)  Layer-2: 35 ms (100 ms)  Layer-3: 59 ms (150 ms

The question is if the delay will somehow fix itself when playing it with the hardware player (ADTEC) or should I fix it manualy. Also, If it's native to the codec, why the MPEG softwares don't offer delay fix when convert to MPEG-1 Layer 2?

Hope someone can answer my questions cause it's getting a bit frustrating.... Thanks

The problem is not in the file.

I assume this is in answer to my question of does the source .AVI play sychronously.

I can only tell you that I have had absolutely no synchronization problems converting .AVIs' with PCM audio into compliant NTSC MPEG2 (including MPEG1LayerII audio), using quot;TMPGEncquot; (I continue to use the ancient v.1.2c, because it works!) - most recently, my VirtualDub capture of the seasons' finale of quot;Battlestar Galacticaquot;...

Thanks for your reply. 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:
release.php

Thanks so much for your help.
Lior

P.S
Your can also download the audio test file from here: d.aspx?id=1A...K0XGAI96V4P1E5

I've 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 describe 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 download it from here:
d.aspx?id=1Q...G2BNU013VGV4XP
Thanks,
Lior

Do try locating and using quot;TMPGEncquot; v.1.2c...
¥
Back Forum Reply New