ffmpeg batch converts mp4 to avi

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

@echo off & title
 
cd /d %~dp0

md result

for %%a in (*.mp4) do (
 
 ffmpeg -i "%%~sa" -y -q:v 1 "result\%%~na.avi"
 
)
 
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.

-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. Others

cd /d %~dp0 switches to the path where the current bat is located.

md result creates a folder named result, and the results processed by ffmpeg are saved in the result folder.

Guess you like

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