You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

7 lines
410 B
Bash

#!/bin/sh
# Convert audio files recursively to opus
#IFS=$'\n'; for i in $(find -name '*.c'); do echo $i; done
#find ./ -type f \( -iname '*.flac' -o -iname '*.mp3' -o -iname '*.ogg' -o -iname '*.m4a' -o -iname '*.wav' \) -exec sh -c 'i="{}"; ffmpeg -y -i "$i" "${i%.*}.opus" && rm -f "$i"' \;
IFS=$'\n'; for i in $(find . -iregex '[.](mp3|wav|ogg|m4a|flac)$'); do ffmpeg -y -i $i ${i:r}.opus && rm $i; done