q1111
Posts: 5
Joined: Sun Dec 01, 2013 5:03 pm

raspivid & raspistill not working and freeze camera module

Mon Dec 30, 2013 3:03 am

equipment :
Model B Revision 2.0 (512 MB)
power supply: 5v, 2A (ipad1's)
camera module

problem:
When i run a command raspistill or raspivid, it just hangs.
The raspivistill returns a 0kb file.
The camera LED goes on, that stops working until a reboot.
Below is the command output.
How can i fix it?

Code: Select all

pi@raspberrypi ~ $ raspistill -o image.jpg -v

raspistill Camera App v1.3.5

Width 2592, Height 1944, quality 85, filename image.jpg
Time delay 5000, Raw no
Thumbnail enabled Yes, width 64, height 48, quality 35
Link to latest frame enabled  no
Full resolution preview No
Capture method : Single capture

Preview Yes, Full screen Yes
Preview window 0,0,1024,768
Opacity 255
Sharpness 0, Contrast 0, Brightness 50
Saturation 0, ISO 0, Video Stabilisation No, Exposure compensation 0
Exposure Mode 'auto', AWB Mode 'auto', Image Effect 'none'
Metering Mode 'average', Colour Effect Enabled No with U = 128, V = 128
Rotation 0, hflip No, vflip No
ROI x 0.000000, y 0.000000, w 1.000000 h 1.000000
Camera component done
Encoder component done
Starting component connection stage
Connecting camera preview port to video render.
Connecting camera stills port to encoder input port
Opening output file image.jpg
Enabling encoder output port
Starting capture 0

Code: Select all

pi@raspberrypi ~ $ raspivid -d -v

raspivid Camera App v1.3.7

Width 1920, Height 1080, filename (null)
bitrate 17000000, framerate 30, time delay 5000
H264 Profile high
H264 Quantisation level 0, Inline headers No
Wait method : Simple capture
Initial state 'record'


Preview Yes, Full screen Yes
Preview window 0,0,1024,768
Opacity 255
Sharpness 0, Contrast 0, Brightness 50
Saturation 0, ISO 0, Video Stabilisation No, Exposure compensation 0
Exposure Mode 'auto', AWB Mode 'auto', Image Effect 'none'
Metering Mode 'average', Colour Effect Enabled No with U = 128, V = 128
Rotation 0, hflip No, vflip No
ROI x 0.000000, y 0.000000, w 1.000000 h 1.000000
Camera component done
Encoder component done
Starting component connection stage
Connecting camera preview port to preview input port
Starting video preview
Connecting camera stills port to encoder input port
Enabling encoder output port
Running in demo mode
Closing down

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 32864
Joined: Sat Jul 30, 2011 7:41 pm

Re: raspivid & raspistill not working and freeze camera modu

Mon Dec 30, 2013 8:56 am

have you gone through all the troubleshooting stuff in other threads? Connections, software, power etc?
Principal Software Engineer at Raspberry Pi Ltd.
Working in the Applications Team.

q1111
Posts: 5
Joined: Sun Dec 01, 2013 5:03 pm

Re: raspivid & raspistill not working and freeze camera modu

Mon Dec 30, 2013 11:52 am

This is my situation

Step. 1: write the Raspberry Pi image (2013-12-20-wheezy-raspbian.zip)
Step. 2: enable camera
Step. 3: apt-get update && upgrade
Step. 4: rpi-update
Step. 5: run a command raspivid or raspistill
Step. 6: camera LED goes on, that stops working until a reboot.
nothing output

i have two raspberry pi (Model B Rev 2.0 512mb).
One is made in UK (a), the other one is made in China (b).
Camera module just can work on (b).

User avatar
mantekka
Posts: 43
Joined: Tue Jun 11, 2013 8:20 pm
Location: Ireland

Re: raspivid & raspistill not working and freeze camera modu

Mon Dec 30, 2013 3:05 pm

I'm having this same problem and it stops at the same place as you q1111.

I had it running a few months ago, then left it until yesterday. I updated everything and enabled the camera via raspi-config.
I tried 3 different power supplies to check that wasn't the issue.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 32864
Joined: Sat Jul 30, 2011 7:41 pm

Re: raspivid & raspistill not working and freeze camera modu

Mon Dec 30, 2013 5:09 pm

To the OP - are you saying the camera works fine on another PI?

The symptom described is that the camera is detected over the I2C, but when asked for frame data none is coming back - hence the lock. Indicating a problem with the CSI-2 connection.
Principal Software Engineer at Raspberry Pi Ltd.
Working in the Applications Team.

q1111
Posts: 5
Joined: Sun Dec 01, 2013 5:03 pm

Re: raspivid & raspistill not working and freeze camera modu

Mon Dec 30, 2013 6:11 pm

jamesh wrote:To the OP - are you saying the camera works fine on another PI?

The symptom described is that the camera is detected over the I2C, but when asked for frame data none is coming back - hence the lock. Indicating a problem with the CSI-2 connection.
Yes.
I have two pi, one is work well, another one doesn't work.

User avatar
g7ruh
Posts: 68
Joined: Mon Apr 23, 2012 9:49 am
Location: Blackfield UK

Re: raspivid & raspistill not working and freeze camera modu

Mon Dec 30, 2013 6:32 pm

q1111 wrote:
jamesh wrote:To the OP - are you saying the camera works fine on another PI?

The symptom described is that the camera is detected over the I2C, but when asked for frame data none is coming back - hence the lock. Indicating a problem with the CSI-2 connection.
Yes.
I have two pi, one is work well, another one doesn't work.

Have you changed and / or reseated the cables. They are a bit sensitive to being moved. I have had the same problem, always cured with carefully removing and reattaching cables. One problem I had was that the silver wires at the cable ends sometimes become lose and need carefully pushing back, or making them perfectly parallel to the others with e.g. a fingernail or small straight bladed screwdriver.

Just a thought
Roger

User avatar
DougieLawson
Posts: 42771
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK

Re: raspivid & raspistill not working and freeze camera modu

Tue Dec 31, 2013 11:06 am

If you're still getting freezes with raspistill could you try my updated version.
I've been running it every minute since 15:00 yesterday and haven't had a single freeze.

https://github.com/DougieLawson/RaspberryPi
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

dlivingstone
Posts: 17
Joined: Mon Dec 30, 2013 10:19 pm

Re: raspivid & raspistill not working and freeze camera modu

Wed Jan 01, 2014 4:14 pm

Same problem as OP - all worked yesterday, today I get the red light and nothing. Running raspistill with the -v option, the output is pretty much identical as far as I can see:

Code: Select all

pi@raspberrypi ~ $ raspistill -v -n -o test.jpg

raspistill Camera App v1.3.5

Width 2592, Height 1944, quality 85, filename test.jpg
Time delay 5000, Raw no
Thumbnail enabled Yes, width 64, height 48, quality 35
Link to latest frame enabled  no
Full resolution preview No
Capture method : Single capture

Preview No, Full screen Yes
Preview window 0,0,1024,768
Opacity 255
Sharpness 0, Contrast 0, Brightness 50
Saturation 0, ISO 0, Video Stabilisation No, Exposure compensation 0
Exposure Mode 'auto', AWB Mode 'auto', Image Effect 'none'
Metering Mode 'average', Colour Effect Enabled No with U = 128, V = 128
Rotation 0, hflip No, vflip No
ROI x 0.000000, y 0.000000, w 1.000000 h 1.000000
Camera component done
Encoder component done
Starting component connection stage
Connecting camera preview port to video render.
Connecting camera stills port to encoder input port
Opening output file test.jpg
Enabling encoder output port
Starting capture 0
Before using the camera for the first time yesterday I placed it in a housing, and it has been there ever since - so am assuming that cables at the camera end wont have worked loose. Have reseated the cable at the Pi end of things several times. Returned to raspi-config to check camera was enabled, etc.

I have seen other threads on this or similar issues, but no definitive solutions it seems...

dlivingstone
Posts: 17
Joined: Mon Dec 30, 2013 10:19 pm

Re: raspivid & raspistill not working and freeze camera modu

Wed Jan 01, 2014 5:36 pm

Well, I saw advice in a few places to try reseating the cables on the camera board. Touched radiator first of course to remove static.

Now I get:

Code: Select all

pi@raspberrypi ~ $ raspistill -v -o test.jpg

raspistill Camera App v1.3.5

Width 2592, Height 1944, quality 85, filename test.jpg
Time delay 5000, Raw no
Thumbnail enabled Yes, width 64, height 48, quality 35
Link to latest frame enabled  no
Full resolution preview No
Capture method : Single capture

Preview Yes, Full screen Yes
Preview window 0,0,1024,768
Opacity 255
Sharpness 0, Contrast 0, Brightness 50
Saturation 0, ISO 0, Video Stabilisation No, Exposure compensation 0
Exposure Mode 'auto', AWB Mode 'auto', Image Effect 'none'
Metering Mode 'average', Colour Effect Enabled No with U = 128, V = 128
Rotation 0, hflip No, vflip No
ROI x 0.000000, y 0.000000, w 1.000000 h 1.000000
mmal: mmal_vc_component_create: failed to create component 'vc.ril.camera' (1:ENOMEM)
mmal: mmal_component_create_core: could not create component 'vc.ril.camera' (1)
mmal: Failed to create camera component
mmal: main: Failed to create camera component
mmal: Camera is not detected. Please check carefully the camera module is installed correctly
If it wasn't killed by static before, it probably is now. Cant emphasise how disappointed I am with this.

User avatar
DougieLawson
Posts: 42771
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK

Re: raspivid & raspistill not working and freeze camera modu

Wed Jan 01, 2014 8:44 pm

Try sudo rpi-update & reboot

You're running V1.3.5 of raspistill, current foundation version is v1.3.6
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

dlivingstone
Posts: 17
Joined: Mon Dec 30, 2013 10:19 pm

Re: raspivid & raspistill not working and freeze camera modu

Wed Jan 01, 2014 10:39 pm

Cheers Dougie...
post Sherlock I thought I'd have another go... when reseating the sunny cable I hadn't pushed it in enough - did that and now it works.

at least I can rest easy... if a little frustrated that I don't have a clear idea of what actually went wrong in the first place.

User avatar
DougieLawson
Posts: 42771
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK

Re: raspivid & raspistill not working and freeze camera modu

Thu Jan 02, 2014 12:42 am

dlivingstone wrote:Cheers Dougie...
post Sherlock I thought I'd have another go... when reseating the sunny cable I hadn't pushed it in enough - did that and now it works.

at least I can rest easy... if a little frustrated that I don't have a clear idea of what actually went wrong in the first place.
That cable is a bit short so I got a 30cm one from http://www.ebay.co.uk/itm/-/121051772597
That one got re-seated in my RPi tonight.

The RPi is running a once a minute timelapse of our birdtable. Last couple of days it's only be the robin and the daddy blackbird visiting.
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

User avatar
mantekka
Posts: 43
Joined: Tue Jun 11, 2013 8:20 pm
Location: Ireland

Re: raspivid & raspistill not working and freeze camera modu

Thu Jan 02, 2014 10:20 pm

I ran an rpi-update and I'm up to version 1.3.6 now but still getting that error

Code: Select all

raspistill Camera App v1.3.6

Width 2592, Height 1944, quality 85, filename test.jpg
Time delay 5000, Raw no
Thumbnail enabled Yes, width 64, height 48, quality 35
Link to latest frame enabled  no
Full resolution preview No
Capture method : Single capture

Preview Yes, Full screen Yes
Preview window 0,0,1024,768
Opacity 255
Sharpness 0, Contrast 0, Brightness 50
Saturation 0, ISO 0, Video Stabilisation No, Exposure compensation 0
Exposure Mode 'auto', AWB Mode 'auto', Image Effect 'none'
Metering Mode 'average', Colour Effect Enabled No with U = 128, V = 128
Rotation 0, hflip No, vflip No
ROI x 0.000000, y 0.000000, w 1.000000 h 1.000000
Camera component done
Encoder component done
Starting component connection stage
Connecting camera preview port to video render.
Connecting camera stills port to encoder input port
Opening output file test.jpg
Enabling encoder output port
Starting capture 0
How would I install your version Dougie? Do I just back up the existing raspistill file and replace with yours?
Thanks

User avatar
DougieLawson
Posts: 42771
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK

Re: raspivid & raspistill not working and freeze camera modu

Thu Jan 02, 2014 10:40 pm

Use git clone https://github.com/dougielawson/RaspberryPi
to get a /home/pi/RaspberryPi directory and you should be able to run it from there
cd ~/RaspberryPi
./raspistill -options here as per normal

On my RPi I built it from the Foundation's ../userland git repo and their build process automatically installed it.

/usr/bin/raspistill is a symlink to /opt/vc/bin/raspistill

So you could rm that symlink and create a new one with
rm /usr/bin/raspistill
ln -s /home/pi/RaspberryPi/raspistill /usr/bin/raspistill

Then to revert to the standard version
rm /usr/bin/raspistill
ln -s /opt/vc/bin/raspistill /usr/bin/raspistill
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

User avatar
mantekka
Posts: 43
Joined: Tue Jun 11, 2013 8:20 pm
Location: Ireland

Re: raspivid & raspistill not working and freeze camera modu

Thu Jan 02, 2014 11:37 pm

Cheers Dougie,

I tried that but had a problem

Code: Select all

Cloning into 'RaspberryPi'...
Username for 'https://github.com': mantekka
Password for 'https://[email protected]': 
error: The requested URL returned error: 403 while accessing https://github.com/dougielawson/RaspberryPi/info/refs
fatal: HTTP request failed
I downloaded the zip instead from your github and FTPd over the raspistill file. Then tried to run it but got the following error

Code: Select all

raspistill Camera App v1.3.6

Width 2592, Height 1944, quality 85, filename test3.jpg
Time delay 5000, Raw no
Thumbnail enabled Yes, width 64, height 48, quality 35
Link to latest frame enabled  no
Full resolution preview No
Capture method : Single capture

Preview Yes, Full screen Yes
Preview window 0,0,1024,768
Opacity 255
Sharpness 0, Contrast 0, Brightness 50
Saturation 0, ISO 0, Video Stabilisation No, Exposure compensation 0
Exposure Mode 'auto', AWB Mode 'auto', Image Effect 'none'
Metering Mode 'average', Colour Effect Enabled No with U = 128, V = 128
Rotation 0, hflip No, vflip No
ROI x 0.000000, y 0.000000, w 1.000000 h 1.000000
I wonder might there be something wrong with the ribbon. I've removed and reset the ribbon a few times now and confident it's in correctly. But it may have been damaged as I have it a few months now. It doesn't look damaged however.

User avatar
DougieLawson
Posts: 42771
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK

Re: raspivid & raspistill not working and freeze camera modu

Thu Jan 02, 2014 11:45 pm

Sorry my fault. I don't even know my own Github URL
https://github.com/DougieLawson/RaspberryPi
it's case sensitive.
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6940
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: raspivid & raspistill not working and freeze camera modu

Fri Jan 03, 2014 12:01 am

There was a firmware fix today that could cause the camera initialisation to hang. Any better after rpi-update?

User avatar
mantekka
Posts: 43
Joined: Tue Jun 11, 2013 8:20 pm
Location: Ireland

Re: raspivid & raspistill not working and freeze camera modu

Fri Jan 03, 2014 12:07 am

Ahh yes, I missed that too.
Ok ran it there and get the same result.
I think I might try a fresh version of raspbian on my SD card and start from scratch.

Code: Select all

rstill Camera App v1.3.6(DGL)

Width 2592, Height 1944, quality 85, filename test3.jpg
Time delay 5000, Raw no
Thumbnail enabled Yes, width 64, height 48, quality 35
Link to latest frame enabled  no
Full resolution preview No
Capture method : Single capture

Preview Yes, Full screen Yes
Preview window 0,0,1024,768
Opacity 255
Sharpness 0, Contrast 0, Brightness 50
Saturation 0, ISO 0, Video Stabilisation No, Exposure compensation 0
Exposure Mode 'auto', AWB Mode 'auto', Image Effect 'none'
Metering Mode 'average', Colour Effect Enabled No with U = 128, V = 128
Rotation 0, hflip No, vflip No
ROI x 0.000000, y 0.000000, w 1.000000 h 1.000000


User avatar
DougieLawson
Posts: 42771
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK

Re: raspivid & raspistill not working and freeze camera modu

Fri Jan 03, 2014 12:12 am

dom wrote:There was a firmware fix today that could cause the camera initialisation to hang. Any better after rpi-update?
I'll get that now and leave my timelapse running over night.
If it doesn't work I'll build my modification into raspistill again.
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

User avatar
mantekka
Posts: 43
Joined: Tue Jun 11, 2013 8:20 pm
Location: Ireland

Re: raspivid & raspistill not working and freeze camera modu

Fri Jan 03, 2014 12:17 am

dom wrote:There was a firmware fix today that could cause the camera initialisation to hang. Any better after rpi-update?
Just ran it again and rebooted. It's still freezing at the same place (both in standard raspistill 1.3.6 and Dougie's DGL version)
Ending on the line:

