文件未使用 ffmpeg 从 mp3 转换为 wav
您好,我正在将一些音频文件从 .mp3 格式转换为 .wav。某些音频文件正在转换,而某些文件则未转换。
我使用的代码是:
sp.call(['ffmpeg', '-i', downloadPath2, '-ar', '8000', '-ac', '1',
AUDIOPATH +'/'+ call + '-out.wav'], stdout=FNULL, stderr=sp.STDOUT)
任何人都可以建议为什么某些文件没有转换为 .wav?
Hi I am converting some audio files from .mp3 format to .wav. Some audio files are getting converted whereas some files are not getting converted.
The code I am using is:
sp.call(['ffmpeg', '-i', downloadPath2, '-ar', '8000', '-ac', '1',
AUDIOPATH +'/'+ call + '-out.wav'], stdout=FNULL, stderr=sp.STDOUT)
Can anyone suggest why some files are not getting converted to .wav?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我浏览了代码,确实发现有一行代码:
sp.call(['rm', AUDIOPATH + call + '-out.wav'], stdout=FNULL, stderr=sp.STDOUT
)上面一行的音频已转换为所有音频文件。但我仍然不明白为什么有些音频文件被转换,而另一些则没有。如果我遇到解决方案,我会将其发布在此板上。
I went through the code and did find that there was a line of code:
sp.call(['rm', AUDIOPATH + call + '-out.wav'], stdout=FNULL, stderr=sp.STDOUT)
On commenting the above line the audio was converted for all audio files.But still I am yet to figure out why some audio files were converted whereas others were not.In case I come across the solution I will be posting it on this board.