如何在Python中读取M4A文件?

发布于 2025-02-03 05:35:52 字数 448 浏览 5 评论 0原文

我尝试使用以下代码读取文件:

from pydub import AudioSegment
filename = "test.m4a"
audio = AudioSegment.from_file(filename)

这引发了以下错误:

[MOV,MP4,M4A,3GP,3G2,MJ2 @ 000001A101B24980]格式MOV,MP4,M4A,3GP,3GP,3G2,MJ2,MJ2仅检测到低分为1,可能误导!

[MOV,MP4,M4A,3GP,3G2,MJ2 @ 000001A101B24980] MOOV ATOM找不到

test.m4a:处理输入时发现的无效数据

将不胜感激!

I tried with the following code to read the file:

from pydub import AudioSegment
filename = "test.m4a"
audio = AudioSegment.from_file(filename)

This throwed the following error:

[mov,mp4,m4a,3gp,3g2,mj2 @ 000001a101b24980] Format mov,mp4,m4a,3gp,3g2,mj2 detected only with low score of 1, misdetection possible!

[mov,mp4,m4a,3gp,3g2,mj2 @ 000001a101b24980] moov atom not found

test.m4a: Invalid data found when processing input

Any help would be much appreciated!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

你与昨日 2025-02-10 05:35:52

我找到了解决方案。该文件被损坏,因此我更换了它,它起作用了!谢谢快速响应@RZLVMP和@hc_dev

I found the solution. The file was corrupted so I replaced it and it worked! Thank you the quick responses @rzlvmp and @hc_dev

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