drumminhands_photobooth
drumminhands_photobooth copied to clipboard
Programm hangs at camera call
Thanks for this great script, Chris! I try to run the photobooth on a Raspi 3 with the original Pi camera module, and a Raspberry Pi 7" Touch screen Display with 800 x 480 px resolution.
But the drumminhands_photobooth.py
produces an error and stops after the 'Strike your pose' message.
The terminal shows:
Photo booth app running...
Get Ready
Taking pics
mmal: mmal_vc_port_info_set: failed to set port info (3:0): EINVAL
mmal: mmal_vc_port_set_format: mmal_vc_port_info_set failed 0x15af4c0 (EINVAL)
...
I was able to reproduce the error in the camera test file and found that the line which is meant to start a resized camera preview is failing (233):
camera.start_preview(resolution=(config.monitor_w, config.monitor_h))
Even if surpassing the config variables and entering the screen resolution directly, the line will fail to execute. I did not find any documentation about specifying the output resolution of the camera.
It works all fine if I just start the preview with a default camera.start_preview()
call. I guess when using a larger screen this might look rather coarse grained. It seems, I don't need that rescaling. But do you have any ideas what is causing the error?
I have the same error, did you manage to fix this?
I'm getting the same error as well... any luck on solving it? Extremely new to python :) thank you
i just hard coded the values for w & h and it worked
@seesix : You mean your line 233 now reads:
camera.start_preview(resolution=(800, 480))
right? This did not seem to work for my case. My fix was to leave it blank:
camera.start_preview()
(see fdschneider/drumminhands_photobooth@c993e8e0b443d6af7e3ada234deeddb396724268), wich worked fine. For me this issue is solved.
I worked past this line as well by removing the resolution parameter from the function. I eventually realized i could set the camera's resolution by typing : camera.resolution = ( my_cam_width, my_cam_height )
also i was trying to run this script using the Python 3 IDLE and it turns out it runs better in Python 2 IDLE
Did i mention i'm an utter noob at this?
Anyway, after the initial drag i was able to make it work and is now up an running! Thanks for sharing this with us :)