get info about an audio file ffmpeg

C++
ffprobe foo.mp3 2>&1 | grep -A1 Duration:
Source

Also in C++: