gpt4 book ai didi

linux - 使用 SOX 混合音频,sox FAIL 格式 : can't open input file `audio_recorded.wav' : WAVE: RIFF header not found

转载 作者:IT王子 更新时间:2023-10-29 01:27:08 32 4
gpt4 key购买 nike

我想在 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 中混合它时,它提示我文件没有相同的 channel 和比特率。

最佳答案

可能文件没有标题。您可以使用

指定文件类型
-t <file-type>

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

关于linux - 使用 SOX 混合音频,sox FAIL 格式 : can't open input file `audio_recorded.wav' : WAVE: RIFF header not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17101852/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com