문제

after reading the header fame, the data frame starts, i want to know what is the data frame size, that a mp3 player reads, so that if i change single bit of each frame without causing much to the sound of the file, and how can i change a single bit (last bit) so effect is minimum in C#. please help me

도움이 되었습니까?

해결책 3

I was able to figure it out and came up with my own algorithm, Rzr what ever you said was right.

The mp3 file is highly compressed file any bit change in any of the frame would introduce tremendous noise.

there is way to work around for this,

Soln_1: Hide the text data and in any of the bit of each byte and reconstruct the frame using humming code 

Soln_2: which i was able to do it, using Layer III, BitRate=128000, SampleRate=441000, Padding=0

drawbacks : file size would be increased abit which the un-intended user cant predict, unless he has the exact copy of the original mp3 file.

Able to achieve : without noise i was able to hide text data upto 5kb in a 3mb mp3 file

Work Around:

step1: scan every 8 bytes in each frame
step2: take a 8 bits from the text data

Pre-definee location of where to put each bit of text data in each frame e.g: 4th location.

step3:  check every 4th bit location of each byte of the frame is same as the each bit of the text data are same

E.g.: text data one byte is 01110001

1st 8 byte from the mp3 data frames

byte_1: 01101111 -->4th location bit is 0
byte_2: 01111111 -->4th location bit is 1
byte_3: 01111001 -->4th location bit is 1
byte_4: 01111011 -->4th location bit is 1
byte_5: 01100011 -->4th location bit is 0
byte_6: 01101100 -->4th location bit is 0
byte_7: 01101011 -->4th location bit is 0
byte_8: 01110011 -->4th location bit is 1

so this byte from the frame, every 4th bit location is having the bits which are same as the text data bits.

Step4: note down the location of the byte in the mp3 data frame, in this case its "1" that is 1st location

if the byte from the mp3 data frame doesn't matches the data bits then skip the byte and go on to the next byte, keep on doing the same till entire text data is hidden.

Step5:now take all the locations where the text data is present and add these as a byte to the data frame of mp3.

this is one solution i was able to successfully implemented.

다른 팁

The technology you are looking for is called 'steganography'.

It isn't C# (this is a lot more complex than one would think), but this is related.. You might want to use this using p/invoke, or port it into C# code.

I'm also working on a similar project... First of all you have to know about mp3 file structure... I hope this link would help you regarding mp3 file structure... Once you are clear about the file structure it's pretty easy to write a code yourself... Get the mp3 file as a stream and extract each frame from it(This should be really easy once you know about mp3 file structure... In fact, It took just a couple of hours for me to write a code to do that)... And a suggestion about your algorithm. A 5 mb mp3 file has more or less 15,000 frames... So, if you think of replacing a bit per frame the largest data you can store is 2KB...

I tried the same but I changed a BYTE per frame... This introduced some noise in the resulting file... Any suggestions on how to reduce the noise...!?!?!?? And hope my answer helps you... :)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top