2

I've a some hundreds of video files in a folder structure. All of them have video and audio streams, but some of them don't have any sound, despite having an audio stream. Is there a way to find out those files without having to resort to opening each file individually.

Most ways I know only check if there is an audio stream.

Thanks.

RAVI
  • 53
  • 1
  • 6

1 Answers1

5

You can run the following in batch mode:

ffmpeg -hide_banner -i file.mp4 -af volumedetect -vn -f null - 2>&1 | grep mean_volume

The output for each file will be of the form

[Parsed_volumedetect_0 @ 0000000002b1e800] mean_volume: -17.2 dB

Perfect digital silence will have a value of -91 dB, but anything below, say, -40 dB is probably just tape noise. Test and verify a few inputs manually and set a value.

Gyan
  • 85,394
  • 9
  • 169
  • 201