iizukanao / picam

Audio/video recorder for Raspberry Pi with language agnostic API
GNU Lesser General Public License v2.1
490 stars 78 forks source link

Clean exit and restart #91

Open PiStreaming opened 6 years ago

PiStreaming commented 6 years ago

Hi - I'm using picam together with ffmpeg for streaming and am seeing an issue where picam isn't cleanly exiting and releasing the camera. I have both picam and ffmpeg setup as services under systemctl and if I stop picam, the only way to restart is to reboot the Pi.

The specific message is:
"error: failed to set camera to idle state Perhaps another program is using camera, otherwise you need to reboot this pi"

Is there a way to cleanly exit picam so that the camera gets set to idle and picam can be started again without rebooting? If not, is there a way to reset the camera that doesn't require a reboot?

Thanks - picam is an awesome tool!

fcaraballo commented 4 years ago

Same issue here! didn't have it before