README.adoc 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. = audiowmark - Audio Watermarking
  2. == Description
  3. `audiowmark` is an Open Source solution for audio watermarking. A sound file
  4. (typically wav) is read by the software, and a 128-bit message is stored in a
  5. watermark in the output sound file. For human listeners, the files typically
  6. sound the same.
  7. However, the 128-bit message can be retrieved from the output sound file. Our
  8. tests show, that even if the file is converted to mp3 or ogg (with bitrate 128
  9. kbit/s or higher), the watermark usually can be retrieved without problems. The
  10. process of retrieving the message does not need the original audio file (blind
  11. decoding).
  12. Internally, audiowmark is using the patchwork algorithm to hide the data in the
  13. spectrum of the audio file. The signal is split into 1024 sample frames. For
  14. each frame, some pseoudo-randomly selected amplitudes of the frequency bands of
  15. a 1024-value FFTs are increased or decreased slightly, which can be detected
  16. later. The algorithm used here is inspired by
  17. Martin Steinebach: Digitale Wasserzeichen für Audiodaten.
  18. Darmstadt University of Technology 2004, ISBN 3-8322-2507-2
  19. == Adding/Retrieving a Watermark
  20. To add a watermark to the soundfile in.wav with a 128-bit message (which is
  21. specified as hex-string):
  22. audiowmark add in.wav out.wav 0123456789abcdef0011223344556677
  23. To get the 128-bit message from the watermarked file, use:
  24. audiowmark get out.wav
  25. == Watermark Key
  26. Since the software is Open Source, a watermarking key should be used to ensure
  27. that the message bits cannot be retrieved by somebody else (which would also
  28. allow removing the watermark without loss of quality). The watermark key
  29. controls all pseudo-random parameters of the algorithm. This means that
  30. it determines which frequency bands are increased or decreased to store a
  31. 0 bit or a 1 bit. Without the key, it is impossible to decode the message
  32. bits from the audio file alone.
  33. Our watermarking key is a 128-bit AES key. A key can be generated using
  34. audiowmark gen-key test.key
  35. and can be used for the add/get commands as follows:
  36. audiowmark add --key test.key in.wav out.wav 0123456789abcdef0011223344556677
  37. audiowmark get --key test.key out.wav
  38. == Watermark Strength
  39. The watermark strength parameter affects how much the watermarking algorithm
  40. modifies the input signal. A stronger watermark is more audible, but also more
  41. robust against modifications. The default strength is 10. A watermark with that
  42. strength is recoverable after mp3/ogg encoding with 128kbit/s or higher. In our
  43. informal listening tests, this setting also has a very good subjective quality.
  44. A higher strength (for instance 15) would be helpful for instance if robustness
  45. against multiple conversions or conversions to low bit rates (i.e. 64kbit/s) is
  46. desired.
  47. A lower strength (for instance 6) makes the watermark less audible, but also
  48. less robust. Strengths below 5 are not recommended. To set the strength, the
  49. same value has to be passed during both, generation and retrieving the
  50. watermark. Fractional strengths (like 7.5) are possible.
  51. audiowmark add --strength 15 in.wav out.wav 0123456789abcdef0011223344556677
  52. audiowmark get --strength 15 out.wav
  53. == Dependencies
  54. If you compile from source, audiowmark needs the follwing libraries:
  55. * libfftw3
  56. * libsndfile
  57. * libgcrypt
  58. * libzita-resampler
  59. * libmpg123
  60. == Building fftw
  61. audiowmark needs the single prevision variant of fftw3.
  62. If you are building fftw3 from source, use the `--enable-float`
  63. configure parameter to build it, e.g.::
  64. cd ${FFTW3_SOURCE}
  65. ./configure --enable-float --enable-sse && \
  66. make && \
  67. sudo make install
  68. or, when building from git
  69. cd ${FFTW3_GIT}
  70. ./bootstrap.sh --enable-shared --enable-sse --enable-float && \
  71. make && \
  72. sudo make install
  73. == Docker Build
  74. You should be able to execute audiowmark via Docker.
  75. Example that outputs the usage message:
  76. docker build -t audiowmark .
  77. docker run -v <local-data-directory>:/data -it audiowmark -h