I have a command I want to start a webcam to start to stream using vlc /cvlc on/after boot.

The command is:

cvlc -vvv v4l2:///dev/video0:chroma=mp2v :input-slave=alsa://hw:CARD=U0x46d0x825,DEV=0 :live-caching=500 --sout '#transcode{vcodec=mp2v,fps=30,acodec=mp3,ab=128,channels=1,samplerate=44100,scodec=none}:rtp{mux=ts,sdp=rtsp://:8888/live.sdp}'

So my question what is the right way to do it? Please note:

  • Should be run in background
  • No user login should be required
  • Vlc cannot run from "root" user

thank you very much!

  • "the right way to do it" depends on what "it" actually is which is unclear. The best approach would probably be to write a systemd service but this is generic Linux - not Pi specific. I would suggest you first work how to do "it" from the command line before attempting to start on boot.
    – Milliways
    Commented Oct 14, 2023 at 11:57


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.