文件未使用 ffmpeg 从 mp3 转换为 wav

发布于 2025-01-12 19:17:08 字数 271 浏览 5 评论 0原文

您好,我正在将一些音频文件从 .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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

音栖息无 2025-01-19 19:17:08

我浏览了代码,确实发现有一行代码:

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文