Code Monkey home page Code Monkey logo

Comments (3)

swesterfeld avatar swesterfeld commented on August 23, 2024

Yes, as long as you use two different keys, it should be possible to add two different watermarks. However of course if you can avoid it, it is better to use just one watermark which is better for the quality.

from audiowmark.

junlicn avatar junlicn commented on August 23, 2024

what's the theory and process of two different watermark by only two keys?
and another question, only consider technical engineer factors, is it possible to implement two watermakr by adding first watermark at first 50 second block, and adding second watermark at second 50 seconds block, and repeat this operation in the remaining blocks ?

from audiowmark.

swesterfeld avatar swesterfeld commented on August 23, 2024

First of all, if you haven't read the README section on recommendations for the payload, you can do so here:

https://github.com/swesterfeld/audiowmark#recommendations-for-the-watermarking-payload

We kind-of assume that 128-bit messages ought to be enough for everyone.

what's the theory and process of two different watermark by only two keys?

As a user create two keys using audiowmark gen-key and use audiowmark add --key to twice to add the watermark. Use audiowmark get --key to get the message.

To see why using two different keys works you could look at the decoder code for single raw bits from the watermark.

The simplest possible decoder is here:

linear_decode (vector<vector<complex<float>>>& fft_out, int n_channels)

This computes umag and dmag as sum of pseudo randomly selected amplitude bins from the FFT spectrum of each frame. Simplified if (umag > dmag) we decode an 1 bit, otherwise 0. Which amplitude bins are used is depends on the key. So if you use different keys for watermarking you can embed / decode different message bits in the same spectrum.

Btw I didn't do excessive testing for using two keys, it appears to work but it may be a little less robust than using just one key.

and another question, only consider technical engineer factors, is it possible to implement two watermakr by adding first watermark at first 50 second block, and adding second watermark at second 50 seconds block, and repeat this operation in the remaining blocks ?

Yes you could do that. However there are cases in audiowmark where we currently assume that the A and B blocks carry the same data bits (but use different error correction coding). The most important feature is probably clip decoding. If you just have any randomly choosen small clip, we'll try to decode the message bits from the clip. It doesn't need to contain a full block.

Lets assume that we have a "short" N seconds clip. At any possible location, audiowmark will try to decode the message bits from the clip, including if there is only a partial A and B block.

See also this comment:

So it wouldn't be totally easy to change the code to no longer make the assumption that A and B blocks can be decoded together.

from audiowmark.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.