User Tools

Site Tools


ffprobe:streams:get_the_number_of_available_streams

ffprobe - Streams - Get the number of available streams

ffprobe <input> -show_entries format=nb_streams -v 0 -of csv=p=0
 
or 
 
ffprobe <input> -show_entries format=nb_streams -v 0 -of compact=p=0:nk=1

NOTE: This can be filtered for only video or audio streams by adding -select_streams v or -select_streams a, respectively.

  • -v 0 only show fatal errors which could lead the process to crash, such as an assertion failure.
    • This hides “info” output (version info, etc) which makes parsing easier.
  • -show_entries format=nb_streams shows the number of streams.
  • -of csv=p=0 sets the output formatting. In this case it hides the descriptions and only shows the value.

References

ffprobe/streams/get_the_number_of_available_streams.txt · Last modified: 2025/01/12 20:51 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki