Open dipendra77 opened 3 years ago
A simple way can be call a bash script that get the v4l2rtspserver pid (ps -e | grep v4l2rtspserver | awk '{print $1}' and kill it ...
Hi,
There is a systemd script to start as a deamon. So you can use systemctl start v4l2rtspserver to start and systemctl stop v4l2rtspserver to stop it.
Using snap distribution allow to control start & stop using snap start/stop v4l2-rtspserver
Best Regards Michel
Another method is: pkill v4l2rtspserver
will kill the process (by name). Use pkill with caution.
v4l2rtspserver
will restart.
I simply added the following line to my user cron (crontab -e
) to start at boot.
@reboot /usr/local/bin/v4l2rtspserver
How do I stop and start an rtsp stream at will on raspberry Pi ? I am able to stream using the command line script, but I have a use case where I want to start and stop the rtsp stream from my python script running on the pi when I want. How do I achieve that ?
I am very new to this. ANy help or suggestion would be appreciated.
Thank you in advance.