Tuesday

Hide MP3 audio inside GIF picture

How cool is that? It's really cool! You can send special messages in recorded audio that no one would even guess to your friend in picture format.
It's like combining 2 files to become 1 and when you run the combined file, it will by default display the picture. To listen to the audio that is embedded into the picture file, you'll need to manually load the combined file into Winamp.
Here's the test I did.
embedd


1. Combine audio (.mp3) with picture (.gif)
I use the command "copy picture.gif /b + audio.mp3 /b combined.gif" in DOS prompt.

I look in my C: drive and now I have a new file "combined.gif"
I run the combined.gif file and it display the same picture as picture.gif.
I run Winamp and manually load the combined.gif, I am able to play the audio.mp3 sound. I tried to load combined.gif file into Windows Media Player and I can only see the picture.gif. No sound at all. Looks like Winamp can support this feature but not Windows Media Player.

2. Combine audio (.wav) with picture (.gif)
I use the same picture.gif but now I am combining the picture file with a .wav sound file. Wav is another type of sound format.
Used the same command "copy picture.gif /b + audio.wav /b combined.gif" in DOS prompt. I ran combined.gif and it is able to display the picture.gif picture file. Tried to load it into Winamp, doesn't play this time. Loaded the combined.gif into Windows Media Player, it also only display the picture but no sound.
Looks like only .mp3 sound format is supported.

3. Combine audio (.mp3) with picture (.jpg)
Since only mp3 works, we'll try combining mp3 with another type of picture format with is JPG.
Used the same command "copy picture.jpg /b + audio.mp3 /b combined.jpg" in DOS prompt. Ran the combined.jpg and it displayed the picture.jpg. Then I tried loading the combined.jpg into Winamp, and it played the music. Again, loaded combined.jpg into Windows Media Player, I can only see the picture but no music.

From the test above, I believe that hiding audio inside picture can only work when you embed MP3 audio into picture file. I also believe that other picture format such as TIFF, PNG or Bitmap will work.
Tom Scott explains that the GIF format allows for an "application extension block" - an arbitrary section for applications that isn't checked by the GIF parser. Meanwhile, Winamp and other MP3 players ignore all data in the file that isn't marked as an MP3 block. The result: the picture viewer ignores the music, and the MP3 player ignores the picture.
Eventhough he only mentioned GIF, but I tested on JPG and it works as well.

If you're on a Linux box, you can do it by using the command "cat picture.gif sound.mp3 > combined.gif"

0 comments: