From b9316708e7af2e1389b1a681dd90081cc0f88e63 Mon Sep 17 00:00:00 2001 From: Daniel Ziltener Date: Fri, 8 Nov 2024 12:42:03 +0100 Subject: [PATCH] . --- sd/to-opus-audiobook | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 sd/to-opus-audiobook diff --git a/sd/to-opus-audiobook b/sd/to-opus-audiobook new file mode 100755 index 0000000..21ac0c7 --- /dev/null +++ b/sd/to-opus-audiobook @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +# Converts an input file into .opus for audiobooks. Arguments: filename artist album date picture +set -euo pipefail +echo "Converting $1" +filepath="$(basename -- $1)" +filestem="${filepath%.*}" +nix-shell -p ffmpeg-full opusTools --command "ffmpeg -i $1 -f wav pipe:1 | opusenc --bitrate 32 --speech --framesize 60 --artist \"$2\" --album \"$3\" --date $4 --genre Hörbuch --picture \"$5\" - $filestem.opus" +