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.
- See FFprobe Writers for info on other formats including JSON.
References
ffprobe/streams/get_the_number_of_available_streams.txt · Last modified: 2025/01/12 20:51 by peter