IPB

Welcome Guest ( Log In | Register )

LAME 3.99.5 VBR FAILS at song length, VBR option does not seem to give a valid length
bsperan
post Mar 16 2013, 02:38
Post #1





Group: Members
Posts: 3
Joined: 16-March 13
Member No.: 107243



For years I've been using old software without VBR. Recently, I found myself editing audio and I was excited to use VBR.

After downloading and installing the latest LAME release (3.99.5), I read the documentation and tried to encode some waves.

However, no matter what options I seem to use (and I've tried many different options, including various "MP3 header/stream options"), whatever variable bit rate MP3 I produce gives Winamp a false indication of length. (Specifically, in Winamp v5.601.)

For example, if I encode a .WAV of length 2:16 (2 minutes, 16 seconds), it will produce an MP3 that Winamp identifies as having a length of 7:52.

Now, I realize that I could update my Winamp to a more recent version. However, 1) there are plenty of others out there who use similar outdated decoder software and 2) I am perfectly happy with the Winamp I'm using.

Further, I have never before encountered a problem with a VBR encoded MP3 not displaying the length properly. And I have played a -lot- of different MP3's! This tells me that other people (mostly musicians) are using software to encode their MP3s with VBR in a way that does not confuse my Winamp.

So, please, can somebody tell me what options to use to produce a VBR MP3 that does not confuse older software? Do I need to install an older version of LAME, or what?

At this point, I feel like giving up on LAME or even VBR and going with something else.

This post has been edited by bsperan: Mar 16 2013, 02:42
Go to the top of the page
+Quote Post
 
Start new topic
Replies (1 - 9)
shadowking
post Mar 16 2013, 10:00
Post #2





Group: Members
Posts: 1523
Joined: 31-January 04
Member No.: 11664



Try to force minimum bitrate : eg -V2 -b128 -F

Do you get correct length If you disable tags using -t ?


--------------------
Wavpack -b450x1
Go to the top of the page
+Quote Post
lvqcl
post Mar 16 2013, 10:07
Post #3





Group: Developer
Posts: 3212
Joined: 2-December 07
Member No.: 49183



@bsperan:
How exactly do you encode to MP3? what options, commandline switches etc?

@shadowking:
Maybe the problem is that he does use -t switch?


This post has been edited by lvqcl: Mar 16 2013, 10:09
Go to the top of the page
+Quote Post
[JAZ]
post Mar 16 2013, 10:20
Post #4





Group: Members
Posts: 1710
Joined: 24-June 02
From: Catalunya(Spain)
Member No.: 2383



It's strange. Winamp has supported correct VBR duration since long ago (back to 2.x versions even).

encoding to vbr with lame is as simple as executing:

lame -V2 infile.wav outfile.mp3

