Destroyer_
Posts: 6
Joined: Wed Nov 14, 2018 4:46 pm

Automatic VLC Stream start at Boot/Reboot

Fri Jan 11, 2019 7:21 pm

I have built with an Raspberry Pi a remote Webcam that streams that freed with VLC. I tried before starting the stream with Putty, but the command captures the console/terminal that means if I close the putty window the stream stops.
Stream command:

Code: Select all

$ sudo cvlc v4l2:///dev/video0:chroma=h264 cvlc --sout '#standard{access=http,mux=ts,dst=8080}' :demux=h264 --rt-priority
I tried let crontab start a script with the stream command in it.
script:

Code: Select all

#!/bin/sh
sudo cvlc v4l2:///dev/video0:chroma=h264 cvlc --sout '#standard{access=http,mux=ts,dst=8080}' :demux=h264 --rt-priority

Code: Select all

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

 /etc/init.d/CamStart.sh

exit 0
crontab -e:

Code: Select all

@reboot /etc/init.d/CamStart.sh/code]

Return to “Automation, sensing and robotics”