问题描述
我正在尝试将一些.wav文件转换为.mp3格式
I am trying to convert few .wav files to .mp3 format
所需的.mp3格式为:
The desired .mp3 format is :
我尝试使用FFmpeg使用以下代码:
I tried with FFmpeg with this code :
ffmpeg -i input.wav -vn -ac 2 -b:a 160k output1.mp3
这是该命令以.wav格式输出的结果
This is the output of this command on one .wav format
我得到了结果,但是两件事不同整体比特率模式和写库
I am getting the result but two things are differentOverall bit rate mode and Writing library
- 写作库:LAME3.99.5与LAME3.100(我认为这不应该有什么问题吗?)
- 比特率模式恒定Vs变量
如何将比特率模式从变量更改为常量?我需要使用相同的写作库进行转换吗?
How to change bit rate mode from variable to Constant? and do I need to convert using the same Writing library?
谢谢!
推荐答案
使用 ffmpeg -i input.wav -vn -ac 2 -b:a 160k output1.mp3
的输出是恒定比特率,但是ffmpeg用标题Xing编写标题,并且Mediainfo推断出该标题以指示VBR.如果您想让Mediainfo检测恒定比特率,请禁用该标头的写入.
The output using ffmpeg -i input.wav -vn -ac 2 -b:a 160k output1.mp3
is constant bit rate, however ffmpeg writes a header with the title Xing and Mediainfo infers that to indicate VBR. Disable writing that header if you want Mediainfo to detect Constant bit rate.
ffmpeg -i input.wav -vn -ac 2 -b:a 160k -write_xing 0 output1.mp3
请注意,实际的MP3编码不会更改.
Note that the actual MP3 encoding won't change.
这篇关于MPEG音频恒定比特率转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!