diff options
author | lassulus <lass@aidsballs.de> | 2015-11-08 15:42:54 +0100 |
---|---|---|
committer | lassulus <lass@aidsballs.de> | 2015-11-08 15:42:54 +0100 |
commit | 094789f9250531087b630e92324d3b81b28a881d (patch) | |
tree | 18a8a750c71eaf2b5d0c383e3ee8e1034c0b2879 | |
parent | 533d789a1a549bb8fb1aac940a0d8d6ed36e8c38 (diff) |
add ogg2mp3 converter
-rw-r--r-- | Makefile | 3 | ||||
-rwxr-xr-x | bin/ogg2mp3 | 15 |
2 files changed, 18 insertions, 0 deletions
@@ -29,3 +29,6 @@ play: ## play the playlist without downloading copy: ## make copy dest="/mnt/tmp/music" copy: ## to copy music to dest rsync -vrltD ./music/ ${dest} + +convert2mp3: ## converts stuff from ./music to ./mp3 + ls music/* | target=./mp3 xargs -n1 bin/ogg2mp3 diff --git a/bin/ogg2mp3 b/bin/ogg2mp3 new file mode 100755 index 0000000..1fbf414 --- /dev/null +++ b/bin/ogg2mp3 @@ -0,0 +1,15 @@ +#! /bin/sh +set -euf +target_folder=${target-./} + +source=$1 +target_mp3=$(basename $1 | sed 's/ogg$/mp3/') + +mkdir -p $target_folder + +if test -e $target_folder/$target_mp3; then + echo "already done: $target_mp3 in $target_folder" >&2 + exit +fi + +ffmpeg -i $source $target_folder/$target_mp3 |