ffprobe -v error -count_frames -select_streams v:0 -show_entries stream=nb_read_frames -of csv=p=0 input.mp4

Category: Media & Conversion

ffprobe -v error -count_frames -select_streams v:0 -show_entries stream=nb_read_frames -of csv=p=0 input.mp4

Count frames by decoding the video

Counts the video's frames by decoding the whole stream, so it takes about as long as playback. -count_frames enables counting and nb_read_frames reports the total. Slower than reading the duration but exact.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.