Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why so slow? #29

Closed
goncalopp opened this issue Apr 1, 2016 · 6 comments
Closed

Why so slow? #29

goncalopp opened this issue Apr 1, 2016 · 6 comments

Comments

@goncalopp
Copy link

Is there any reason for the backend code to be structured around writing to files? And also on a separate process?
For backends that don't need it (gtk, qt, ...?), it seems performance would be hundreds/thousands of times better if operations are done in memory.

@goncalopp
Copy link
Author

Example for gtk

px=gtkbuffer.get_pixels()
im= Image.frombytes('RGB', (width, height), px)

@ponty
Copy link
Owner

ponty commented Apr 14, 2016

The only reason is that the original code was only for files,
and it was easier just wrap all of them with the same function.
I don't plan now to reimplement with direct functions,
because I don't know the back-ends, I just wrapped existing code from others.
But any improvements as pull requests are welcome.

@ponty
Copy link
Owner

ponty commented Apr 14, 2016

Without separate process there was errors sometimes: #26 #27
I didn't find a better solution.

@ghost
Copy link

ghost commented May 4, 2016

Any hints to make capture screenshot in Linux as fast as possible? I would like to be able to process it in real time, so I need to captures at a high FPS.

@goncalopp
Copy link
Author

goncalopp commented May 5, 2016

@melonista I cobbled up something that was a bit faster, based in my previous comment but have since stopped working on it. I'll try to find it tomorrow and push to my fork

It might not be enough to give you "high" FPS, though, depending on your definition of high. I think I got a couple per second, IIRC less than 10

@ponty
Copy link
Owner

ponty commented May 5, 2016

Check the documentation for performance: http://pyscreenshot.readthedocs.io/en/latest/
You can get maybe 10 fps with pyscreenshot.
You may need a video recorder like Byzanz for better performance.

@ponty ponty closed this as completed Feb 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants