AUDIO_FILE="./music.ogg"
AUDIO_DURATION=$(ffprobe -i $AUDIO_FILE -show_format -v quiet | sed -n 's/duration=//p')
AUDIO_DURATION=$(echo ${AUDIO_DURATION%.*})
最后一个行是去掉小数点,如果不用可以不去。[......]
AUDIO_FILE="./music.ogg"
AUDIO_DURATION=$(ffprobe -i $AUDIO_FILE -show_format -v quiet | sed -n 's/duration=//p')
AUDIO_DURATION=$(echo ${AUDIO_DURATION%.*})
最后一个行是去掉小数点,如果不用可以不去。[......]