hi, I am tring to convert cdda to mp3, but each time I get python error, said
core
dumped, could anyone figure out what's wrong in it?
operation system: winxp
pymedia version:1.3.5pre2
my code here:
tr=cdrom.open(i)
params= {
'id': 7,
'bitrate': 12800,
'sample_rate': 44100,
'channels': 2 }
outName= i + '.mp3'
f1 = open(outName, 'wb')
print params
enc= acodec.Encoder( params )
s = tr.read(CHUNK_SIZE)
while len(s):
try:
frames= enc.encode(s) <---wrong here, any problems?
f1.write( enc.mux( frames ) )
except ACodecError, Error:
print 'error process s'
s = tr.read(CHUNK_SIZE)
f1.write( enc.flush() )
tr.close()
f1.close()
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Pymedia-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pymedia-users