Because I do not know this device (elgato camlink), I asked in what mode it works, one of the possibilities is UVC. E.g. Avermedia Live Gamer Portable only works with Windows drivers, cannot run on Linux, recent generations use standard UVC drivers, so you can get the image.
And what the lsusb command shows and what is in dmesg after connecting elgato.
Because I do not know this device (elgato camlink), I asked in what mode it works, one of the possibilities is UVC. E.g. Avermedia Live Gamer Portable only works with Windows drivers, cannot run on Linux, recent generations use standard UVC drivers, so you can get the image.
And what the lsusb command shows and what is in dmesg after connecting elgato.
The Elgato Camlink works as a regular uvc webcam but it needs USB3 to work - the fswebcam says its 1280x720 but it does make 50 frames.
But what is important is to turn on the cam or conneched hdmi device is turned on after its connnected else it will not detect the Elgato.
The lsbusb will show
the Bus 002 Device 004: ID 0fd9:0061 Elgato Systems GmbH
But if the video camera is on you need to turn it off and then on again before you will be able to read anything using vlc player
on v4l2:///dev/video0 and when I do this the cpu load 66% but I may need something to cool the gpu even more but it does
read the input from the elgato usb3 - the rpi4 may need som ekstra cooling maybe.
I can test with fswebcam
fswebcam
--- Opening /dev/video0...
stat: No such file or directory
(HERE then turn off the camera and turn on again and it will show up as /dev/video0 and with hw 1,0 for audio)
pi@isp1:~ $ fswebcam
--- Opening /dev/video0...
Trying source module v4l2...
/dev/video0 opened.
No input was specified, using the first.
Adjusting resolution from 384x288 to 1280x720.
Error starting stream.
VIDIOC_STREAMON: No such file or directory
Unable to use mmap. Using read instead.
Unable to use read.
I am not really sure how to make the vlc stream out - I did try to steam with ffmpeg using udp the flowing did work
with a h264 acc encoded file
ffmpeg -y -i /home/pi/Videos/20190918Jyllingevej73.h264.mp4 \
-r 25 -vcodec h264_omx -b:v 3M -maxrate:v 4M -c:a aac -b:a 128k \
-filter:v scale=1920:1080 -crf 0 -tune zerolatency -preset ultrafast \
-f mpegts 'udp://192.168.10.100:9250'
But
ffmpeg -y -i /dev/video0 \
-r 25 -vcodec h264_omx -b:v 3M -maxrate:v 4M -c:a aac -b:a 128k \
-filter:v scale=1920:1080 -crf 0 -tune zerolatency -preset ultrafast \
-f mpegts 'udp://192.168.10.100:9250'
By the way the elgato camlink does work fine on my more powerfull ubunto computer with the OBS but it would be more cool to use
a raspberry pi 4 to stream maybe using udp ndi or rtmp out and it looks like vlc on rpi does read fine
Anyway
v4l2-compliance
v4l2-compliance SHA: not available, 32 bits
Compliance test for device /dev/video0:
Driver Info:
Driver name : uvcvideo
Card type : Cam Link: Cam Link
Bus info : usb-0000:01:00.0-2
Driver version : 4.19.66
Capabilities : 0x84a00001
Video Capture
Metadata Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
Media Driver Info:
Driver name : uvcvideo
Model : Cam Link: Cam Link
Serial :
Bus info : 2
Media version : 4.19.66
Hardware revision: 0x00000000 (0)
Driver version : 4.19.66
Interface Info:
ID : 0x03000002
Type : V4L Video
Entity Info:
ID : 0x00000001 (1)
Name : Cam Link: Cam Link
Function : V4L2 I/O
Flags : default
Pad 0x01000007 : 0: Sink
Link 0x0200000d: from remote pad 0x100000a of entity 'Processing 2': Data, Enabled, Immutable
Required ioctls:
test MC information (see 'Media Driver Info' above): OK
test VIDIOC_QUERYCAP: OK
Allow for multiple opens:
test second /dev/video0 open: OK
test VIDIOC_QUERYCAP: OK
test VIDIOC_G/S_PRIORITY: OK
test for unlimited opens: OK
Debug ioctls:
test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
test VIDIOC_LOG_STATUS: OK (Not Supported)
Input ioctls:
test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
test VIDIOC_ENUMAUDIO: OK (Not Supported)
fail: v4l2-test-input-output.cpp(377): invalid type
fail: v4l2-test-input-output.cpp(451): invalid attributes for input 0
test VIDIOC_G/S/ENUMINPUT: FAIL
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 0 Audio Inputs: 0 Tuners: 0
Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_ENUMAUDOUT: OK (Not Supported)
test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
test VIDIOC_G/S_AUDOUT: OK (Not Supported)
Outputs: 0 Audio Outputs: 0 Modulators: 0
Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
test VIDIOC_G/S_EDID: OK (Not Supported)
Control ioctls:
fail: v4l2-test-controls.cpp(251): missing control class for class 00980000
test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: FAIL
test VIDIOC_QUERYCTRL: OK
test VIDIOC_G/S_CTRL: OK
warn: v4l2-test-controls.cpp(704): g_ext_ctrls(0) invalid error_idx 0
fail: v4l2-test-controls.cpp(794): doioctl(node, VIDIOC_G_EXT_CTRLS, &ctrls)
test VIDIOC_G/S/TRY_EXT_CTRLS: FAIL
test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
Standard Controls: 4 Private Controls: 0
Format ioctls:
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
warn: v4l2-test-formats.cpp(1237): S_PARM is supported but doesn't report V4L2_CAP_TIMEPERFRAME
fail: v4l2-test-formats.cpp(1139): node->has_frmintervals && !cap->capability
test VIDIOC_G/S_PARM: FAIL
test VIDIOC_G_FBUF: OK (Not Supported)
test VIDIOC_G_FMT: OK
test VIDIOC_TRY_FMT: OK
test VIDIOC_S_FMT: OK
test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
test Cropping: OK (Not Supported)
test Composing: OK (Not Supported)
test Scaling: OK (Not Supported)
Codec ioctls:
test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
test VIDIOC_G_ENC_INDEX: OK (Not Supported)
test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)
Buffer ioctls:
fail: v4l2-test-buffers.cpp(485): check_0(reqbufs.reserved, sizeof(reqbufs.reserved))
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: FAIL
test VIDIOC_EXPBUF: OK
Total: 44, Succeeded: 39, Failed: 5, Warnings: 2
So I can get input from the usb3 now also with audio - so only need to restream it somehow ;) currently using standard
Raspbian Buster with desktop
I have a colling sink on the rp4 but maybe it needs a cooling fan ;)