audio watermarking

S

sznoorek

Hello,
I'm writing a VoIP communicator and i need to put digital watermark into
transmitted audio.
I'm using PCM codecs and I would like to do that with exchanging LSB, but I
have no idea how can I get to the sound sample (8 bit sample, 1 channel) to
switch last bit in each sample. HELP!!!

fsk
 
D

Daniel Pitts

sznoorek said:
Hello,
I'm writing a VoIP communicator and i need to put digital watermark into
transmitted audio.
I'm using PCM codecs and I would like to do that with exchanging LSB, but I
have no idea how can I get to the sound sample (8 bit sample, 1 channel) to
switch last bit in each sample. HELP!!!

fsk
In what way does this have to do with Java? Please find an appropriate
group for your questions.
 
K

Knute Johnson

sznoorek said:
Hello,
I'm writing a VoIP communicator and i need to put digital watermark into
transmitted audio.
I'm using PCM codecs and I would like to do that with exchanging LSB, but I
have no idea how can I get to the sound sample (8 bit sample, 1 channel) to
switch last bit in each sample. HELP!!!

fsk

Flip a bit? I haven't had to do that in a long time.

XOR the 8 bit value with 1.
 
O

Oliver Wong

Knute Johnson said:
Flip a bit? I haven't had to do that in a long time.

XOR the 8 bit value with 1.

(1) The OP seems to have trouble with getting the bits themselves. Maybe
if the OP would specify what classes (s)he is using, e.g. AudioInputStream,
it might make the question easier to answer.

(2) I'm guessing the OP doesn't really want to flip the bit, but rather
to hardset it to either 0 or 1, depending on what the contents of the
watermark is. That is, the OP should be overwriting, rather than flipping,
the bit.

- Oliver
 
S

sznoorek

Hi,
It's me again! ;o
Oliver was right! I'm having trouble with getting bits themselves - and as
he mentioned I'm using AudioInputStream. :)
Then I would like to set the last bit of the sample frame! I've got hash
function, which result I would like to put to the audio stream as a
watermark.

I've got smth like this:

....
if (target_line.isOpen()) {
audio_input_stream=new AudioInputStream(target_line);
audio_input_stream=AudioSystem.getAudioInputStream(format,audio_input_stream);

--> HERE I would like to get a new input_stream or a byte array,
where in each byte (sample) I need to set the last bit taken from result of
my hash function.

}
....

I will aprreciate Your help!

fsk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top