title: How to get the duration of any stream of a mp4 container with ffmpeg?
body: <p>I'm not sure, but the following command seems to do just that. Here I get the duration of the first audio stream of the mp4 file:</p>
  
  <pre><code>ffprobe -v error -select_streams a:0 -show_entries stream=duration -of default=noprint_wrappers=1:nokey=1 -i input.mp4
  </code></pre>
  
  <p>However, I'm looking for the equivalent with ffmpeg (if it exists). Your answer is equally valid if it's that it's not possible to do that with <code>ffmpeg</code>.</p>