Difference between revisions of "Broadcastify-Calls-API"
From The RadioReference Wiki
(Created page with "=== Upload API === Convert to M4A AAC Audio ffmpeg -i "${basename}.wav" -c:a libfdk_aac -b:a 32k -cutoff 18000 "${basename}.m4a Get the duration of the audio clip ffprob...") |
|||
Line 8: | Line 8: | ||
Register the Clip and get the Upload URL | Register the Clip and get the Upload URL | ||
− | curl -s https://api.broadcastify.com/call-upload -F "callDuration=${duration}" -F "filename=${basename}.m4a" -F "apiKey=${APIKEY}" -F "metadata=@${basename}.json;type=application/json" -F "systemId=${systemId} | + | curl -s https://api.broadcastify.com/call-upload -F "callDuration=${duration}" -F "filename=${basename}.m4a" |
+ | -F "apiKey=${APIKEY}" -F "metadata=@${basename}.json;type=application/json" -F "systemId=${systemId} | ||
Upload the Audio File | Upload the Audio File | ||
− | curl --write-out %{http_code} --silent --output /dev/null -X PUT -H "Content-Type: audio/aac" -T ${basename}.m4a "${uploadURL} | + | curl --write-out %{http_code} --silent --output /dev/null -X PUT -H "Content-Type: audio/aac" |
+ | -T ${basename}.m4a "${uploadURL} |
Revision as of 19:18, 25 March 2020
Upload API
Convert to M4A AAC Audio
ffmpeg -i "${basename}.wav" -c:a libfdk_aac -b:a 32k -cutoff 18000 "${basename}.m4a
Get the duration of the audio clip
ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 "${basename}.m4a
Register the Clip and get the Upload URL
curl -s https://api.broadcastify.com/call-upload -F "callDuration=${duration}" -F "filename=${basename}.m4a" -F "apiKey=${APIKEY}" -F "metadata=@${basename}.json;type=application/json" -F "systemId=${systemId}
Upload the Audio File
curl --write-out %{http_code} --silent --output /dev/null -X PUT -H "Content-Type: audio/aac" -T ${basename}.m4a "${uploadURL}