我正在尝试将多个 wav 文件合并为一个 mp3。我能想到的最简单的命令是:
/usr/bin/avconv \
-y \
-i input1.wav \
-i input2.wav \
-i input3.wav \
-i input4.wav \
-f mp3 -acodec libmp3lame -q:a 5 output.mp3
输出如下内容:
avconv version 9.18-6:9.18-0ubuntu0.14.04.1+fdkaac, Copyright (c) 2000-2014 the Libav developers
built on Apr 10 2015 23:18:58 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, wav, from 'input1.wav':
Metadata:
encoder : Lavf54.20.4
Duration: 00:00:05.03, bitrate: 1536 kb/s
Stream #0.0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Guessed Channel Layout for Input Stream #1.0 : stereo
Input #1, wav, from 'input2.wav':
Metadata:
encoder : Lavf54.20.4
Duration: 00:00:05.03, bitrate: 1536 kb/s
Stream #1.0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Guessed Channel Layout for Input Stream #2.0 : stereo
Input #2, wav, from 'input3.wav':
Metadata:
encoder : Lavf54.20.4
Duration: 00:00:05.03, bitrate: 1536 kb/s
Stream #2.0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Guessed Channel Layout for Input Stream #3.0 : stereo
Input #3, wav, from 'input4.wav':
Metadata:
encoder : Lavf54.20.4
Duration: 00:00:05.03, bitrate: 1536 kb/s
Stream #3.0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Output #0, mp3, to 'output.mp3':
Metadata:
TSSE : Lavf54.20.4
Stream #0.0: Audio: libmp3lame, 48000 Hz, stereo, s16p
Stream mapping:
Stream #0:0 -> #0:0 (pcm_s16le -> libmp3lame)
Press ctrl-c to stop encoding
size= 86kB time=5.04 bitrate= 139.3kbits/s
video:0kB audio:84kB global headers:0kB muxing overhead 2.479658%
它似乎识别了所有的输入,并且写入了输出,但是,仅output.mp3
包含了的内容input1.wav
。
如何将多个 wav 文件合并为一个 mp3 文件?
附言:我尝试了concat
功能[1],但它给出了相同的结果。