ffmpeg removes audio from videos in batches

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

@echo off & title
 
cd /d %~dp0
 
for %%a in (*.ts) do (
 
 ffmpeg -i "%%~sa" -y -f mp4 -an -codec copy -q:v 1 "%%~na.mp4"
 
)
 
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.

-an means remove audio.

-codec A coder/decoder name or a specific value "copy" (for output only).

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

Guess you like

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