Question / Help Elgato CamLink and Linux

DJuego

New Member
Hi! Here a newcomer.
First: Open Broadcaster Software is an amazing project! It is comparable to VLC or Blender (IMHO). Thank you for this! :-)

Second: I am interested in the Elgato CamLink device. But, has it been tested in Linux? Is there a driver compatible? Does anyone have direct experience using the Elgato CamLink in Linux? Does anyone have direct experience using the Elgato CamLink in general?

On the other hand. Do you know any device equivalent to Elgato CamLink? (webcam stream HDMI to PC. Compatible with OBS and OpenCV. Linux...) Any recommendation?

Thank you in advance!

DJuego
 

Filip S

Member
Camlink is working fine - but check you have usb3 ;) To bad the elgato HD60 does not work - but Camlink is working as it works as a regular webcam.
 

DJuego

New Member
Filip S

Thank you for your unexpected answer! It is encouraging. I have bought the CamLink and I have USB 3.

The operation in Microsoft Windows 10 x64 seems very satisfactory with OBS and OpenCV, too. Happy!

But I have not tested Linux yet. In what distribution have you successfully tried? Did you have to do something special to make it work?

Thanks!

DJuego
 

Filip S

Member
Filip S

Thank you for your unexpected answer! It is encouraging. I have bought the CamLink and I have USB 3.

The operation in Microsoft Windows 10 x64 seems very satisfactory with OBS and OpenCV, too. Happy!

But I have not tested Linux yet. In what distribution have you successfully tried? Did you have to do something special to make it work?

Thanks!

DJuego

Also maybe it only do 1280x720 - I am not really sure but his what it logs
info: v4l2-input: Start capture from
error: v4l2-input: Unable to open device
error: v4l2-input: Initialization failed
info: User added source 'mincamlink' (v4l2_input) to scene 'Scene'
info: v4l2-input: Found device 'Cam Link: Cam Link' at /dev/video0
info: v4l2-input: Found input 'HDMI' (Index 0)
info: v4l2-input: Pixelformat: YUYV 4:2:2 (available)
info: v4l2-input: Pixelformat: RGB3 (Emulated) (unavailable)
info: v4l2-input: Pixelformat: BGR3 (Emulated) (unavailable)
info: v4l2-input: Pixelformat: YU12 (Emulated) (available)
info: v4l2-input: Pixelformat: YV12 (Emulated) (available)
info: v4l2-input: Stepwise and Continuous framesizes are currently hardcoded
info: v4l2-input: Stepwise and Continuous framerates are currently hardcoded
info: v4l2-input: Pixelformat: YUYV 4:2:2 (available)
info: v4l2-input: Pixelformat: RGB3 (Emulated) (unavailable)
info: v4l2-input: Pixelformat: BGR3 (Emulated) (unavailable)
info: v4l2-input: Pixelformat: YU12 (Emulated) (available)
info: v4l2-input: Pixelformat: YV12 (Emulated) (available)
info: v4l2-input: Stepwise and Continuous framesizes are currently hardcoded
info: v4l2-input: Stepwise and Continuous framerates are currently hardcoded
info: v4l2-input: Start capture from /dev/video0
info: v4l2-input: Input: 0
info: v4l2-input: Stepwise and Continuous framerates are currently hardcoded
info: v4l2-input: Resolution: 1280x720
info: v4l2-input: Pixelformat: VYUY
info: v4l2-input: Linesize: 2560 Bytes
info: v4l2-input: Framerate: 50,00 fps

I am currently trying to use ffmpeg to make a rtmp stream or maybe udp - make its impossible to make it work om my Raspberry 3 B+ with only usb3 but Camlink is working on my Ubunto with OBS from flathub.org - as it s working with my h264_env compression on GPU
 

Filip S

Member
I would like to use ffmpeg to use some protocol udp/rtmp on my raspberry to work - now when OBS is not available on the raspberry but I am not really sure if its possible on that hardware and that Linux ;) so maybe it to much to say it just works on linux but using usb3 it does not need a special driver. Maybe other capture cards are maybe more easy - I dont need 30 frames here only 25 frames.

Ubunto 18.04 LTS with Intel® Core™ i7 CPU 920 @ 2.67GHz × 8 and GeForce GTX 670/PCIe/SSE2
 

torreyl

New Member
I am trying to get the Elgato CamLink to work under Linux...

However, in OBS, I don't see any video.

As a debugging step, I tried using VLC to show the video capture from the CamLink. When I run VLC->Media->Open Capture Device...->/dev/video0 I get this error message:

v4l2 demux error: unknown input tuning type 0

I see that @Filip S got something working. Filip any pointers?
 

Filip S

