projects
/
cmccabe-bin
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
af6e83b
)
music-to-mp3.sh: support multiple arguments
author
Colin P. McCabe
<cmccabe@apache.org>
Mon, 19 Jun 2023 20:02:35 +0000 (13:02 -0700)
committer
Colin P. McCabe
<cmccabe@apache.org>
Mon, 19 Jun 2023 20:02:35 +0000 (13:02 -0700)
music-to-mp3.sh
patch
|
blob
|
history
diff --git
a/music-to-mp3.sh
b/music-to-mp3.sh
index
0259f7b
..
2028e48
100755
(executable)
--- a/
music-to-mp3.sh
+++ b/
music-to-mp3.sh
@@
-1,5
+1,6
@@
#!/bin/bash
-FILE=$1
-echo "Re-encoding audio from ${FILE}..."
-ffmpeg -i "${FILE}" -vn -ac 2 -ar 44100 -ab 220k -f mp3 "${FILE}.mp3"
+echo "Re-encoding audio from ${@}..."
+for FILE in "$@"; do
+ ffmpeg -i "${FILE}" -vn -ac 2 -ar 44100 -ab 220k -f mp3 "${FILE}.mp3"
+done