swesterfeld / audiowmark

Audio Watermarking
GNU General Public License v3.0
396 stars 79 forks source link

a special use case #67

Open nj9106 opened 3 weeks ago

nj9106 commented 3 weeks ago

For one audio file, I signed it 3 times with the same key but different messages, eg.

audiowmark add --key test.key t.mp3 t.1.mp3 --short 12 111 audiowmark add --key test.key t.mp3 t.2.mp3 --short 12 222 audiowmark add --key test.key t.mp3 t.3.mp3 --short 12 333

then I split the 3 mp3 files to pieces of about 20 seconds, eg. t1.1.mp3 t1.2.mp3 t1.3.mp3 ... t2.1.mp3 t2.2.mp3 etc, then I selected some pieces from different files, eg. t2.1.mp3 t1.2.mp3 t2.3.mp3 t3.4.mp3 ...., concatenate them to one mp3, eg. t.out.mp3 and try to get signed messages from the file, which should be 222 111 222 333 ... , but I find it doesn't work if the number of pieces are more than about 6.

is it normal? any idea about how to fix it, thanks!

tim-janik commented 3 weeks ago

For one audio file, I signed it 3 times with the same key but different messages, eg.

audiowmark add --key test.key t.mp3 t.1.mp3 --short 12 111 audiowmark add --key test.key t.mp3 t.2.mp3 --short 12 222 audiowmark add --key test.key t.mp3 t.3.mp3 --short 12 333

then I split the 3 mp3 files to pieces of about 20 seconds, eg. t1.1.mp3 t1.2.mp3 t1.3.mp3 ... t2.1.mp3 t2.2.mp3 etc, then I selected some pieces from different files, eg. t2.1.mp3 t1.2.mp3 t2.3.mp3 t3.4.mp3 ...., concatenate them to one mp3, eg. t.out.mp3 and try to get signed messages from the file, which should be 222 111 222 333 ... , but I find it doesn't work if the number of pieces are more than about 6.

is it normal? any idea about how to fix it, thanks!

If you split an audio file to apply different watermarks to the pieces, split it again into pieces when you want to detect the watermarks. There is a certain minimum size under which you are unlikely to retrieve any watermark, give it at least half a minute. Audiowmark is not designed to embed and extract multiple watermarks from the same audio file. You might have limited success with certain A/B block detecting different watermarks if they are not too distorted, but especially the "all" detection at the end averages over all blocks (simply speaking) to improve the watermark signal and that will not work when multiple segments with different watermarks are stitched together.

nj9106 commented 2 weeks ago

I see, thanks for your reply!