Add script to transform music in bulk from itunes for funkwhale
This commit is contained in:
35
transform_music
Normal file
35
transform_music
Normal file
@@ -0,0 +1,35 @@
|
||||
#! /bin/bash
|
||||
|
||||
|
||||
usage(){
|
||||
cat << EOF
|
||||
usage: transform_music [Album_name]
|
||||
|
||||
Description
|
||||
|
||||
transform_music transforms music from m4a format to flac it creates a new folder with the name provided and stores flac files in it
|
||||
|
||||
|
||||
EOF
|
||||
exit 1
|
||||
|
||||
}
|
||||
|
||||
if [[ $# -lt 1 ]] ;
|
||||
then
|
||||
usage
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if [[ ! -d $1 ]] ;
|
||||
then
|
||||
mkdir $1
|
||||
fi
|
||||
|
||||
for name in *m4a ;
|
||||
do
|
||||
name_flac=${name/m4a/flac}
|
||||
ffmpeg -i "$name" -movflags use_metadata_tags -crf 22 "./$1/$name_flac"
|
||||
echo transformed $name to $name_flac
|
||||
done
|
||||
Reference in New Issue
Block a user