You can use ffprobe to get the frame number with the following commands
ffprobe.exe -i video_name -print_format json -loglevel fatal -show_streams -count_frames -select_streams v
which report to print data in json format
select_streams v will tell ffprobe just give us the video data of the stream, and if you delete it, it will also provide you with audio information
and the output will look like
{ "streams": [ { "index": 0, "codec_name": "mpeg4", "codec_long_name": "MPEG-4 part 2", "profile": "Simple Profile", "codec_type": "video", "codec_time_base": "1/25", "codec_tag_string": "mp4v", "codec_tag": "0x7634706d", "width": 640, "height": 480, "coded_width": 640, "coded_height": 480, "has_b_frames": 1, "sample_aspect_ratio": "1:1", "display_aspect_ratio": "4:3", "pix_fmt": "yuv420p", "level": 1, "chroma_location": "left", "refs": 1, "quarter_sample": "0", "divx_packed": "0", "r_frame_rate": "10/1", "avg_frame_rate": "10/1", "time_base": "1/3000", "start_pts": 0, "start_time": "0:00:00.000000", "duration_ts": 256500, "duration": "0:01:25.500000", "bit_rate": "261.816000 Kbit/s", "nb_frames": "855", "nb_read_frames": "855", "disposition": { "default": 1, "dub": 0, "original": 0, "comment": 0, "lyrics": 0, "karaoke": 0, "forced": 0, "hearing_impaired": 0, "visual_impaired": 0, "clean_effects": 0, "attached_pic": 0 }, "tags": { "creation_time": "2005-10-17 22:54:33", "language": "eng", "handler_name": "Apple Video Media Handler", "encoder": "3ivx D4 4.5.1" } } ] }
2. you can use
ffprobe -v error -show_format -show_streams video_name
which will give you stream data if you want selected information, such as frame rate, to use the following command
ffprobe -v error -select_streams v:0 -show_entries stream=avg_frame_rate -of default=noprint_wrappers=1:nokey=1 video_name
which give the numerical base of your video information, the problem is when you use this method, you may get an N/A result.
For more information check out this page. FFProbe Tips