尝试对录制的互联网广播流进行 ID3 标记失败

问题描述

我正在尝试标记我从网络电台录制的直播。 this method 使用 python3/requests 记录了流。现在我想通过 eyed3 或 mutagen 设置 ID3 标签(我会采用有效的方法)。这两种方法都失败了。问题是,如何让它发挥作用。 :-)

录制文件:recording.mp3

eye3d way

import eyed3

file = eyed3.load("recording.mp3")
file.initTag()

Traceback (most recent call last):
  File "<stdin>",line 1,in <module>
AttributeError: 'nonetype' object has no attribute 'initTag'

这是way it tried with mutagen

import mutagen
filePath="recording.mp3"
Meta = EasyID3(filePath)
Meta = mutagen.File(filePath,easy=True)
Traceback (most recent call last):
....
    raise HeaderNotFoundError("can't sync to MPEG frame")
mutagen.mp3.HeaderNotFoundError: can't sync to MPEG frame

我知道这些库无法将文件识别为 mp3 或无法获得 mime 类型。从技术上讲,它只是一个数据流。应该可以以某种方式告诉文件是 mp3 并成功初始化 id3 标签

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)