At 12:34 PM 12/4/2006 -0800, Dmitry Borisov wrote:
>Can you try to isolate the bottleneck ?
>Just comment out the pymedia part and see how fast the PIL would be.
This is 13fps:
while time.clock()-t0<2:
im = im.resize((640, 480), Image.NEAREST)
im = im.resize((1024, 768), Image.NEAREST)
print 'frame', i, '\t', time.clock(), "\r",
This is 4.4fps: (!)
while time.clock()-t0<2:
im = ImageGrab.grab()
print 'frame', i, '\t', time.clock(), "\r",
This is 12.3fps:
while time.clock()-t0<2:
yuvFrame= vcodec.VFrame(vcodec.formats.PIX_FMT_RGB24, im.size,
(im.tostring(), None,None)).convert( vcodec.formats.PIX_FMT_YUV420P )
d = e.encode( yuvFrame )
fw.write( d )
print 'frame', i, '\t', time.clock(), "\r",
So it is mostly PIL grabbing the screen.
I note that it is also only my left (primary) monitor.
Has anyone used lower-level/faster full screen data capture?
Ray
-------------------------------------------------------------------------
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