leosongwei / mutagen

Automatically exported from code.google.com/p/mutagen
GNU General Public License v2.0
0 stars 0 forks source link

Cannot read MP3 and AAC files #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

bradford:deAmarokization$ ./deAmarokization.py music.aac
Traceback (most recent call last):
  File "./deAmarokization.py", line 33, in <module>
    audio=MP4(filename)
  File "/usr/lib/python2.6/site-packages/mutagen/__init__.py", line 73, in
__init__
    self.load(filename, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/mutagen/mp4.py", line 652, in load
    try: self.info = MP4Info(atoms, fileobj)
  File "/usr/lib/python2.6/site-packages/mutagen/mp4.py", line 581, in __init__
    for trak in list(atoms["moov"].findall("trak")):
  File "/usr/lib/python2.6/site-packages/mutagen/mp4.py", line 177, in
__getitem__
    raise KeyError, "%s not found" % names[0]
mutagen.mp4.MP4StreamInfoError: 'moov not found'
bradford:deAmarokization$ ./deAmarokization.py music.mp3
Traceback (most recent call last):
  File "./deAmarokization.py", line 29, in <module>
    audio = ID3(filename)
  File "/usr/lib/python2.6/site-packages/mutagen/id3.py", line 74, in __init__
    super(ID3, self).__init__(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/mutagen/_util.py", line 103, in
__init__
    super(DictProxy, self).__init__(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/mutagen/__init__.py", line 37, in
__init__
    self.load(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/mutagen/id3.py", line 113, in load
    self.__load_header()
  File "/usr/lib/python2.6/site-packages/mutagen/id3.py", line 211, in
__load_header
    raise ID3NoHeaderError("'%s' doesn't start with an ID3 tag" % fn)
mutagen.id3.ID3NoHeaderError: 'music.mp3' doesn't start with an ID3 tag
bradford:deAmarokization$ 

Original issue reported on code.google.com by matej.c...@gmail.com on 19 Jul 2009 at 9:18

Attachments:

GoogleCodeExporter commented 9 years ago
The MP3 file is too big, so I posted it at
http://disk.jabbim.cz/ceplma@jabber.cz/music-goldberg.mp3

Original comment by matej.c...@gmail.com on 19 Jul 2009 at 9:34

GoogleCodeExporter commented 9 years ago
The MP3 does not contain an ID3 tag, so you cannot load it with mutagen.id3, 
which is
for loading ID3 tags. You should use mutagen.mp3.

The AAC file is not an MP4 file, it's just raw AAC audio with no container. 
I'll make
a new issue for a feature request to read these files, but all it will be able 
to do
is report length.

Original comment by joe.wreschnig@gmail.com on 20 Jul 2009 at 1:48

GoogleCodeExporter commented 9 years ago
I'm still getting: mutagen.mp4.MP4StreamInfoError: 'moov not found' with trunk.

Has this been fixed?
Is there any workaround?

Original comment by argent...@gmail.com on 12 Jan 2011 at 4:01

GoogleCodeExporter commented 9 years ago
Issue #15 is to support opening raw AAC files. It's a marginal feature since 
there's not much Mutagen can do to those files and they're not common. It's a 
metadata handling module, and raw AAC files have very little metadata - just 
length.

If you have a problem with a file that is not raw AAC, please open a new issue 
report and attach it.

Original comment by joe.wreschnig@gmail.com on 12 Jan 2011 at 5:28