diff options
-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 |