Compatibility issues with ACC encoding, reverting back to MP3

This commit is contained in:
Chrystian Huot 2019-09-02 09:52:43 -04:00
parent 841b7eee21
commit 73bb1d670d

View file

@ -4,16 +4,16 @@ api="http://127.0.0.1:3000/upload"
key="b29eb8b9-9bcd-4e6e-bb4f-d244ada12736" key="b29eb8b9-9bcd-4e6e-bb4f-d244ada12736"
basename="${2%.*}" basename="${2%.*}"
aacfile="$basename.aac" mp3file="$basename.mp3"
jsonfile="$basename.json" jsonfile="$basename.json"
system=$1 system=$1
wavfile="$basename.wav" wavfile="$basename.wav"
exec >/dev/null 2>&1 exec >/dev/null 2>&1
nice -n 19 ffmpeg -i "$wavfile" -af dynaudnorm=m=20 "$aacfile" && \ nice -n 19 ffmpeg -i "$wavfile" -af dynaudnorm=m=20 "$mp3file" && \
curl $api \ curl $api \
-F "audio=@$aacfile;type=audio/aac" \ -F "audio=@$mp3file;type=audio/mpeg" \
-F "json=@$jsonfile;type=application/json" \ -F "json=@$jsonfile;type=application/json" \
-F "key=$key" \ -F "key=$key" \
-F "system=$system" \ -F "system=$system" \