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

PiCamera() does not work with hdmi off #120

Closed
ajaborsk opened this issue Jul 4, 2014 · 2 comments
Closed

PiCamera() does not work with hdmi off #120

ajaborsk opened this issue Jul 4, 2014 · 2 comments
Assignees
Labels
Milestone

Comments

@ajaborsk
Copy link

ajaborsk commented Jul 4, 2014

I'm using RPi without screen and on batteries, so I'd like to switch off hdmi to save some mW (tvservice -o). But if I do, PiCamera() does not initialize (complains about invalid camera preview format in preview port settings). raspistill works well in the same condition, but I can't tell if a preview is showed or not.

@waveform80
Copy link
Owner

Yup, confirmed - unfortunately this is not a combination I've ever tested before and there's no easy workaround at the moment other than enabling HDMI. I'll look into this and try to get it fixed for 1.6

@waveform80
Copy link
Owner

Okay - I know what the issue is here : picamera attempts to be friendly and sets its initial resolution to the display resolution which is determined with bcm_host.graphics_get_display_size. When HDMI is disabled this returns -1 (which we don't check), and leaves the resolution as 0x0 (which naturally fails when we try to configure the preview). I'll add a check for a -1 return code and default the res to something sensible like 720p in that circumstance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants