You are not logged in.

#1 2017-09-25 20:52:49

zulqurnain
Member
Registered: 2016-11-15
Posts: 18

Run Webcam via VLC without login via ssh, to eventually systemd it

Well...
I use webcam of computers that turn on or at constantly on. One feat was to enable an rtsp stream via vlc of the webcam without having a user logged in.
usually one would go, login in to their account hit the cvlc command to start stream, however since we are ssh'ing into the remote system we are met with a permission denied, so even after chmod -R 777 /dev/video0 you will still not be able to execute the command without CHOWN.
It took me a while to figure it out, but just in case anyone is interested.
Do all the right config for ssh'ing into the pc with the webcam you want to use
here is the important part
***
sudo chown -R <yourusername> /dev/video0

this will allow you to start a cvlc -vvv v4l2:///dev/video0 --sout '#transcode........
without having to sudo it and thus endangering  your system or having to go through vlc-wrapp

still havent tried but i will create a systemd unit activating the webcam on startup (i use /bin/bash script to activate the webcam so the rest is just technically linking)

Offline

Board footer

Powered by FluxBB