[Vnc2swf-users] Res: edit.py rejects certain mp3
Status: Alpha
Brought to you by:
euske
From: Luis F. K. <lf...@ya...> - 2006-10-26 17:37:14
|
Well, I think that your file is not encoded in mpeg layer 3, but in layer 1= . Swf allows only mpeg layer 3! I know, your file extension is mp3 and it = probably plays on most mp3 players, but unfortunately it's not mpeg layer 3= . =0AI borrowed the following description of mp3 header from http://www.dv= .co.yu/mpgscript/mpeghdr.htm:=0A=0AHere is "graphical" presentation of the = header content. Characters =0Afrom A to M are used to indicate different fi= elds. In the table, you can see =0Adetails about the content of each field.= =0A=0A=0A=0AAAAAAAAA AAABBCCD EEEEFFGH IIJJKLMM=0A=0A=0A=0A=0A=0A=0A=0A=0A= SignLength=0A(bits)Position=0A(bits)Description=0A=0A=0A=0AA11(31-21)Frame = sync (all bits set)=0A=0A=0A=0AB2(20,19)MPEG Audio version ID=0A = =0A00 - MPEG Version 2.5=0A01 - reserved=0A10 - MPEG Version 2 (ISO/IEC 138= 18-3)=0A11 - MPEG Version 1 (ISO/IEC 11172-3)=0ANote: MPEG Version 2.5 is n= ot official standard. Bit No 20 in frame header =0Ais used to indicate vers= ion 2.5. Applications that do not support this MPEG version =0Aexpect this = bit always to be set, meaning that frame sync (A) is twelve bits long, =0An= ot eleve as stated here. Accordingly, B is one bit long (represents only bi= t =0ANo 19). I recommend using methodology presented here, since this allow= s you to =0Adistinguish all three versions and keep full compatibility.=0A= =0A=0A=0A=0AC2(18,17)=0ALayer description=0A =0A00 - reserved=0A= =0A01 - Layer III=0A=0A10 - Layer II=0A=0A11 - Layer I=0A=0A=0A=0AD1(16)=0A= Protection bit=0A =0A0 - Protected by CRC (16bit crc follows heade= r)=0A=0A1 - Not protected=0A=0A=0A=0A=0A----- Mensagem original ----=0ADe: = Andy Leszczynski <les...@ya...>=0APara: vnc...@li...urce= forge.net=0AEnviadas: Quinta-feira, 26 de Outubro de 2006 13:11:07=0AAssunt= o: [Vnc2swf-users] edit.py rejects certain mp3=0A=0AHi,=0AI see following c= rash:=0A=0A$ python24 edit.py -c -t shape -s 0.75 -a t10_000.swf.mp3 -o abc= t10_000.swf=0AUsing pygame 1.7.1release=0AUsing pymedia 1.3.7.0=0AReading = mp3 file: t10_000.swf.mp3...=0ATraceback (most recent call last):=0A File = "edit.py", line 234, in ?=0A if __name__ =3D=3D "__main__": main(sys.arg= v[1:])=0A File "edit.py", line 155, in main=0A info.reg_mp3blocks(fp)= =0A File "d:\src_mirror\pyvnc2swf-0.8.2al\movie.py", line 106, in reg_mp3b= locks=0A MP3Reader(self.mp3).read_mp3file(fp, length, nsamples, seeksamp= les)=0A File "d:\src_mirror\pyvnc2swf-0.8.2al\mp3.py", line 174, in read_m= p3file=0A assert (h & 0x00060000L) =3D=3D 0x00020000L, '!Layer3'=0AAsser= tionError: !Layer3=0A=0A=0ACloser look reveals that (h & 0x00060000L) is eq= ual to '0x00060000L', not desired '0x00020000L'.=0A=0AI have to admit I fir= st time in life see mp3 code so any insight or clue would be desired :-).= =0A=0A=0AFor the record: my current work around it to lame(unlame(it)).=0A= =0AThx in advance,=0A-- =0Aalf=0A=0A=0A=0A=0A=0A=0A------------------------= -------------------------------------------------=0AUsing Tomcat but need t= o do more? Need to support web services, security?=0AGet stuff done quickly= with pre-integrated technology to make your job easier=0ADownload IBM WebS= phere Application Server v.1.0.1 based on Apache Geronimo=0Ahttp://sel.as-u= s.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D121642=0A_______= ________________________________________=0AVnc2swf-users mailing list=0AVnc= 2sw...@li...=0Ahttps://lists.sourceforge.net/lists/list= info/vnc2swf-users=0A=0A=0A=0A=0A=0A=0A=0A=09=0A=0A=0A=0A=09=0A=09=09=0A___= ____________________________________________________ =0AVoc=EA quer respost= as para suas perguntas? Ou voc=EA sabe muito e quer compartilhar seu conhec= imento? Experimente o Yahoo! Respostas !=0Ahttp://br.answers.yahoo.com/ |