QuestionI have a Raspberry Pi zero 2 W setup, running with a camera. It works fine with the following config, taken from the example: However, I don't want the camera to stream when not requested. (It heats up the rPi and adds unwanted traffic to my network.) Does anyone have a working on-demand config that works for rpicamera? |
Replies: 3 comments 7 replies
|
I think I may try to solve this via the API; adding/deleting a path on demand... |
|
@suomi35 the Raspberry Pi camera can be enabled and disabled on-demand by using paths:
cam:
source: rpiCamera
sourceOnDemand: true
cam_with_audio:
runOnDemand: >
gst-launch-1.0
rtspclientsink name=s location=rtsp://localhost:$RTSP_PORT/cam_with_audio
rtspsrc location=rtsp://127.0.0.1:$RTSP_PORT/cam latency=0 ! rtph264depay ! s.
alsasrc device=hw:0 ! opusenc bitrate=16000 ! s.
runOnDemandRestart: yes
|
|
This discussion is being locked automatically because the last update was more than 2 years ago. Do not use the content of this discussion as reference since it's probably outdated! The official documentation is the only place in which you can find up-to-date answers. |

the second
runOnDemandmust berunOnDemandRestart: