odd results merging mp3 files

Discussion forum for Amadeus users

Moderator: Martin Hairer

Post Reply
mmodrall
Posts: 12
Joined: Sat Mar 17, 2007 5:33 pm

odd results merging mp3 files

Post by mmodrall »

Hi...

I recently downloaded an audiobook from eMusic.com, and it came in 175 mp3 tracks (64kpbs stereo, Lame 3.96). Using AP I trimmed out a lot of the annoying swelling music between tracks. Had to edit 76 of the 175 when all was said and done.

Then I used cat to put them together. I've done it when ripping a number of other audio books, but this time when I put the tracks together into chapters, the resulting files are flipping out things trying to read them.

If I start a chapter playing and let it run, it has long blank patches and is garbled. If I use the slider in iTunes to get to the middle, it just jumps to the next track. If I try to load the chapter in AP, AP hangs.

As I say, I've used the same basic procedure to do other audio books and I'm scratching my head as to why this one is different. AP makes a different creator type (MP3 Document) than the original files (MP3 Audio). The last book I ripped in that worked, lame produced types of MP3 Audio File. Don't know if that might play a part.

I'd seen something a little like this when I cat'ted VBR mp3s together but the original files don't say anything about being VBR.

Anyone run into something like this?

Thanks
Mark

robert_theory
Posts: 35
Joined: Wed Nov 29, 2006 6:31 pm

odd results merging mp3 files

Post by robert_theory »

Then I used cat to put them together. I've done it when ripping a
number of other audio books, but this time when I put the tracks
together into chapters, the resulting files are flipping out things
trying to read them.
There's no reason why doing that should work. You got lucky and had an
MP3 player that was willing to play the resulting invalid MP3
file. But enough invalidity, and no player is going to play it.

You should use an MP3 editor to do this if you want to avoid an
uncompress/recompress cycle. I don't know of one that will do it.

Who knows what kind of album cover art, headers, ID3 tags, etc. you
are trying to decode as if it were audio data? It could be anything,
just about.

You can't cat MP3 files together and get anything except a bigger
file.

-- Robert
_______________________________________________
Amadeus forum mailing list
Unsubscribe / change settings at http://two.pairlist.net/mailman/listinfo/forum_list

mmodrall
Posts: 12
Joined: Sat Mar 17, 2007 5:33 pm

Post by mmodrall »

There's no reason why doing that should work. You got lucky and had an
MP3 player that was willing to play the resulting invalid MP3
file. But enough invalidity, and no player is going to play it.
Actually, I found a couple of MP3 forums that stated MP3 was designed so that could work. They said that the file format was one of self-contained, independent frames so that a stream could be picked up at any point without requiring previous frames. Same forums said that id3 tags would/should just be ignored, but to be safe I've got some utilities that strip id3 tags before I cat.

On windows, there's a program called mp3merge, but there isn't a mac port of that, and people said it must essentially be doing what cat does.

I've converted several audio books using this technique and only ran into problems with vbr files before.

I thought of trying to use AP's join file feature, but then I have the uncompress/re-compress issue you referred to.

User avatar
Martin Hairer
Site Admin
Posts: 1975
Joined: Wed Nov 08, 2006 11:49 am
Contact:

odd results merging mp3 files

Post by Martin Hairer »

They said that the file format was one of self-contained,
independent frames so that a stream could be picked up at any point
without requiring previous frames.
This is true, *BUT* (and this is a big but), this concerns only the
"raw" Mp3 datastream, and does not not concern all the metadata
(title, album, artirst, artwork, etc). So if you save your Mp3 files
without id3 tags you should be fine. Having a tag in the first file
should be fine, but having one in the subsequent files can cause
trouble. Regards,

Martin

HairerSoft
http://www.hairersoft.com/


_______________________________________________
Amadeus forum mailing list
Unsubscribe / change settings at http://two.pairlist.net/mailman/listinfo/forum_list

