2

I am currently developing an application in C# to hide data in Mp3 audio files.

So far, I have been able to hide data in MP3 frames using the Least Significant Bit Approach (LSB). I can retrieve the data as well. The problem I am facing is, let's say I hide 300 bytes of data, the encoded audio plays just fine without significant noise. However when I try to encrypt more data into the MP3, like 500 bytes or more, there will be significant noise in my mp3 file. The audio gets distorted a lot.

I was wondering how to reduce that noise.

Matthias
  • 12,873
  • 6
  • 42
  • 48
  • There is only so much you can hide in a room without people noticing. Maybe you need a bigger room ;) – Etienne Maheu Dec 11 '14 at 19:37
  • It is not about the size of the mp3 file, I have used Mp3 of varying size for instance 4MB, 8MB, 10MB. When I embed my data it produces noise. – Gerard Jean Dec 11 '14 at 20:46
  • My point is more that the amount of data you can fit within a file will always depend on the amount of frames it contains and the amount of free space within each of those frames. But, after thinking further about your problem, I got to wonder, which bit are you using? In every MP3 frame, there is a lot of parts that, even if off my a single bit, would completely corrupt the file. – Etienne Maheu Dec 11 '14 at 22:47
  • Do you mean 300 bytes per farme works and 500 per frame doesn't? – TaW Dec 11 '14 at 23:44
  • @EtienneMaheu What I did, was I located the start of each MP3 frame, I skipped the frame header, then I start modifying each audio byte's LSB (with my data to embed hidden) after each frame header. My file is not corrupted. #TaW Both will work. And I am able to recover my hidden data. However, the larger the data, the more the audio becomes distorted and part of it becomes unplayable. – Gerard Jean Dec 12 '14 at 03:14
  • That is to be expected. This technique would work in a wav file where each sample represent actual audio data. In an MP3 file though, this is different. The data is stored as a Huffman tree. Changing a single bit in this tree could mess up the entire tree structure. Depending on the decoder, this could produce skipping, artifacts or even a crash. If my understanding of the MP3 format is correct, the only bytes you can change are the leafs of the tree. It might also be possible that you need decode the data, inject your own and encode a new tree for each frame. – Etienne Maheu Dec 12 '14 at 03:24

0 Answers0