使用SOX,SOX混合audioFAIL格式:无法打开input文件audio_recorded.wav WAVE:找不到RIFF头

我想在Linux中使用SOX混合audio。 这是我的脚本。 我是这个东西的总初学者。

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的录制audio文件。

[已删除的Android代码:不再需要]

更新:我试图修改我的recorder..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 

我设置了采样率和比特率的logging,因为当我尝试在sox中混合,它促使我,文件没有相同的通道和比特率。

可能该文件没有标题。 您可以使用指定文件类型

 -t <file-type> 

这是手册页: http : //sox.sourceforge.net/sox.html