A command line utility for reading and writing data to and from the private bits of MP3 frame headers. This makes it an unobtrusive (albeit trivially circumvented) tool for embedding information into MP3 files without affecting the audio quality in any way.
Apart from a few additional items like ID3
tags, an MP3 file basically consists of a stream of data blocks called "frames". Each frame typically contains 26 milliseconds of audio, and begins with a 32-bit frame header containing information about the bit rate, sampling frequency and so on.
One of these 32 bits is designated as a "private" bit, and has no effect on the audio reproduction. That means it can be used to store other data. Each second of audio typically consists of about 38 MP3 frames, and can thus contain almost five bytes of private data.
The code has no dependencies and should compile successfully on any Linux or OS X system. Just type make
at the command line.
Once the code has compiled, type in ./tamp3r -h
for instructions. The basic usage is as follows:
# show the data embedded in audio.mp3
./tamp3r -p audio.mp3
# load input.mp3, write "Hello world" to the private data, and
# save the marked MP3 data as output.mp3
./tamp3r -s "Hello world" -o output.mp3 input.mp3
There is plenty of room for improvement, but the first item on the list is to allow embedding of binary data as well as text strings
Yes, probably. Let me know if you find one.
Published under the MIT license. See LICENSE.md for details.