Code: Select all

Starting capture 0

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 32864
Joined: Sat Jul 30, 2011 7:41 pm

Re: raspivid & raspistill not working and freeze camera modu

Fri Jan 03, 2014 9:40 am

That indicates no frames coming back from the camera. Usually a connection or power problem or a HW fault with either the camera or the interface on the Pi.
Principal Software Engineer at Raspberry Pi Ltd.
Working in the Applications Team.

User avatar
DougieLawson
Posts: 42771
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK

Re: raspivid & raspistill not working and freeze camera modu

Fri Jan 03, 2014 9:08 pm

The latest update (and a tweak to my USB WiFI parms) has solved all of my problems. I've been running it all day and haven't seen a single hang.

So a big THANK YOU to JamesH & Dom.
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 32864
Joined: Sat Jul 30, 2011 7:41 pm

Re: raspivid & raspistill not working and freeze camera modu

Fri Jan 03, 2014 10:36 pm

Actually, it was 6by9 who found an issue when developing the v4l2 driver that appears to have been there for ages, even in Raspistill/vid; but was only really coming to light with the latest NOOBS, which is a bit odd. Anyway, it may well fix a lot of these 'doesn't start up and checked everything' issues. Here's hoping, because I was completely unable to help as it never went wrong for me!
Principal Software Engineer at Raspberry Pi Ltd.
Working in the Applications Team.

User avatar
kelle62819
Posts: 11
Joined: Sat Dec 28, 2013 6:51 am
Location: St Jean de Boiseau, France

Re: raspivid & raspistill not working and freeze camera modu

Fri Jan 10, 2014 3:50 pm

I am getting the same hang. (light comes on and stays on, hanging after "Starting capture 0") Raspberry Pi was Xmas present and camera board is brand new. I've reseated the cable multiple times, rpi-update, apt-get update, apt-get upgrade, etc. Everything is the latest apparently and still isn't working. I have a 1.0 A power supply, only the camera connected, network by ethernet. ???

Return to “Camera board”