User avatar
Ay31415
Posts: 16
Joined: Mon Mar 04, 2013 2:24 pm

raspistill signal mode / close down after second SIGUSR1

Tue Jan 21, 2014 10:58 am

When I try raspistill in signal mode (option -s) it works fine for the first SIGUSR1 signal, but after the second SIGUSR1 signal raspistill also decide to "Closing down". I think this isn´t a feature but a bug, isn´t it?

Usage:

Code: Select all

raspistill -v -s -o test%04d.jpg
Output:

Code: Select all


raspistill Camera App v1.3.6

Width 2592, Height 1944, quality 85, filename test%04d.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 : Capture on signal

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
Waiting for SIGUSR1 to initiate capture
Received SIGUSR1
Opening output file test0001.jpg
Enabling encoder output port
Starting capture 1
Finished capture 1
Waiting for SIGUSR1 to initiate capture
Received SIGUSR1
Opening output file test0002.jpg
Enabling encoder output port
Starting capture 2
Finished capture 2
Closing down
Close down completed, all components disconnected, disabled and destroyed

Any hints using raspistill in signal mode for more than two times?

User avatar
Ay31415
Posts: 16
Joined: Mon Mar 04, 2013 2:24 pm

Re: raspistill signal mode / close down after second SIGUSR1

Tue Jan 21, 2014 11:09 am

...same procedure for "capture on keypress" mode but the unexpected "close down" occours sometimes after 2, 3 or 4 "press Enter to capture" events.

ethanol100
Posts: 648
Joined: Wed Oct 02, 2013 12:28 pm

Re: raspistill signal mode / close down after second SIGUSR1

Wed Jan 22, 2014 11:06 am

It works as expected. But you have not specified -t, it is set to 5s by default. raspistill will exit after 5s(or more precise after the first time it gets a signal/keypress after the timeout). You should set "-t 0" to disable this timeout.

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

Re: raspistill signal mode / close down after second SIGUSR1

Wed Jan 22, 2014 11:09 am

ethanol100 is right on the money. The reason it can go longer that 5s until you press/signal is that the time-out is only checked after each capture, so it will wait indefinitely for a signal/key, then realise it's time-out has been exceeded and stop straight away.

-t 0 is the right option, unless you want an overall time-out.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

User avatar
Ay31415
Posts: 16
Joined: Mon Mar 04, 2013 2:24 pm

Re: raspistill signal mode / close down after second SIGUSR1

Fri Jan 24, 2014 7:50 am

Thank you very much for the hint corresponding to the "-t 0" option!

Therefore I tried the "-t 0" option (together with the "-s" option).
But this doesn´t work as expected!

Code: Select all

raspistill -s -t 0 -o test.jpg
=> Capture method : Run forever
In this case raspistill produces many snapshots in an endless loop without delay. But it is not event driven (signal SIGUSR1, "-s").

Any further hints?

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

Re: raspistill signal mode / close down after second SIGUSR1

Fri Jan 24, 2014 8:53 am

Can you try with the -s and -t parameters the other way round?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

User avatar
Ay31415
Posts: 16
Joined: Mon Mar 04, 2013 2:24 pm

Re: raspistill signal mode / close down after second SIGUSR1

Fri Jan 24, 2014 9:44 am

I interchanged the order of "-t 0" and "-s" and tested it.

Code: Select all

raspistill -t 0 -s -o test.jpg
And signal driven event works now as expected! Y E A H :D

Thank you very much for your help!
Have a nice day.

Return to “Camera board”