我想在linux中使用SOX混合音频。这是我的剧本。 我是这个东西的初学者。
time sox --buffer 128000 --combine mix audio1.mp3 audio_recorded.wav -C 64.0 "./Mixed.mp3"
time ffmpeg -loglevel warning -i ./Output.wav -c:a libfdk_aac -b:a 64k -map 0:0 -f segment -segment_time 10 -segment_list ./Output.m3u8 -segment_format aac './stream%03d.aac'
cd ..
但结果是这样的..
sox FAIL formats: can't open input file `audio_recorded.wav': WAVE: RIFF header not found
real 0m0.003s
user 0m0.000s
sys 0m0.002s
audio_recorded.wav
是来自android的录制音频文件。
[删除ANDROID代码:不再需要]
更新:我试图修改我的录音机设置比率和采样率与audio1.mp3相同。 然后我试着混合它。这就是现在发生的事情:
[root@app complete]# bash test_mix.sh
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: recoverable MAD error
sox WARN mp3-util: recoverable MAD error
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: recoverable MAD error
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: recoverable MAD error
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: recoverable MAD error
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: recoverable MAD error
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: recoverable MAD error
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: recoverable MAD error
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: recoverable MAD error
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: recoverable MAD error
sox WARN mp3-util: recoverable MAD error
sox WARN mp3-util: recoverable MAD error
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: recoverable MAD error
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: recoverable MAD error
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: MAD lost sync
sox WARN mp3-util: MAD lost sync
sox FAIL formats: can't open input file `sound997309159.mp3':
real 0m0.005s
user 0m0.002s
sys 0m0.002s
我设置了录制的采样率和比特率,因为当我尝试在sox中混合它时,它提示我文件没有相同的通道和比特率。
答案 0 :(得分:3)