linux-使用SOX和sox FAIL格式混合音频:无法打开输入文件`audio_recorded.wav’:WAVE:找不到RIFF标头
作者:互联网
我想在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代码:不再需要]
更新:我试图将我的录音机..set比特率和采样率修改为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时,它提示我文件没有相同的通道和比特率.
解决方法:
该文件可能没有标题.
您可以使用以下命令指定文件类型
-t <file-type>
这是手册页:
http://sox.sourceforge.net/sox.html
标签:sox,android-mediarecorder,linux 来源: https://codeday.me/bug/20191123/2065505.html