使用 LAME 使用特定編解碼器將 .wav 轉換為 .mp3

使用 LAME 使用特定編解碼器將 .wav 轉換為 .mp3

我有兩個音訊文件,一個是 .mp3 格式(擴展名是 .wav 但文件是 .mp3 ),另一個是實際的 .wav 格式。我正在嘗試將實際的 .wav 格式轉換為與第一個 .mp3 檔案相同的格式。

第一個 .mp3 文件

General
Complete name                            : count.wav
Format                                   : MPEG Audio
File size                                : 183 KiB
Duration                                 : 9 s 360 ms
Overall bit rate mode                    : Constant
Overall bit rate                         : 160 kb/s
Writing library                          : LAME3.99.5
FileExtension_Invalid                    : m1a mpa mpa1 mp1 m2a mpa2 mp2 mp3

Audio
Format                                   : MPEG Audio
Format version                           : Version 1
Format profile                           : Layer 3
Format settings                          : Joint stereo / MS Stereo
Duration                                 : 9 s 360 ms
Bit rate mode                            : Constant
Bit rate                                 : 160 kb/s
Channel(s)                               : 2 channels
Sampling rate                            : 48.0 kHz
Frame rate                               : 41.667 FPS (1152 SPF)
Compression mode                         : Lossy
Stream size                              : 183 KiB (100%)
Writing library                          : LAME3.99.5

第二個 .wav 文件

General
Complete name                            : second_file.wav
Format                                   : Wave
File size                                : 1.41 MiB
Duration                                 : 15 s 445 ms
Overall bit rate mode                    : Constant
Overall bit rate                         : 768 kb/s

Audio
Format                                   : PCM
Format settings                          : Little / Signed
Codec ID                                 : 1
Duration                                 : 15 s 445 ms
Bit rate mode                            : Constant
Bit rate                                 : 768 kb/s
Channel(s)                               : 1 channel
Sampling rate                            : 48.0 kHz
Bit depth                                : 16 bits
Stream size                              : 1.41 MiB (100%)

我正在嘗試將第二個檔案轉換為第一種格式,所有編碼、位元和其他音訊功能與第一個音訊相同。

我的 LAME 版本是 3.100,有人建議您應該使用 LAME3.99.5,因為第一個音訊是使用該版本編寫的。我已經在我的 macOS 上安裝了 LAME3.99.5 並嘗試了以下命令:

lame -b 160 -h second_file.wav converted.mp3

輸出文件資訊:

General
Complete name                            : converted.mp3
Format                                   : MPEG Audio
File size                                : 303 KiB
Duration                                 : 15 s 480 ms
Overall bit rate mode                    : Constant
Overall bit rate                         : 160 kb/s
Writing library                          : LAME3.99r

Audio
Format                                   : MPEG Audio
Format version                           : Version 1
Format profile                           : Layer 3
Duration                                 : 15 s 480 ms
Bit rate mode                            : Constant
Bit rate                                 : 160 kb/s
Channel(s)                               : 1 channel
Sampling rate                            : 48.0 kHz
Frame rate                               : 41.667 FPS (1152 SPF)
Compression mode                         : Lossy
Stream size                              : 302 KiB (100%)
Writing library                          : LAME3.99r
Encoding settings                        : -m m -V 4 -q 2 -lowpass 20.5 -b 160

它與第一個文件完全相同還是我丟失了一些資訊並犯了任何錯誤?

我還嘗試使用 ffmpeg 將這兩個檔案轉換為 .mp3

General
Complete name                            : s1.mp3
Format                                   : MPEG Audio
File size                                : 147 KiB
Duration                                 : 9 s 384 ms
Overall bit rate mode                    : Variable
Overall bit rate                         : 128 kb/s
Writing library                          : LAME3.100

Audio
Format                                   : MPEG Audio
Format version                           : Version 1
Format profile                           : Layer 3
Format settings                          : Joint stereo / MS Stereo
Duration                                 : 9 s 384 ms
Bit rate mode                            : Variable
Bit rate                                 : 128 kb/s
Channel(s)                               : 2 channels
Sampling rate                            : 48.0 kHz
Frame rate                               : 41.667 FPS (1152 SPF)
Compression mode                         : Lossy
Stream size                              : 147 KiB (100%)
Writing library                          : LAME3.100

使用 ffmpeg 轉換後的第二個文件

General
Complete name                            : s2.mp3
Format                                   : MPEG Audio
File size                                : 121 KiB
Duration                                 : 15 s 480 ms
Overall bit rate mode                    : Variable
Overall bit rate                         : 64.0 kb/s
Writing library                          : Lavf58.29.100

Audio
Format                                   : MPEG Audio
Format version                           : Version 1
Format profile                           : Layer 3
Duration                                 : 15 s 480 ms
Bit rate mode                            : Variable
Bit rate                                 : 64.0 kb/s
Channel(s)                               : 1 channel
Sampling rate                            : 48.0 kHz
Frame rate                               : 41.667 FPS (1152 SPF)
Compression mode                         : Lossy
Stream size                              : 121 KiB (100%)

正如您所看到的,兩種音訊幾乎沒有什麼區別。如何將兩種音訊格式縮放為一種格式,其所有功能(位元率、取樣等)在兩者中應該是相同的。

相關內容