Rog rio Brito: Cleaning MP3 files that were concatenated
MJ Ray has said that he needs occasionally to concatenate MP3 files and he wants those files to be free of junk in their middle.
There are some nice things to say about this problem:
implemented in a backwards-compatible manner and is nice. In other words, decoders should just skip those data and be done with it. Also regarding the second point, apparently, some versions of popular music players/manipulators have problems with unsynchronized data. There are many tools that one can use for removing unwanted, unsynchronized data from an MP3 file. For instance, you can use
even a RFP bug exists.
- Just using
catwith MP3 files work because those files are headerless : the metadata in form of ID3v 1,2 tags is an addendum to the format. MP3 is also a format that can be conveniently used without containers/wrappers.That is not the case with AAC files, in general: AAC files that are not inside a container (e.g., Matroska or MPEG 4) are usually useless, unless you know (and can inform) some properties of them to th software that you are using. This is especially the case with AAC files that were compressed with some advanced things like spectral band replication (SBR). - The tags for MP3 files (at least those in ID3v2) are supposed to be unsynchronized , so as to not be interpreted as audio data. What this means is that some byte sequences (a byte 255 followed by a byte with value at least 224) that are allowed as audio to say hey, I am a marker, process the
next chunk of data, now have to be escaped if they are present in tags (so that you don t listen to garbage in the middle of a file i.e., you don t play the tag).
implemented in a backwards-compatible manner and is nice. In other words, decoders should just skip those data and be done with it. Also regarding the second point, apparently, some versions of popular music players/manipulators have problems with unsynchronized data. There are many tools that one can use for removing unwanted, unsynchronized data from an MP3 file. For instance, you can use
mp3diags, which is already conveniently packaged in Debian s repository. It is a recommended program for those purposes, indeed.
There is another tool that serves that purpose as a side effect: mp3packer. Its purpose is, naively speaking, to losslessly shuffle the data inside an MP3 file so that it can be stored with fewer bits (saving more space for portable players, for instance). In the process of regenerating a new MP3 file, it discards some junk data and solves the original problem.
Despite not being part of our repository yet, it is already packaged andeven a RFP bug exists.
...awesome.
OK, I'm writing this while I'm still in USA, but there are so many
things to say about these weeks that I can't write them in only one
blog post. And, still, this one will be quite long as it will talk
about hacking, running and sightseeing...:)
Let's start about hacking: after all, this is the first reason for
being there in US, isn't it?
I cam to DebConf with a very long TODO list and, for the first time in
seven DebConfs, I'm pretty happy with what I achieved from it:
During DebConf, I managed to squeeze out of the middle of everything for long enough to write a column, a short article for a participation I have every three months, for Mexican
Sadly, I cannot find this book in English, as it is very well worth a read. But if the topic sounds interesting and you can understand the language, don't hesitate and pick up the book. It gives an interesting insight on the topic, for a group of people (us techies) used to looking at things in a much more human-cognitive-process-oriented way.
[update] I found this nice 
At some point I had to debug an issue with some code I worked on in the past. It was using OpenLDAP to connect to an Active Directory server to get some information. At some point I got a report that the authentication failed with an ugly error.

It's been a couple of very interesting days. The 

A fresh release of