aboutsummaryrefslogtreecommitdiff
path: root/bulk-audio/manual-convert
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2024-05-08 10:52:33 +0200
committerlonkaars <loek@pipeframe.xyz>2024-05-08 10:52:33 +0200
commit9b9fb49b64e5d862e69b0b993466d27554d7982b (patch)
treea7f1acf6ee696f4dcfb8cd92b250587a64e31d2f /bulk-audio/manual-convert
parenta8895c8e1b683a575de0a6786a7cad9d9750fb49 (diff)
add small script for manually converting audio files to refold-tools.mp3
Diffstat (limited to 'bulk-audio/manual-convert')
-rwxr-xr-xbulk-audio/manual-convert11
1 files changed, 11 insertions, 0 deletions
diff --git a/bulk-audio/manual-convert b/bulk-audio/manual-convert
new file mode 100755
index 0000000..5ced910
--- /dev/null
+++ b/bulk-audio/manual-convert
@@ -0,0 +1,11 @@
+#!/bin/sh
+for input in "$@" ; do
+ tmp_filename="$(mktemp)"
+ ffmpeg -hide_banner -loglevel error -i "$input" -f mp3 pipe: > "$tmp_filename"
+
+ sum="$(sha1sum "$tmp_filename" | cut -c1-40)"
+ output_filename="refold-tools-$sum.mp3"
+ cp "$tmp_filename" "./$output_filename"
+ rm -f "$tmp_filename"
+ echo "$input -> $output_filename" >&2
+done