Encode flac to opus 192k. Encode others to 128k opus

This commit is contained in:
RealStickman 2021-01-26 12:51:25 +01:00
parent 15b33d947c
commit 6867e8d89c

View File

@ -37,7 +37,9 @@ while read -r dir; do
noextfile="${file%.*}" noextfile="${file%.*}"
# add opus extension # add opus extension
opusfile="${noextfile}.opus" opusfile="${noextfile}.opus"
ffmpeg -nostdin -i "$HOME/MusikRaw/$dir/$file" "$HOME/MusikRaw/$dir/transcode/$opusfile" & # encode to 192k bit opus
# TODO include cover picture (prefer picture named same as audio, cover at second place)
ffmpeg -nostdin -i "$HOME/MusikRaw/$dir/$file" -b:a 192k "$HOME/MusikRaw/$dir/transcode/$opusfile" &
done < flaclist done < flaclist
# remove list # remove list
@ -46,17 +48,22 @@ while read -r dir; do
# convert m4a # convert m4a
if [[ $(ls | grep ".m4a") ]]; then if [[ $(ls | grep ".m4a") ]]; then
ffmpeg-normalize *.m4a -v -pr -c:a libopus -ext opus & ffmpeg-normalize *.m4a -v -pr -c:a libopus -b:a 128k -ext opus &
fi fi
# convert flac # convert flac
if [[ $(ls | grep ".flac") ]]; then #if [[ $(ls | grep ".flac") ]]; then
ffmpeg-normalize *.flac -v -pr -c:a flac -ext flac & # ffmpeg-normalize *.flac -v -pr -c:a flac -ext flac &
#fi
# convert transcoded files
if [[ -d "$HOME/MusikRaw/$dir/transcode" ]]; then
ffmpeg-normalize transcode/*.opus -v -pr -c:a libopus -b:a 192k -ext opus &
fi fi
# convert opus # convert opus
if [[ $(ls | grep ".opus") ]]; then if [[ $(ls | grep ".opus") ]]; then
ffmpeg-normalize *.opus -v -pr -c:a libopus -ext opus & ffmpeg-normalize *.opus -v -pr -c:a libopus -b:a 128k -ext opus &
fi fi
# link cover.jpg # link cover.jpg