Member
I am trying to get the Elgato CamLink to work under Linux...

However, in OBS, I don't see any video.

As a debugging step, I tried using VLC to show the video capture from the CamLink. When I run VLC->Media->Open Capture Device...->/dev/video0 I get this error message:

v4l2 demux error: unknown input tuning type 0

I see that @Filip S got something working. Filip any pointers?

I have a old version of Elgato Camlink and it shows up with lsusb as
Bus 002 Device 004: ID 0fd9:0061 Elgato Systems GmbH but this does not make til /dev/video0 device work.
Here I have to turn off the videocamera and on again after a rpi4 boot else I dont have a /dev/video0 device
I can read from via the usb3 connection - I don't if I can force the Camlink to do this by software but its
possible it need some type of initialization from the hdmi input.

I cant say if this is all models/version of camlink that do this but this is working for me with udp multicast or unicast
ip adresses

ffmpeg -f alsa -ac 2 -i hw:1,0 -i /dev/video0 \
-acodec aac -b:a 128k -ar 48000 \
-r 25 \
-b:v 4M -maxrate:v 4M -bufsize 4M\
-crf 0 \
-tune zerolatency \
-preset ultrafast \
-f mpegts 'udp://224.0.0.1:9250'

Maybe if your network dont linke multicast try unicast like 192.168.x.x:9250 and on another Linux I can use vlc udp://@:9250


v4l2-ctl --info
Driver Info:
Driver name : uvcvideo
Card type : Cam Link: Cam Link
Bus info : usb-0000:01:00.0-2
Driver version : 4.19.75
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.75
Hardware revision: 0x00000000 (0)
Driver version : 4.19.75
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


The RPI4 is getting hot even with heat sink 86 degress - but anyway if you run the ffmpeg when camlink is not ready
it will fail so try again and it did work.
 

Filip S

Member
assigning a usb device to a name like camlink0 for the captures card
making a file in /etc/udev/rules.d/99-mycamlink.rules
ATTRS{ID_SERIAL}=="413675810", SYMLINK+="camlink0"

But it does not also handle the -i hw:1,0 how can get the pcm inkluded also ?

if I plugin the -f alsa -ac 2 -i hw:1,0 -i /dev/video0 camlink in another usb3 port ?

I am not sure if you know what would like to assign with rules ;)
 

Filip S

Member
Filip S

Thank you for your unexpected answer! It is encouraging. I have bought the CamLink and I have USB 3.

The operation in Microsoft Windows 10 x64 seems very satisfactory with OBS and OpenCV, too. Happy!

But I have not tested Linux yet. In what distribution have you successfully tried? Did you have to do something special to make it work?

Thanks!

DJuego

I am running ubunto 18.04 and also the current debian boxer on the raspberry rpi4 - You HAVE to have USB 3 superspeed on the computer with Linux.
 

Filip S

Member
My RPI4 is running fine with the ffmpeg udp streaming and camlink - it have been doing udp streaming for about 4 hours to my other linux box
and the load is not a problem with 1280x720 using mpeg2video (yuv422p) or h264_omx (yuv420p) I am happy.

I have more things I would like to try and that I am unsure about and that is the map setup for the streams for the camera
audio but this what is working for me:

OBS_DEST="-f mpegts udp://192.168.10.100:9250"
Videocodec="h264_omx"
# Videocodec="mpeg2video"

printf "\n--- Start Transmission\n"
ffmpeg -hide_banner -f alsa -ac 2 -i hw:1,0 -i /dev/video0 -vcodec $Videocodec \
-acodec aac -b:a 128k -ar 48000 \
-r 25 \
-qmin 2 -qmax 51 -b:v 2000k -maxrate:v 4000k -bufsize 4M -g 50\
-crf 0 \
-tune zerolatency \
-preset fast \
$OBS_DEST
printf "\n--- Stop Transmission\n"

If i plugin in the camlink in another usb3 and the same camera the script will nok work with the audio part but I think this is something with the map command but i am not really sure.

But crtmpserver is already installed on the rp4 and would like to test if this was able to create a rtmp or rtsp I can view from
the vlc as another solution to using ffmpeg script - I am not really sure how to compare the crtmpserver to the nginx solution
but I would like to do rtmp and rtmps to maybe facebook / youtube or a private server in the end were rtmpS is needed and
not really sure if one can get a rtmp stream and restream it with push to rtmps ?

- Anyway the udp streaming works fine with ffmpeg unicasting and that part is allready nice ;) infact I would like to test
a setup with two cams both doing udp steams to see if one can syncronise the audio/video from two wireless cameras
on the wifi maybe someone allready have tried this in OBS ?
 
Top