Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
Lista Forumurilor Pe Tematici
Mrrrr's Forum (VIEW ONLY) | Reguli | Inregistrare | Login

POZE MRRRR'S FORUM (VIEW ONLY)

Nu sunteti logat.
Nou pe simpatie:
Cezi
Femeie
23 ani
Vaslui
cauta Barbat
23 - 80 ani
Mrrrr's Forum (VIEW ONLY) / Tutoriale si Ghiduri Utile // Tutorials and useful guides / [VIDEO] Find Out Total Number of Frames in Video with FFMPEG Moderat de TRaP, TonyTzu
Autor
Mesaj Pagini: 1
Mrrrr
AdMiN

Inregistrat: acum 17 ani
Postari: 2228
You need ffmpeg for this: or the latest build
To run the following command you must add the video to the same folder as ffmpeg, or you can refer to a path between " and ".

We are actually not going to use ffmpeg.exe for this, but another executable that comes with ffmpeg, called ffprobe.

1. Go to the folder containing ffmpeg.exe (eg. C:\ffmpeg\bin)

2. In the address bar, instead of the folder address type cmd and press enter to open a cmd window inside the ffmpeg\bin folder

3. Type the following command, replacing the video path with your own:

ffprobe -v error -count_frames -select_streams v:0 -show_entries stream=nb_read_frames -of default=nokey=1:noprint_wrappers=1 "D:\Location\input_video.mp4"

-v error: Suppresses all output except errors.
-count_frames: Counts the number of frames.
-select_streams v:0: Selects the first video stream.
-show_entries stream=nb_read_frames: Displays the number of frames read.
-of default=nokey=1:noprint_wrappers=1: Formats the output to just print the frame count.

Note: this can be done with ffmpeg directly, assuming that for some reason you do not have ffprobe, but it is slower and less efficient because it forces ffmpeg to process all frames in the video. Command is:
ffmpeg -i "D:\Location\input_video.mp4" -map 0:v:0 -c copy -f null - 2>&1 | grep "frame="


Source:
ChatGPT

Personal note:
If you don't need an exact frame rate only an approximate, you can calculate it manually assuming you know 2 things about the video: length and frames per second.
Eg. an 11 minutes 52 seconds video with a frame rate (fps) of 59.94 will result in an approximate number of 42677 frames:
(11 x 60 + 52) x 59.94 = 42677,28 frames


_______________________________________


pus acum 3 luni
   
Pagini: 1  

Mergi la