![]() Refer to the Media Info line in the output for the video stream in question: Media Info: Language "Undetermined (und)" - Type "vide:avc1" - 2525 samples MP4Box from gpac can show the number of frames: MP4Box -info input.mp4 ![]() The well known mediainfo tool can output the number of frames: mediainfo -Output="Video %FrameCount%" input.avi The presence of an edit list in MP4/M4V/M4A/MOV can affect your frame count. See Checking keyframe interval? MP4 Edit List See FFprobe Writers for info on other formats including JSON. In this case it hides the descriptions and only shows the value. show_entries stream=nb_read_packets Show only the entry for nb_read_frames. select_streams v:0 Select only the first video stream. count_frames Count the number of packets per stream and report it in the corresponding stream section. v error This hides "info" output (version info, etc) which makes parsing easier (but makes it harder if you ask for help since it hides important info). If you want to verify by counting frames change -count_packets to -count_frames and nb_read_packets to nb_read_frames. This actually counts packets instead of frames but it is much faster. show_entries stream=nb_read_packets -of csv=p=0 input.mp4 Ffprobe ffprobe -v error -select_streams v:0 -count_packets \
0 Comments
Leave a Reply. |