How can I get the audio bitrate from a video file using FFprobe?
You can get it cleanly from ffprobe directly using,
ffprobe -v 0 -select_streams a:0 -show_entries stream=bit_rate -of compact=p=0:nk=1 "$1"
Try using this command, the key is using -select_streams a:0 -show_entries stream=bit_rate
:
audioBitrate=$(ffprobe -v error -select_streams a:0 -show_entries stream=bit_rate -of default=noprint_wrappers=1:nokey=1 "$1")