Use ffmpeg to convert m4a and wav files into MP3 format

To use ffmpeg to convert m4a and wav files into MP3 format, you can follow the steps below:

install ffmpeg

Make sure you have installed ffmpeg software. If it is not installed, please visit the official website of ffmpeg https://ffmpeg.org/ and follow the instructions to install it.

  • Win10 / Win11 can be wingetinstalled via the command
    Note that the premise has been installed in the Microsoft App Store应用安装程序

  • install command
winget install Gyan.FFmpeg
  • Installation process
# 搜索ffmpeg
C:\Users\wzd>winget search ffmpeg
名称                      ID                           版本        匹配            源
-----------------------------------------------------------------------------------------
FFmpeg                    Gyan.FFmpeg                  6.0                         winget
Wav2Bar                   Picorims.wav2bar             0.3.0       Tag: ffmpeg     winget
y2mp3                     moshfeu.y2mp3                2.5.9-alpha Tag: ffmpeg     winget
FFmpeg (Shared)           Gyan.FFmpeg.Shared           6.0         Tag: ffmpeg     winget
FFmpeg Batch AV Converter eibol.FFmpegBatchAVConverter 2.8.1                       winget
Videomass                 GianlucaPernigotto.Videomass 3.5.8       Tag: ffmpeg-gui winget

# 安装ffmpeg
C:\Users\wzd>winget install Gyan.FFmpeg
已找到 FFmpeg [Gyan.FFmpeg] 版本 6.0
此应用程序由其所有者授权给你。
Microsoft 对第三方程序包概不负责,也不向第三方程序包授予任何许可证。
已成功验证安装程序哈希
正在提取存档...
已成功提取存档
正在启动程序包安装...
添加了命令行别名: "ffmpeg"
添加了命令行别名: "ffplay"
添加了命令行别名: "ffprobe"
已修改路径环境变量;重启 shell 以使用新值。
已成功安装

use ffmpeg

Open Command Prompt (Windows) or Terminal (Mac and Linux) after the installation is complete.

In a command prompt or terminal, navigate to the directory where the M4a or Wav files are stored. You can use the "cd" command to navigate, for example:

   cd D:\sound\ring

Run the following command to convert the file to mp3 format:

   ffmpeg -i 输入文件.m4a 输出文件.mp3
   ffmpeg -i 输入文件.wav 输出文件.mp3

Among them, "input file.m4a" is the name of the M4A file you want to convert, and "output file.mp3" is the name of the MP3 file you want to generate. Please ensure that the input and output filenames are correct and append the appropriate file extension to the filename.

ffmpeg will start the conversion process and display the conversion progress on the command prompt or terminal. Once the conversion is complete, you will find the resulting MP3 file in the same directory, the conversion speed may depend on your computer performance and the size of the M4A file.

Conversion example:

insert image description here

  • Convert m4a and wav files to mp3 format
ffmpeg -i Cry_On_My_Shoulder.m4a Cry_On_My_Shoulder.mp3 
ffmpeg -i marimba-ringtone.wav marimba-ringtone.mp3

After the conversion is complete, we get two mp3 files, and the playback test is all normal
insert image description here

Supongo que te gusta

Origin blog.csdn.net/no1xium/article/details/132181270
Recomendado
Clasificación