( capital V and no space between V and 2, although I believe that recently the space doesn't matter)

Out of winamp whatsnew, I've only seen this entry in 5.61 that might (just might) have something to do with your wrong duration:
* Fixed: [in_mp3] Wrong bitmask for calculating AAC framelength
* Fixed: [in_mp3] Incorrectly reported approximate frames


Another thing that can cause problems is if you are adding album art or something that winamp doesn't recognize in front of the mp3 file ( Winamp understands ID3 V2 and APE tag, so it should still be able to find the correct VBR header)
Go to the top of the page
+Quote Post
o-l-a-v
post Mar 16 2013, 13:40
Post #5





Group: Members
Posts: 117
Joined: 18-July 12
From: Norway
Member No.: 101545



Encode it with TAudioConverter and see if that works: http://sourceforge.net/projects/taudioconverter/
I've never had problems with that GUI and lame smile.gif
Does foobar read correct length?
Go to the top of the page
+Quote Post
bsperan
post Mar 16 2013, 20:33
Post #6





Group: Members
Posts: 3
Joined: 16-March 13
Member No.: 107243



QUOTE (shadowking @ Mar 16 2013, 04:00) *
Try to force minimum bitrate : eg -V2 -b128 -F

Do you get correct length If you disable tags using -t ?

I have tried forcing min bitrate. Though, I've only tried really low values, such as 32.

And I almost always use the -t option.

QUOTE (lvqcl @ Mar 16 2013, 04:07) *
@bsperan:
How exactly do you encode to MP3? what options, commandline switches etc?

Typically, I try something like lame -V5 -t input.wav output.mp3. But I've tried that with various extra options, as well.

QUOTE (lvqcl @ Mar 16 2013, 04:07) *
@shadowking:
Maybe the problem is that he does use -t switch?

That might be. I don't recall weather or not I tried without it.

QUOTE ([JAZ] @ Mar 16 2013, 04:20) *

Out of winamp whatsnew, I've only seen this entry in 5.61 that might (just might) have something to do with your wrong duration:
* Fixed: [in_mp3] Wrong bitmask for calculating AAC framelength
* Fixed: [in_mp3] Incorrectly reported approximate frames

That's very interesting. I just might update Winamp after all.

QUOTE ([JAZ] @ Mar 16 2013, 04:20) *

Another thing that can cause problems is if you are adding album art or something that winamp doesn't recognize in front of the mp3 file ( Winamp understands ID3 V2 and APE tag, so it should still be able to find the correct VBR header)

I don't bother with anything like album art.

QUOTE (o-l-a-v @ Mar 16 2013, 07:40) *
Encode it with TAudioConverter and see if that works: http://sourceforge.net/projects/taudioconverter/
I've never had problems with that GUI and lame smile.gif
Does foobar read correct length?

I'll keep that in mind. However, I had no patience, so I decided to try Audacity 2.0.3 with the LAME 3.99.3 install package. It worked like a charm. biggrin.gif

I'm not sure whether it was the -t switch or what. But I removed LAME 3.99.5 and I don't feel like testing further. I much prefer using Audacity to the command line LAME, anyway. But, one day I might find the need to batch encode a lot of files at once.

BTW: The reason I did not post about this on the Winamp forum is that I became frustrated with their customer support. Specifically, a few years ago I submitted a bug report to their bug report thread. And I was almost completely ignored.

It was a pretty serious bug, too. I reported how adding file info to .ogg (vorbis) damages files. That is, using the "in_vorbis.dll" plugin to edit the tags on a variable bit rate .ogg music file will significantly shrink the file, reduce the bitrate and the music thereafter sounds noticeably worse! (Apparently, the plugin re-encodes the file just to add tag info! blink.gif ) But only one member seemed to show any concern about that...

As a workaround, I had to make sure I kept backups of my music and try to remember not to use Winamp to edit tags on .ogg. Instead, I use WinVorbis for that.

This post has been edited by bsperan: Mar 16 2013, 20:37
Go to the top of the page
+Quote Post
db1989
post Mar 16 2013, 20:43
Post #7





Group: Super Moderator
Posts: 5157
Joined: 23-June 06
Member No.: 32180



QUOTE (bsperan @ Mar 16 2013, 19:33) *
QUOTE (lvqcl @ Mar 16 2013, 04:07) *
@shadowking:
Maybe the problem is that he does use -t switch?

That might be. I don't recall weather or not I tried without it.

[…]

I'm not sure whether it was the -t switch or what. But I removed LAME 3.99.5 and I don't feel like testing further.

So, wait: you don’t want to do something very easy to test whether the issue was caused by something you did, so you’re just going to stop using LAME? What’s the point of others suggesting fixes if you just say you don’t want to try them? People might as well stop trying to help.

As for the stuff about Winamp and Vorbis, firstly, it’s quite off-topic, and anyway: I’m not going to let it continue unless it can be proven by bit-comparison between unmodified and modified files that the data is being altered (as opposed to, for example, padding being removed). In addition, claims about things sounding “noticeably worse” must be backed up by objective testing methods, as stated clearly in our rules.

This post has been edited by db1989: Mar 16 2013, 20:46
Go to the top of the page
+Quote Post
lvqcl
post Mar 16 2013, 20:59
Post #8





Group: Developer
Posts: 3212
Joined: 2-December 07
Member No.: 49183



And maybe -t is not the only suboptimal switch in the command line.
Go to the top of the page
+Quote Post
bsperan
post Mar 17 2013, 06:50
Post #9





Group: Members
Posts: 3
Joined: 16-March 13
Member No.: 107243



QUOTE (db1989 @ Mar 16 2013, 14:43) *
So, wait: you don’t want to do something very easy to test whether the issue was caused by something you did, so you’re just going to stop using LAME? What’s the point of others suggesting fixes if you just say you don’t want to try them?

No offense, but as I explained: In the meanwhile (since I started this thread) I had found something which worked and was more to my liking that the command line LAME.

I had already uninstalled LAME 3.99.5. Further, I could not recreate the experiment perfectly because I don't have the same .WAV samples now. (At this point, I'm not even sure which samples I had been using.)

But just for your sake:

I reinstalled LAME 3.99.5 and tried some WAVs on that and on LAME 3.99.3. I tried several WAVs in each and whenever I used the -t switch, playing the resulting MP3 in Winamp (v5.601) gave an incorrect length:

lame -V5 -t input.wav output.mp3

Though, in my test cases the length was reported as shorter than actual, rather than longer (as was my original problem).

When I tried the same WAVs with the same options, but left out the -t option:

lame -V5 input.wav output.mp3

...the resulting MP3 played find in Winamp with the correct length.

Also, I got the same results using either v3.99.5 or v3.99.3.

So, from my limited testing, it does seem like using the -t option was the culprit.

QUOTE (db1989 @ Mar 16 2013, 14:43) *
People might as well stop trying to help.

I had addressed every reply in this thread. And it's not like I wasn't helped. I learned quite a bit about LAME and Winamp, both. I wasn't aware of those issues with Winamp or that they had been fixed in a more recent version. And while I currently don't plan to use command-line LAME much, it will probably come in hand down the road. (I do take notes about this stuff and keep them with my backups, in case I want to reinstall LAME.)

This post has been edited by bsperan: Mar 17 2013, 07:38
Go to the top of the page
+Quote Post
[JAZ]
post Mar 17 2013, 10:55
Post #10





Group: Members
Posts: 1710
Joined: 24-June 02
From: Catalunya(Spain)
Member No.: 2383



Well, yes... it was the -t option.

The -t option has two meanings:

When encoding with Variable bitrate (this case)
-t Disable VBR informational tag

When decoding to wav
-t Disable writing wav header when using --decode


In any of both cases. Why would you want to use it? Or said it in other words, was it your decision, or you took the settings from someone else's advice?
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 20th April 2014 - 12:55