View FFmpeg version
ffmpeg -version
Get the total number of video frames
ffprobe -v error -count_frames -select_streams v:0 -show_entries stream=nb_read_frames -of default=nokey=1:noprint_wrappers=1 C:\abc.mp4
"C:\abc.mp4" at the end of the command is the local video path.
The output is:3816
Reference: Detailed explanation of the command
Get the last frame of the video (currently only one frame every 50 milliseconds, that is, 0.05 seconds, to output the picture)
ffmpeg -i C:\ds.mp4 -r 20 -f image2 C:\ds_image-%05d.jpeg
Among them, 20=1/0.05,
if you want to output the picture to a certain directory, you need to create a new folder in the C drive first, otherwise an error will be reported, and then execute the command.ffmpeg -i C:\ds.mp4 -r 20 -f image2 C:\ds\ds_image-%05d.jpeg
- To be added
xxx