ffmpeg batch splits videos into pictures

1. Create a new txt file, copy the following code into it, and save it.

@echo off & title
 
cd /d %~dp0
 
for %%a in (*.mp4) do (
 
 ffmpeg -i "%%~sa" -y -q:v 1 "result\%%~na_%%06d.jpg"
 
)
 
pause

2. Change the file suffix to bat.

3. Place the file with the suffix bat into the video folder to be batch processed.

4. Make sure that ffmpeg is installed, double-click the bat file to execute it.

5. Parameter description:

-i input file, here refers to the video file.

-y means to directly overwrite the output file (if there is an original file) without asking.

-f specifies the format of the output video.

-q:v 1 q is the quality, v is the video, the value range of v is [1, 35], when the value is 1, it corresponds to the best video quality.

6. Note: The pictures will be stored in the result folder in the folder where bat is located. The naming format is: video name_000001.jpg, video name_000002.jpg, video name_000003.jpg... In this way, press the video frame in sequence proceed in sequence.

Guess you like

Origin blog.csdn.net/mj412828668/article/details/122786189