How to capture HDMI video from PC with Cam Link 4K & FFMPEG
AMD Settings
- Enable GPU Scaling on 1920x1200 Display 1 (if you have one, this will make both 1080p)
- Pixel Format: YCbCr 4:2:2 on Display 2 (Cam Link 4K)
- Disable HDMI Link Assurance on Display 2 (just in case)
Windows Settings
- Clone Displays (1080p)
Hardware
- Directly plug in the cam link into your usb port, do not use cable (if you have 10Gbps or faster ports use that)
Capture (FFMPEG, AMF)
720p AVC
ffmpeg -hide_banner -rtbufsize 1024M -f dshow -i video="Cam Link 4K":audio="Digital Audio Interface (Cam Link 4K)" -vf scale=1280:-1 -pix_fmt yuv420p -c:v h264_amf -b:v 50M -c:a flac -preset:v high -f matroska test.mkv
720p HEVC
ffmpeg -hide_banner -rtbufsize 1024M -f dshow -i video="Cam Link 4K":audio="Digital Audio Interface (Cam Link 4K)" -vf scale=1280:-1 -pix_fmt yuv420p -c:v hevc_amf -b:v 50M -c:a flac -preset:v high -f matroska test.mkv
1080p AVC
ffmpeg -hide_banner -rtbufsize 1024M -f dshow -i video="Cam Link 4K":audio="Digital Audio Interface (Cam Link 4K)" -pix_fmt yuv420p -c:v h264_amf -b:v 50M -c:a flac -profile:v high -f matroska test.mkv
1080p HEVC
ffmpeg -hide_banner -rtbufsize 1024M -f dshow -i video="Cam Link 4K":audio="Digital Audio Interface (Cam Link 4K)" -pix_fmt yuv420p -c:v hevc_amf -b:v 50M -c:a flac -profile:v high -f matroska test.mkv
OBS Studio
- You can now simply use it as usual in obs studio
Reference
- switch to
h264_nvenc
orh264_qsv
if you have nvidia or intel gpu ffmpeg -hide_banner -list_devices true -f dshow -i dummy
- if you are using a DSLR, try switching camera to 720p60 mode, also change the pixel format if it has support for that to YCbCr 4:2:2 or YCbCr 4:2:0 to lower the bandwith used