ffprobe get bit depth from audio file

Viewed 1322

For one of my script I need to read out the bit depth of a wav file.

ffprobe -v error -show_entries format=bits_per_sample -of default=noprint_wrappers=1 test.wav

there is no output at all - I use this in the same way for the duration (format=duration) and it works fine.

1 Answers

Found the solution - the stream needs to be defined:

ffprobe -v error -select_streams a:0 -show_entries stream=bits_per_raw_sample -of default=noprint_wrappers=1:nokey=1
Related