Notes to Self

Alex Sokolsky's Notes on Computers and Programming

cvlc-streamer in a docker container

mjpg-streamer is great! Except:

VLC:

https://hub.docker.com/r/gersilex/cvlc

https://en.wikipedia.org/wiki/ONVIF

This proved to be a dead-end, decided to go with ffmpeg+mediamtx solution.

Identify capture formats supported

Identify the resolution and formats supported by the webcam:

v4l2-ctl -d /dev/video4 --list-formats-ext

Based on the above, one arrives at MJPG, 1280x720.

Opening a video capture device

To display webcam in default format:

cvlc v4l2:///dev/video0

You can be more specific:

vlc 'v4l2:///dev/video4:width=1920:height=1080:fps=30:chroma=MJPG'

and even specify metadata:

vlc --meta-title='Live Feed' \
    --meta-description='Straight from my desk' \
    'v4l2:///dev/video4:width=1920:height=1080:fps=15:chroma=H264:stereo=disabled:samplerate:44100'