VLC command:
vlc v4l2:// :input-slave=alsa:// :v4l2-standard=1 :v4l2-dev=/dev/video0 :v4l2-width=1280 :v4l2-height=720 :sout="#transcode{vcodec=theo,vb=2000,acodec=vorb,ab=128,channels=2,samplerate=44100}:http{dst=:8081/webcam.ogg}" -I dummy
Source: https://bioinfoexpert.com/blog/2016/08/09/stream-audio-video-from-webcam-using-vlc/
One can also take screenshots of the stream by running:
Note: You have to manually kill this process afterwards to make it stop, because
--start-time=10 --stop-time=11(which is typically used for video stream length limiting) is meant for static videos not live streams.