Sample Header Ad - 728x90

How to receive "v4l2-ctl --stream-to-host" stream from a machine on the same LAN on said host for use with, e.g., video conferencing software?

3 votes
0 answers
3165 views
There is an example that streams a webcam to another computer by piping a V4L2 stream into netcat (v4l2-ctl --stream-to - | nc ), and this works, but it feels redundant when v4l2-ctl --stream-to-host [:] exists. I was able to capture and display the --stream-to-host stream via qvidcap -p as described in the v4l2-ctl man page example section , but am stumped when trying to pipe it into v4l2-loopback (via FFmpeg) for use with video conferencing software on the receiving machine. I have tried various combinations of parameters to v4l2-ctl, including --stream-from-host, --stream-loop, --stream-poll and --stream-mmap, but v4l2-ctl --help-all is too terse for me. Ironically, I was able to receive a stream (albeit garbled beyond recognition) when receiving with netcat and piping it to ffmpeg (nc -l | ffmpeg -f v4l2 /dev/video0. How can I make an incoming stream created via v4l2-ctl --stream-mmap --stream-to-host [:] available to video conferencing software via v4l2-loopback?
Asked by Alex (131 rep)
Feb 13, 2022, 12:41 AM