Andrew's git
/
scripts.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
lazy flac to mp3 converter
author
Andrew Lorimer
<andrew@lorimer.id.au>
Wed, 31 Oct 2018 03:30:52 +0000
(14:30 +1100)
committer
Andrew Lorimer
<andrew@lorimer.id.au>
Wed, 31 Oct 2018 03:30:52 +0000
(14:30 +1100)
flactomp3.sh
[new file with mode: 0755]
patch
|
blob
raw
|
patch
| inline |
side by side
(parent:
0bf43ba
)
diff --git a/flactomp3.sh
b/flactomp3.sh
new file mode 100755
(executable)
index 0000000..
0837eb0
--- /dev/null
+++ b/
flactomp3.sh
@@ -0,0
+1,13
@@
+#! /bin/bash
+
+# lazy wrapper for ffmpeg to convert flac to mp3
+# usage: flactomp3.sh [dir]
+# all *.flac in [dir] or current directory are converted to mp3 if not already done
+
+if [ -z $1 ]; then
+ dir=$(pwd)
+else
+ dir=$1
+fi
+
+for i in $dir/*.flac; do ffmpeg -n -i "$i" -ab 320k -map_metadata 0 -id3v2_version 3 "${i%.*}.mp3"; done
\ No newline at end of file