Change header mp3

Just starting out? Need help? Post your questions and find answers here.
Cor
Enthusiast
Enthusiast
Posts: 124
Joined: Fri Apr 25, 2003 7:52 pm
Location: Netherlands
Contact:

Change header mp3

Post by Cor »

Is there a way to change the mp3 format so it doesn't play on standard players, but only on the custom player from me.

e.g.

* adding my own header to the front or back of an mp3 file
* strip the header when loading the mp3 file
* play the original mp3

So the mp3 files can only be played with my player, so it's not easy to distribute the mp3 without my player.

Any suggestions are welcome.

I will use it to distribute my own guitar songs.
Cor de Visser

Registered PureBasic user

Author of ChordPlanet
Made with PureBasic
http://www.chordplanet.com
Tranquil
Addict
Addict
Posts: 952
Joined: Mon Apr 28, 2003 2:22 pm
Location: Europe

Post by Tranquil »

That would be very hard becouse mp3 players are very tolerant with playing. Mp3 headers are so different especially the ID3V2 Tag at the beginning of a stream that many players (eg Winamp) searches the stream for playable datas.
If you remove the stream header (4 Bytes) it does not matter couse the stream header will appear every xxxxx bytes. (depends on bitrate, frequency, mode)

The only thing you can do is to trash every header of a stream and recover it for yourselfe again. A little bit rotation should be enough. But remember where you did you changes, otherwise you would not get it back.

Mike
Tranquil
User avatar
Danilo
Addict
Addict
Posts: 3036
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Post by Danilo »

Pack it and add your own header with size before packing,
filename and such infos, so you can unpack it easily.

This works very fast with 3 or 5 MB MP3's, but with 200MB MP3's
it wouldnt work good.
cya,
...Danilo
...:-=< http://codedan.net/work >=-:...
-= FaceBook.com/DaniloKrahn =-
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Post by ricardo »

Mp3 are (Mpeg layer 3) what means Moving Picture Expert Group.
So, like movies, Mp3 are composed by frames and every frame has its own header, so change the headers means a lot of work because sometimes an Mp3 has 900,000 frames!!
If you cut an Mp3 in any point of the file, the player could start playing just when find the next header, thats why mp3 could be streamed easily.

But you can do some trick:

-Encrypt it, so only you software can decipher the file and convert it again in a Mp3.
Use Ring's FastFile to do it, otherwise it will be a very slow procedure. Using FastFile you can go to every bit of the file in a few seconds (maybe 8 seconds!).

-Another trick is change the BitRate to a very high value (560,000), so just a few players (not winamp or mediaplayer or none of the usuall) can reproduce it. Use the MAD winamp plugin to resample and to play it back (remember there are a winamp plugin working example here (GPI's) in the forums).

Hope it helps
ARGENTINA WORLD CHAMPION
Post Reply