Re: [Vnc2swf-users] MP3 problems in python
Status: Alpha
Brought to you by:
euske
From: <db...@br...> - 2005-10-16 16:12:16
|
I'm guessing that my MP3 files are in the wrong format as I see examples on the web from people successfully using the Python version of vnc2swf. I'm using audacity and exporting in the two formats they support (ID3 version 1, ID3 version 2). Can someone tell me how they are making their MP3 files? I see that I'm not supposed to use "variable bitrate" but I don't know if I am, or how t= o prevent it. Here's the output of an attempt at adding sound with ID3v2: $ python edit.py -o test-audio.swf -a test-2.mp3 test.swf Using pygame 1.6.2 Reading mp3 file: 'test-2.mp3'... read: [73, 68, 51, 4] : 'ID3=04' read: [0, 0, 0, 0] : '' Traceback (most recent call last): File "edit.py", line 173, in ? if __name__ =3D=3D "__main__": main(sys.argv[1:]) File "edit.py", line 126, in main info.reg_mp3blocks(fp) File "/home/dblank/Desktop/pyvnc2swf-0.6.4/movie.py", line 83, in reg_mp3blocks MP3Reader(self.mp3).read_mp3file(fp, length, nsamples, seeksamples) File "/home/dblank/Desktop/pyvnc2swf-0.6.4/mp3.py", line 153, in read_mp3file assert (h & 0xffe00000L) =3D=3D 0xffe00000L, '!Frame Sync: %r' % x AssertionError: !Frame Sync: '\x00\x00\x00\x00 The version ID3v1 seems to have about 418 bytes of \x00 on the front, which causes the same error above. mplayer plays both versions of my test files fine. Anyone have an idea what might be wrong? -Doug > It looks like the MP3 in Python isn't quite finished; is that correct? = I > have tried variations of different versions of MP3 and none work. It lo= oks > like the interface has changed too. > > I tried: > > python mp3.py file.mp3 > > but that had some confusion about what class was doing the reading. Als= o, > if you use file("filename") it doesn't open the file up in read binary > mode "rb" which I think you need. > > When I try to attach the mp3: > > python edit.py -d -a file.mp3 -C 800x600+0+0 -o ch-01-01b.swf file.swf > > I get errors on rates being equal to None, and looks like the MP3 isn't > initialized correctly. > > This is a very nice idea; it would be great to get this into a useable > state! I'd be glad to help with the interface once it works. > > Thanks, > > -Doug > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: > Power Architecture Resource Center: Free content, downloads, discussion= s, > and more. http://solutions.newsforge.com/ibmarch.tmpl > _______________________________________________ > Vnc2swf-users mailing list > Vnc...@li... > https://lists.sourceforge.net/lists/listinfo/vnc2swf-users > |