git: 4aca6786ed56 - main - audio/audiowmark: Add new port
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 09 Jun 2023 06:53:47 UTC
The branch main has been updated by ehaupt:
URL: https://cgit.FreeBSD.org/ports/commit/?id=4aca6786ed5623cb888e14a2f35d0542952dec0e
commit 4aca6786ed5623cb888e14a2f35d0542952dec0e
Author: Emanuel Haupt <ehaupt@FreeBSD.org>
AuthorDate: 2023-06-09 06:53:07 +0000
Commit: Emanuel Haupt <ehaupt@FreeBSD.org>
CommitDate: 2023-06-09 06:53:07 +0000
audio/audiowmark: Add new port
A sound file is read by the software, and a 128-bit message is stored in
a watermark in the output sound file. For human listeners, the files
typically sound the same.
However, the 128-bit message can be retrieved from the output sound
file. Our tests show, that even if the file is converted to mp3 or ogg
(with bitrate 128 kbit/s or higher), the watermark usually can be
retrieved without problems. The process of retrieving the message does
not need the original audio file (blind decoding).
Internally, audiowmark is using the patchwork algorithm to hide the data
in the spectrum of the audio file. The signal is split into 1024 sample
frames. For each frame, some pseoudo-randomly selected amplitudes of the
frequency bands of a 1024-value FFTs are increased or decreased
slightly, which can be detected later.
---
audio/Makefile | 1 +
audio/audiowmark/Makefile | 51 ++++++++++++++++++++++++++++++++++++++++++++++
audio/audiowmark/distinfo | 3 +++
audio/audiowmark/pkg-descr | 15 ++++++++++++++
4 files changed, 70 insertions(+)
diff --git a/audio/Makefile b/audio/Makefile
index feedad6b392f..eaa5894d5f7f 100644
--- a/audio/Makefile
+++ b/audio/Makefile
@@ -43,6 +43,7 @@
SUBDIR += audacity
SUBDIR += audiere
SUBDIR += audiocd-kio
+ SUBDIR += audiowmark
SUBDIR += aumix
SUBDIR += autocd
SUBDIR += autotalent
diff --git a/audio/audiowmark/Makefile b/audio/audiowmark/Makefile
new file mode 100644
index 000000000000..41a233b17440
--- /dev/null
+++ b/audio/audiowmark/Makefile
@@ -0,0 +1,51 @@
+PORTNAME= audiowmark
+PORTVERSION= 0.6.1
+CATEGORIES= audio
+
+MAINTAINER= ehaupt@FreeBSD.org
+COMMENT= Audio and video watermarking tool
+WWW= https://github.com/swesterfeld/audiowmark
+
+LICENSE= GPLv3
+LICENSE_FILE= ${WRKSRC}/COPYING
+
+BUILD_DEPENDS= ${LOCALBASE}/include/fftw3.h:math/fftw3 \
+ autoconf-archive>=0:devel/autoconf-archive
+LIB_DEPENDS= libfftw3f.so:math/fftw3-float \
+ libgcrypt.so:security/libgcrypt \
+ libgpg-error.so:security/libgpg-error \
+ libmpg123.so:audio/mpg123 \
+ libsndfile.so:audio/libsndfile \
+ libzita-resampler.so:audio/zita-resampler
+
+USES= autoreconf localbase:ldflags pkgconfig shebangfix
+USE_GITHUB= yes
+GH_ACCOUNT= swesterfeld
+
+SHEBANG_FILES= src/videowmark
+
+GNU_CONFIGURE= yes
+
+PLIST_FILES= bin/audiowmark \
+ bin/videowmark
+PORTDOCS= README.adoc
+
+OPTIONS_DEFINE= DOCS FFMPEG
+OPTIONS_DEFAULT= FFMPEG
+
+FFMPEG_LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg
+FFMPEG_CONFIGURE_ON= --with-ffmpeg
+
+.include <bsd.port.pre.mk>
+
+# Fails to compile with llvm15
+# https://github.com/swesterfeld/audiowmark/issues/36
+.if ${OSVERSION} >= 1400000
+USE_GCC= yes
+.endif
+
+post-install:
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/README.adoc ${STAGEDIR}${DOCSDIR}
+
+.include <bsd.port.post.mk>
diff --git a/audio/audiowmark/distinfo b/audio/audiowmark/distinfo
new file mode 100644
index 000000000000..b60df4e2bd33
--- /dev/null
+++ b/audio/audiowmark/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1686217029
+SHA256 (swesterfeld-audiowmark-0.6.1_GH0.tar.gz) = 033500755f333db228c0192c80782fa4ad947e7604a5f34689a3ce4eef72afcc
+SIZE (swesterfeld-audiowmark-0.6.1_GH0.tar.gz) = 102875
diff --git a/audio/audiowmark/pkg-descr b/audio/audiowmark/pkg-descr
new file mode 100644
index 000000000000..a5db5a3d8509
--- /dev/null
+++ b/audio/audiowmark/pkg-descr
@@ -0,0 +1,15 @@
+A sound file is read by the software, and a 128-bit message is stored in
+a watermark in the output sound file. For human listeners, the files
+typically sound the same.
+
+However, the 128-bit message can be retrieved from the output sound
+file. Our tests show, that even if the file is converted to mp3 or ogg
+(with bitrate 128 kbit/s or higher), the watermark usually can be
+retrieved without problems. The process of retrieving the message does
+not need the original audio file (blind decoding).
+
+Internally, audiowmark is using the patchwork algorithm to hide the data
+in the spectrum of the audio file. The signal is split into 1024 sample
+frames. For each frame, some pseoudo-randomly selected amplitudes of the
+frequency bands of a 1024-value FFTs are increased or decreased
+slightly, which can be detected later.