mmodrall
Posts: 12
Joined: Sat Mar 17, 2007 5:33 pm

Post by mmodrall »

Hi Martin...

The first time I threw them together, I left the id3 tags in - and had all the problems. So the 2nd time I threw them together I used id3convert to strip all the tags, but I still had the playback issues with the resulting mp3.

Then I tried to load it in AP. AP said it would take one second to load and then hung for a few minutes without displaying anything.

I'll try the Join Files approach tonight, but I was just curious if people had seen this kind of odd behavior before.

As a quick aside, VBR seems like it might also complicate things. Does the bit rate get stored in the frame header (allowing each frame to say how it should be read), or is there a "I'm VBR" flag stored in the file header somewhere?

I've encountered something a little like this when cat-ing vbr files, but these files don't show up as vbr in the info about them.

Thanks

User avatar
Martin Hairer
Site Admin
Posts: 1975
Joined: Wed Nov 08, 2006 11:49 am
Contact:

odd results merging mp3 files

Post by Martin Hairer »

As a quick aside, VBR seems like it might also complicate things.
Does the bit rate get stored in the frame header (allowing each
frame to say how it should be read), or is there a "I'm VBR" flag
stored in the file header somewhere?
I *think* that there's a "I'm VBR" flag somewhere and that furthermore
each frame has its rate stored in the frame header. However, I am not
an expert on that... Regards,

Martin

HairerSoft
http://www.hairersoft.com/


_______________________________________________
Amadeus forum mailing list
Unsubscribe / change settings at http://two.pairlist.net/mailman/listinfo/forum_list

robert_theory
Posts: 35
Joined: Wed Nov 29, 2006 6:31 pm

odd results merging mp3 files

Post by robert_theory »

There's no reason why doing that should work. You got lucky and had an
MP3 player that was willing to play the resulting invalid MP3
file. But enough invalidity, and no player is going to play it.
Actually, I found a couple of MP3 forums that stated MP3 was designed
so that could work. They said that the file format was one of
self-contained, independent frames so that a stream could be picked up
at any point without requiring previous frames.
It is mostly true that decoding a frame doesn't require decoding any
previous frames.
Same forums said that
id3 tags would/should just be ignored, but to be safe I've got some
utilities that strip id3 tags before I cat.
Then it should stand a high chance of "working," meaning that it might
not produce a valid MP3 file, but most players should play
it, assuming the tag-stripping utility really gets rid of *everything*
except the audio frame data.

Unfortunately you (or someone) would have to look into the files to
see what's actually going wrong.

-- Robert
_______________________________________________
Amadeus forum mailing list
Unsubscribe / change settings at http://two.pairlist.net/mailman/listinfo/forum_list

robert_theory
Posts: 35
Joined: Wed Nov 29, 2006 6:31 pm

odd results merging mp3 files

Post by robert_theory »

As a quick aside, VBR seems like it might also complicate things.
Does the bit rate get stored in the frame header (allowing each
frame to say how it should be read), or is there a "I'm VBR" flag
stored in the file header somewhere?
Decoders vary in their ability to deal with MP3 VBR, although most are
good by now. Last time I worked with these details was long ago so my
memory is kind of foggy, but as far as I know there is no flag
indicating VBR, except potentially as an ID3 tag. If you strip ID3
tags, the player has to detect changes in the bit rate with every
frame using the frame headers. Any modern decoder should be doing that
anyway.
I've encountered something a little like this when cat-ing vbr
files, but these files don't show up as vbr in the info about them.
What are you using to detect whether they are VBR? As I said, without
tags, it is harder to tell whether a file is VBR.

You might try running vbrfix on your file(s) and see what you get.
http://www.willwap.co.uk/Programs/vbrfix.php

-- Robert
_______________________________________________
Amadeus forum mailing list
Unsubscribe / change settings at http://two.pairlist.net/mailman/listinfo/forum_list

Post Reply