I just found out something I never thought of before. I compressed a wav file with Lame 3.95.1 and opened both files for comparison in Audacity. It looks like the peaks in the MP3 version come about 40-50 milliseconds later. The MP3 is also a little longer than the WAV. Is this true or just some kind of visualization error? What should I do to fix it?
WAV -> MP3 causes lag?
- Jnzk
- Artsy Bastid
- Joined: Tue Jan 28, 2003 5:30 pm
- Location: Finland
WAV -> MP3 causes lag?
More annoying nit-picking from me.
I just found out something I never thought of before. I compressed a wav file with Lame 3.95.1 and opened both files for comparison in Audacity. It looks like the peaks in the MP3 version come about 40-50 milliseconds later. The MP3 is also a little longer than the WAV. Is this true or just some kind of visualization error? What should I do to fix it?
I just found out something I never thought of before. I compressed a wav file with Lame 3.95.1 and opened both files for comparison in Audacity. It looks like the peaks in the MP3 version come about 40-50 milliseconds later. The MP3 is also a little longer than the WAV. Is this true or just some kind of visualization error? What should I do to fix it?
- WilLoW :--)
- Joined: Thu Jun 14, 2001 7:07 am
- Location: Matsudo, Japan
- Contact:
Your problem may come from that, however I thought Lame prevented this problem from occuring...VirtualDub Help file wrote: Some MP3 codecs do not generate MP3 streams at exactly the same rate as specified in their audio format when 44.1KHz sampling rates are used -- this causes a small discrepancy in audio sync of around 0.5%. By default, VirtualDub recomputes the data rate and automatically corrects the audio header when MP3 compression is active. This option allows you to disable correction if it is causing problems, such as an MP3 stream being generated in a format that VirtualDub cannot parse correctly.
- Jnzk
- Artsy Bastid
- Joined: Tue Jan 28, 2003 5:30 pm
- Location: Finland
- Jnzk
- Artsy Bastid
- Joined: Tue Jan 28, 2003 5:30 pm
- Location: Finland
Ok, I analyzed the situation more carefully. The difference between the WAV and the MP3 at a certain point is 2257 samples. The total length of the WAV is 13,262,975 samples while the length of the MP3 is 13,265,280 samples. So the difference in length is 2305 samples or 0.0174%. Thus obviously a few silent samples get inserted to the end too.
Both --preset extreme and --preset insane for Lame give similar results. I tried Lame 3.96, but the differences were exactly the same.
Then I tried to do the compression in VirtualDubMod with Lame ACM 3.92. This time the audio comes a little earlier than in the command line MP3 version, but still later than in the original WAV. Having the "Don't correct MP3 audio streams" option checked or not didn't make any difference.
The difference of about 50 milliseconds is noticeable in the video.
Both --preset extreme and --preset insane for Lame give similar results. I tried Lame 3.96, but the differences were exactly the same.
Then I tried to do the compression in VirtualDubMod with Lame ACM 3.92. This time the audio comes a little earlier than in the command line MP3 version, but still later than in the original WAV. Having the "Don't correct MP3 audio streams" option checked or not didn't make any difference.
The difference of about 50 milliseconds is noticeable in the video.
- The Wired Knight
- Joined: Sun Jan 07, 2001 3:22 pm
- Status: Attorney At Law
- Location: Right next door to you
What program are you running it through? Running the two compartively through premiere it seems the problem for me is that the highly compressed MP3 doesn't like to run as smoothly through premiere wheras the wav runs fine. Or is there a lag in any program you are using?
BANG
Intellectual Property, Real Estate & Probate Attorney.
Intellectual Property, Real Estate & Probate Attorney.
- AbsoluteDestiny
- Joined: Wed Aug 15, 2001 1:56 pm
- Location: Oxford, UK
- Contact:
- Jnzk
- Artsy Bastid
- Joined: Tue Jan 28, 2003 5:30 pm
- Location: Finland
I ripped the wav from a CD with Exact Audio Copy V0.95 prebeta 3 (11 May 2003). I chose Action - Test and copy selected tracks - Uncompressed. I don't know if it makes a difference in this case but I haven't touched the offset correction settings at all.
Then I proceeded to compress the file with Lame 3.95.1 downloaded from Doom9. The command line is "c:\program files\lame 3.95.1\lame.exe" --preset insane c:\cdver.wav c:\mp3-insane.mp3.
Then I proceeded to compress the file with Lame 3.95.1 downloaded from Doom9. The command line is "c:\program files\lame 3.95.1\lame.exe" --preset insane c:\cdver.wav c:\mp3-insane.mp3.
- AbsoluteDestiny
- Joined: Wed Aug 15, 2001 1:56 pm
- Location: Oxford, UK
- Contact:
- WilLoW :--)
- Joined: Thu Jun 14, 2001 7:07 am
- Location: Matsudo, Japan
- Contact:

