From 17d348db1738a536319de62229c233e764766087 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Mon, 24 Feb 2025 11:52:58 +0100 Subject: add mp3 scripts --- bin/m4a2mp3 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 bin/m4a2mp3 (limited to 'bin/m4a2mp3') 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 -- cgit v1.2.3