Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: iTunes OSX problems with Lame VBR files (Read 10680 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

iTunes OSX problems with Lame VBR files

Hello,

I am using the Blacktree iTunes LAME plugin, v2.0.8 with LAME 3.96.1 on iTunes 6.0.4 (3) under OSX 10.4.5

When I encode from AIFF to LAME MP3 VBR, the actual duration of the track grows, but the indicated duration does not, resulting in the track being truncated on playback.

This is especially noticeable on long tracks.

eg :  AIFF Track duration = 26:43

LAME MP3 indicated track duration = 26:43,  but real duration = 27:03

On playback of the LAME MP3, the track is sometimes truncated - ie playback stops at 26:43, other times I can persuade iTunes to play it to the end, in which case the count down timer gets to 00:00 as the count up timer gets to 26:43, and the track continues to play until 27:03 (end of audio) with the count up timer continuing on to display up to 27:03 and the count down timer sat at 00:00.

This only appears to happen with VBR, the LAME MP3 seems OK with CBR

- the settings I used were : -V 0 --vbr-new  and  -b 320

This happens with several files I have tried.


Have I missed a setting somewhere ?

Best regards,

Paul.

iTunes OSX problems with Lame VBR files

Reply #1
I've got the feeling you wrote something wrong. It has to be.
An MP3 encoder does not "invent" audio, so I cannot realize how an audio piece that lasts 26:43 can have later 20 seconds more of audio.

I assume that the display shows the correct size (in time), but not the playback time .

Now, about how and why this would happen... VBR mp3s have a "TOC" (list of 100 points to seek to) This means that if you seek, the seeking might not end in the exact second the player wanted. (A decoder could seek correctly, but there are others that don't).
So, if you use chapters or seek in any other way in these VBR files, I could understand that the file doesn't play correctly, gets cut, or shows this incorrect timing.

some tests should be done to see if it's really the player fault, or this "TOC" table is wrong in the MP3. Only the second would be fixable by you.


Edit: removed the quote... I understood something worng.

iTunes OSX problems with Lame VBR files

Reply #2
Hi JAZ,

Many thanks for your reply.

Quote
I assume that the display shows the correct size (in time), but not the playback time .


You're right.

I was checking the end of the audio by dragging the playhead to near the end (eg approx 26 mins in this case) and letting it play to the end. Then either the time counted up to 27:03, or the file stopped at 26:43 (indicated) - but at a point in the audio which was in fact about 20 secs before the end.

I tried playing the VBR file from start to end in iTunes, and it plays correctly. The audio is indeed 26:43 and the counter displays properly.

So this is a fast forward / seek issue.

The same is true on the iPod, when played from start to finish the VBR file is fine, but if fast forward is used, then the end of the audio gets cut and the iPod goes to the next track.

(which is hugely annoying !)


Quote
Now, about how and why this would happen... VBR mp3s have a "TOC" (list of 100 points to seek to)   


Is that LAME VBR MP3s ? or all VBR MP3s ?


Quote
some tests should be done to see if it's really the player fault, or this "TOC" table is wrong in the MP3. Only the second would be fixable by you.


Can you suggest how I could test this ?

But are you saying that if ffwd or rew is used in iTunes or iPod, then VBR MP3 files are not correctly played back ?

Maybe I'd be better off with CBR !

Thanks for your help.

Best regards,

Paul.

iTunes OSX problems with Lame VBR files

Reply #3
Quote
Is that LAME VBR MP3s ? or all VBR MP3s ?


For all MP3's, although frauhoffer VBR encodings have a different header with the same concept.

Quote
Can you suggest how I could test this ?


CBR is on the safe side, because the seek can be done directly ( the bytes per second are constant).

I would like you to try to encode the file using the commanline LAME encoder. This would be typing in a console,  lame --preset standard yourfile.wav and see if it is giving the same problem.
If it does, probably it's the decoder fault (not knowing or not caring how to accurately seek a VBR mp3 file).

iTunes OSX problems with Lame VBR files

Reply #4
I have found this to be an issue for me as well. I use iTunes 6.0.4 on Windows 2000 and WinXP, and have 2 iPods. While I normally use AAC encoding for direct-from-CD rips, I use LAME sometimes depending upon circumstances.

LAME VBR MP3s - using any quality level, it does not seem to matter - will truncate early and randomly. It appears that iTunes/iPod is confused about the issue, as other players (FB2K, Winamp) do not exhibit the problem.

When I say random, I mean that one can encode the same file several times and get slightly different results.

The problem appears to be always present, but on shorter material (typical 3 - 4 minute songs) it is generally not noticeable. But on long tracks (20 minutes and up) the errors accumulate and become evident. You can observe this result either by fast-forwarding or just playing the entire file.

It appears that iTunes is incorrectly calculating play time. It will report the overall time correctly, but towards the end of the file it incorrectly figures that more time has elapsed than is really the case. When it reaches the value that it thinks is "the end", it stops. It thus seems that iTunes is actually counting time a bit too fast!

The exact same files encoded CBR MP3 or AAC will work fine. Also, if one transcodes the offending VBR MP3 to AAC, it works fine.

This issue seems to be one of iTunes simply doing some incorrect calculations, which become inherited by the iPod. This conclusion is supported by the correct playback seen in FB2K and Winamp. Fortunately for me, the great majority of my library is AAC, and I have re-encoded all long songs with AAC to eliminate the issue.

iTunes OSX problems with Lame VBR files

Reply #5
Doesn't Apple have a bug reporting system related to iTunes?

iTunes OSX problems with Lame VBR files

Reply #6
Hi JAZ,

Quote
I would like you to try to encode the file using the commanline LAME encoder. This would be typing in a console,   lame --preset standard yourfile.wav and see if it is giving the same problem.

OK I'll give that a try.


Hi BradPDX,

I have tried AAC VBR (target 256K) today, and that seems to work just fine.

No timing discrepancies, (regardless of how much I abuse FFwd and Rew!), and no truncation problems, both in iTunes and iPod.

best regards,

Paul.

iTunes OSX problems with Lame VBR files

Reply #7
Hi JAZ,

Quote
,Mar 19 2006, 04:15 AM]
I would like you to try to encode the file using the commanline LAME encoder. This would be typing in a console,   lame --preset standard yourfile.wav and see if it is giving the same problem.


I couldn't get that to work at all. "lame: command not found".

However, out of curiosity, I did try using the iTunes (native) MP3 VBR, and that works OK, with FFwd and Rew.

Summary : (playback with iTunes)

iTunes MP3 VBR = OK
iTunes AAC VBR = OK
iTunes LAME CBR = OK

iTunes LAME VBR = not OK - truncation problem.

So, for my purposes, (which include 30min and 60min tracks - which I need to be able to FFwd and Rew through on the iPod - without "losing" the last ~20 secs), it's a pretty compelling reason to go with AAC VBR.

Best regards,

Paul.

iTunes OSX problems with Lame VBR files

Reply #8
I have the same problem.

NO VBR MP3s ENCODED WITH LAME WILL WORK WITH ITUNES.
They ALWAYS truncate.

Is this LAME's fault?  No, because other players will play the MP3 with no truncation.

Is this iTunes fault?  Most likely, but there are other factors to be involved (LAME compatability with iTunes, certain frames being missed/skipped, etc.) -- who knows?

iTunes is used by most people with MP3 players as the iPod has the large majority of the market share.  For people using iTunes and/or an iPod, there is just no reason to use LAME VBR settings.  Using LAME CBR settings is a complete waste of space.  Using iTunes VBR setting produces MP3s with no truncation, but with questionable quality (HA Wiki proves that LAME sounds better than the iTunes encoder).

VbrFix seems to be a program that "iTunes-afies" messed up LAME VBR MP3s so that they will work with iTunes  (no truncation).  This is not for Mac OS X and has had quesitonable results.  Anyone care to comment on VBRfix of encoding solution for Mac OS X?

As I have standard hearing, -V4/-V3 is good enough for me.  I can't tell between iTunes and LAME encoder, so I am using 160ish VBR with the iTunes built-in encoder.  However, I am really displeased with the situation!  I use encoded audio on nice speakers to play Jazz and Lounge music at ritzy places (DJ), and I know that there are perceiveable differences according to bit rate and ENCODER.  I would like be using -V2 or -V1 with LAME 3.97b2, but I cannot justify its use if the last 5 seconds of every song is cut off!  I wonder what happens when I burn the truncated MP3 to CD...

Please reply with any information.

iTunes OSX problems with Lame VBR files

Reply #9
i'm encoding with lame 3.97b2 and -V2 and I iTunes doesn't cut off any songs (unless of course you are using the fading option)
--alt-presets are there for a reason! These other switches DO NOT work better than it, trust me on this.
LAME + Joint Stereo doesn't destroy 'Stereo'

iTunes OSX problems with Lame VBR files

Reply #10
For those encountering problems with Lame VBR and iTunes, could you please test those files with QuickTime?

iTunes OSX problems with Lame VBR files

Reply #11
For those encountering problems with Lame VBR and iTunes, could you please test those files with QuickTime?
We just did a similar thread here: http://www.hydrogenaudio.org/forums/index....showtopic=45684

In the repro I did (later in the thread), it only happens in iTunes.  Quicktime plays it fine.  (Another person also confirmed.)

iTunes OSX problems with Lame VBR files

Reply #12
Ok, I'm back with more information.

Quesiton: Can you encode your music to MP3 using the LAME encoder and still have it work in iTunes?
Answer: NO.

At least on the Mac OS X platform, there are no encoders which will work.

CD Stack, iTunesLame, LameBrain, Max, and NMP3 Ripper do not work.
Lame versions 3.95, 3.96, and 3.97b2 have been tested.  None work.
Your songs will always be truncated no matter what encoder you use, no matter if you use 3.96 or 3.97b2, and no matter what bit rate or setting you specify (as long as it is VBR).  Every song will be truncated.

Conclusion: If you use iTunes and/or an iPod, you cannot use LAME or any encoder utilising LAME to encode VBR mp3s properly.  CBR will work fine, but ALL VBR MP3s will have truncation problem.  This is a problem with iTunes (specifically header information).

Until there is a fix (either from Apple or 3rd party), that seems to be it!

iTunes OSX problems with Lame VBR files

Reply #13
Perhaps the thread could be retitled something like "itunes osx problem re Lame VBR" since the way it is now implies it's a problem with Lame.

iTunes OSX problems with Lame VBR files

Reply #14
I have zero problems playing MP3s in iTunes 6.0.4 on Mac OS X, with the MP3s encoded by Blacktree's iTunes-LAME plug-in (v2.0.8) using LAME v3.97b2 and V2 --vbr-new. All songs were encoded from Apple Lossless files.

I used to have a similar problem as the original poster when I used the same iTunes-LAME plug-in with iTunes 4.x and LAME v3.96.1 (--alt-preset standard). But I never had a truncation problem. What actually would happen was, for very long songs (10:00+), iTunes would play on for many seconds of silence past the song's running time. I never figured out how to fix it. But so far with iTunes 5+ and LAME 3.97 I haven't had any problems.

So, to the OP, I would suggest upgrading to LAME 3.97.

iTunes OSX problems with Lame VBR files

Reply #15
This is an iTunes problem, not a LAME problem, and has been there for some time. Basically when you seek with iTunes, the calculated current time is inaccurate compared to the actual position, so sometimes the decoder will think it's ahead (truncation), and sometimes behind (elongation). To see this, take a VBR track and seek randomly a few times to a location near the end, then watch the elapsed time and total time counters. Once the [incorrect] elapsed time reaches the total time, the song stops even though the song has not yet actually finished. For longer tracks, this discrepancy seems to be much greater.

iTunes OSX problems with Lame VBR files

Reply #16
This is an iTunes problem, not a LAME problem, and has been there for some time. Basically when you seek with iTunes, the calculated current time is inaccurate compared to the actual position, so sometimes the decoder will think it's ahead (truncation), and sometimes behind (elongation). To see this, take a VBR track and seek randomly a few times to a location near the end, then watch the elapsed time and total time counters. Once the [incorrect] elapsed time reaches the total time, the song stops even though the song has not yet actually finished. For longer tracks, this discrepancy seems to be much greater.


The issue in this thread though, as I understand it, doesn't have to do with scrubbing. Scrubbing VBR files has always been a problem in iTunes, even with the VBR files that iTunes encodes itself. This problem has to do with playing a track straight through and iTunes either truncating or playing extra seconds of silence at the end of the track.

As I said, I used to have the extra silence problem with LAME 3.96.1, using the iTunes-LAME plug-in and iTunes 4.x. The problem seems to have somehow resolved itself now that I am using LAME 3.97b2 and iTunes 6 (worked fine in iTunes 5, too).

If this is somehow a tag or header problem, you might try converting the ID3 tags in iTunes, which should force iTunes to rewrite the ID3 tags itself.

iTunes OSX problems with Lame VBR files

Reply #17
It might have something to do with ripping from CD versus ripping from Apple Lossless... ?
Someone told me that the problem would be due to header information, and that it could be corrected somehow.  Any ideas?

I will re-rip 5 CDs using "iTunes-Lame 2.0.8" & play them in iTunes 6.0.4 (3).

Many of the songs I am ripping will be over 10 minutes, so I should be able easily see whether the problem exists or not.  I really do hope this problem has been resolved as MANY people use iTunes and iPods, as well as (hopefully) VBR LAME MP3.

I don't believe in being lucky, but I do believe in hardware issues!  Many people report this problem, yet some people report no problems at all using the same software and procedures.  Surely, the same process should lead to the same result.  As the results are often reproducable, I will try to reproduce them in a more thorough manner.  Apple, is of course, completely unwilling to respond or help.

Any ideas on how to fix header information or what any other problems may be?

iTunes OSX problems with Lame VBR files

Reply #18
Many users over at ilounge are reporting the same problems.  I have not encountered this on my desktop, my notebook, my iPod, nor on my desktop at work, they all play my Lame vbr mp3's (-V 2) just fine.  I used EAC and the Lame.exe program but still.

I did find two problem samples just on my notebook, these songs are 30 minutes long.  My notebook (ie iTunes running on my notebook) will play the songs just fine if I play them from beginning to end.  I find that I have problems when I fast foreward or rewind.

The problems with these 2 tracks (out of approximately 5500 tracks) dissapear when I transcode them (and re-rip the original lossless source) to iTunes AAC (CBR, VBR), Nero AAC (2-pass, VBR, CBR), iTunes mp3 (both CBR and VBR), Lame CBR, and Helix mp3 (Real Player both CBR and VBR).

Most people at ilounge are having problems with long tracks that have large periods of silence or podcasts encoded with Lame at VBR.

iPods should playback long Lame VBR mp3's just fine though.  The same users at ilounge are also reporting that their iPods play them back OK.  If your iPod is having trouble, then you should restore it with the latest iPod updater software (*Warning, restoring an iPod erases absolutely everything on it so make sure your music and other data files are backed up).