question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hello, I just bought 5 megapixel OV5647 camera, and enable it through raspi-config the camera works well with raspistill and raspivid utilities and takes images and videos well, but when I use the picamera module to capture pictures it shows me an error after capture command:

#!/usr/bin/python from time import sleep from picamera import PiCamera

camera = PiCamera() camera.resolution = (1024, 768) camera.start_preview() sleep(2) camera.capture(‘foo.jpg’)

Traceback (most recent call last): File "./test-camera1.py", line 11, in <module> camera.capture('foo.jpg') File "/usr/local/lib/python2.7/dist-packages/picamera/camera.py", line 1423, in capture 'Timed out waiting for capture to end') picamera.exc.PiCameraRuntimeError: Timed out waiting for capture to end

I’m stuck on this step with picamera module, please help, thanks

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
Patatamancommented, Nov 10, 2017

I have mostly the same problem with the Camera V2 on Python2.7 and Raspberry Pi 3. raspistill works perfectly, but when I try the simplest code with PiCamera, it’s always a timeout.

The script is this (the same in the docs):

from time import sleep
from picamera import PiCamera

camera = PiCamera()
camera.resolution = (1024, 768)
camera.start_preview()
# Camera warm-up time
sleep(2)
camera.capture('foo.jpg')

And I have the 1.13 version installed. I tried with bigger sleeps (5 and 10 secs), but same result.

EDIT: I can’t capture a photo but I can record a video. ¯_(ツ)_/¯

EDIT 2: Solved using the argument “use_video_port” with True. Any way, I still think this isn’t the right way to do it, but at least it work :_)

camera = PiCamera()
camera.resolution = (1024, 768)
camera.capture('foo.jpg', use_video_port=True)
0reactions
RognanCrcommented, Oct 29, 2018

Ok, update.

So i’ve bought official picamera V2 and it’s working how it supposed to.

I’ve read about people having the same issue. No solution works. Most people don’t specify the type of the camera so it is hard to tell which type does not work (in my case “RPi Camera (D) 5Mpix REV 2.1 (Waveshare 11297)”).

Of Course it only matters if you want to use still_port through this python interfaces.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Video Capture Stop Timeout message - Microsoft Community
Video Capture Stop Timeout message. I cannot use my video camera. It states 0xA00F4294<Videocaputrestoptimeout> I've searched for ...
Read more >
NxLib API > Commands > Capture > Parameters > Timeout
The timeout for the capture operation. This is meant to be used when waiting for a hardware trigger signal.
Read more >
Timeout values for image capture - 1st Vision
Parameter Wait Image capture mode Function returns Timeout for subseq... IS_DONT_WAIT Hardware trigger When command completed*4 API default or user... IS_WAIT Hardware trigger When 1st...
Read more >
How to Fix Photo Capture Start Timeout Camera Error ...
How to Fix Photo Capture Start Timeout Camera Error 0xa004292 in Windows 11 and Windows 10How to,webcam error in laptop,how to fix camera ......
Read more >
Capture output from subprocess with a timeout set
I would like to add a timeout, but still capture any output sent to stdout/stderr before the timeout goes off.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found