I'm trying to get some better frame rate encoding for color 640x480; what
should I try next?
I know PIL's resize is a bit slow, but MPEG players won't accept 1024x768...
Thanks,
Ray
<SNIP>
fw= open( outFile, 'wb' )
while time.clock()-t0<2: ## one minute
# Create VFrame
im = ImageGrab.grab()
im = im.resize((640, 480), Image.NEAREST)
bmpFrame= vcodec.VFrame(
vcodec.formats.PIX_FMT_RGB24,
im.size,
(im.tostring(),
None,None))
yuvFrame= bmpFrame.convert( vcodec.formats.PIX_FMT_YUV420P )
d= e.encode( yuvFrame )
fw.write( d )
print 'frame', i, '\t', time.clock(), "\r",
i+= 1
print '\n%d frames ( %.2f fps )' % ( i, float( i )/ ( time.clock()- t0 ) )
fw.close()
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Pymedia-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pymedia-users