title: FFmpeg check audio channels for silence
body: <p>I have two <code>.mp4</code> files, both having 8 (7.1) audio channels. But in fact, I've been told that one has a <code>stereo</code> audio channel + 2 SAP (secondary audio on channels 7-8), and the other one has <code>6 (5.1)</code> audio channels + 2 SAP (on channels 7-8). So basically the later one has some [real] audio channels such as <code>Center</code> channel where that doesn't exist in the former stereo one (although it has those channels, but apparently they are silent/mute).</p>
  
  <p>I've been trying to see some differentiating metadata to somehow differentiate the two using <code>Mediainfo</code>, but the metadata for both look exactly the same. Also tried some basic metadata retrieval with <code>ffmpeg</code> and <code>ffprobe</code>, again they both look the same - no luck:</p>
  
  <pre><code>ffprobe -i 2ch.mp4 -show_streams -select_streams a:0
  </code></pre>
  
  <p>So the question is: Does <code>ffmpeg</code> or <code>ffprobe</code> have any quick ways to differentiate those two? Are there any audio filters that can detect if a specific audio channel is silent or not? Or any other differentiating metadata? I would prefer differentiating the two through some metadata than content analysis.</p>
  
  <p><a href="https://www.dropbox.com/s/kztbppid9ntpqot/2%20channel.mp4?dl=0" rel="nofollow noreferrer">This</a> is a sample of 2-channel <code>mp4</code> file, and <a href="https://www.dropbox.com/s/rh0flydwz3y5y2v/6%20channel.mp4?dl=0" rel="nofollow noreferrer">this</a> one is a sample of the 6-channel <code>mp4</code>.</p>