ffmpeg extracts mp3 audio from video 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 (*.mp4) do (
 
 ffmpeg -i "%%~sa" -y -vn -acodec libmp3lame -aq 0 "%%~na.mp3"
 
)
 
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.

-acodec specifies the audio encoding format.

-aq 0, use lame level 0 compression quality.

Guess you like

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