summaryrefslogtreecommitdiff
path: root/bin/m4a2mp3
diff options
context:
space:
mode:
authorMarc Vertes <mvertes@free.fr>2025-02-24 11:52:58 +0100
committerMarc Vertes <mvertes@free.fr>2025-02-24 11:52:58 +0100
commit17d348db1738a536319de62229c233e764766087 (patch)
tree19c57dfb03b05c9a814825d64da73ae253c19bbc /bin/m4a2mp3
parent9921f42676ea8361ea3d14bc1c9c5e184dfe5e07 (diff)
add mp3 scripts
Diffstat (limited to 'bin/m4a2mp3')
-rwxr-xr-xbin/m4a2mp315
1 files changed, 15 insertions, 0 deletions
diff --git a/bin/m4a2mp3 b/bin/m4a2mp3
new file mode 100755
index 0000000..bc2584a
--- /dev/null
+++ b/bin/m4a2mp3
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# This script should be launched from the root dir of music library.
+
+find . -name "*.m4a" | while read -r in; do
+ out="../mp3/${in%.m4a}.mp3"
+ dir="${out%/*}"
+ test -d "$dir" && continue
+ echo "$dir"
+ mkdir -p "$dir"
+done
+
+find . -name "*.m4a" -exec ffmpeg -i {} -c:v copy -q:a 0 ../mp3/{}.mp3 \;
+
+exit