From lolcat's wiki
Jump to: navigation, search

Linux capture cards

In this wiki entry, I will document how to capture and record HDMI signals on Linux.

What to buy

I haven't done enough experimentation yet, but I will show you what I've tried so far.

USB 2.0 Chinese dongles

HDMI chinesium capture card

If you search for cheap USB to HDMI adapters on sites like Ebay, this is what you're gonna end up finding. Sold by multiple sellers, they often advertise these adapters as being able to handle video resolutions up to 4K at 30FPS. This may sound good on paper, but it's a scam. They're doing a play on words; it supports this resolution for the input only. The output you'll get inside your recording software is gonna be limited to around 10FPS for 1080p video. I have ordered this particular model shown to the left of the page. It's not really their fault either, I should've known better... USB 2.0 can't possibly pump out 1080p video reliably.

This model only outputs the following resolutions:

$ v4l2-ctl --list-formats-ext
Codec FPS Resolution
Motion-JPEG 30 1280x720
Motion-JPEG 30 960x540
Motion-JPEG 30 848x480
Motion-JPEG 30 640x480
Motion-JPEG 30 640x360
Motion-JPEG 30 424x240
Motion-JPEG 30 352x288
Motion-JPEG 30 320x240
Motion-JPEG 30 320x180
YUYV (YUYV 4:2:2) 10 1280x720
YUYV (YUYV 4:2:2) 15 960x540
YUYV (YUYV 4:2:2) 20 848x480
YUYV (YUYV 4:2:2) 30 640x480
YUYV (YUYV 4:2:2) 30 424x240
YUYV (YUYV 4:2:2) 30 352x288
YUYV (YUYV 4:2:2) 30 320x240
YUYV (YUYV 4:2:2) 30 320x180

Despite what the table says, even if you select the 720p MJPEG option at 30FPS, it won't be able to push 30 frames per second. It's gonna be more like 15FPS. I'll have to give it some credit where it's due, the experience with this dongle was plug and play and OBS was able to detect it as a Webcam without any issues through the v4l2 built-in driver.

Configuring OBS to use the dongle

  1. Create a new scene, add a new source (+) and select Video Capture Device (V4L2)
  2. Click once the newly added source, and click the settings cog next to the add (+) button
  3. Cycle through the detected video sources until you see the content you want to capture, or a color TV test screen. (BTW, if you see that colored image test, unplug the dongle until you see the video appear)
  4. For the video format, select Motion-JPEG. Despite its better image quality, YUYV is too slow.
  5. For the resolution, pick any resolution until you get smooth playback inside of OBS.
  6. Make sure to select "Full" as the color range. It doesn't really affect framerate at all.

I have made a sample video I captured using this piece of shit, you can see it here: Jailbroken iPod 4th generation screen capture with screen recording tweak, using the Chinese capture card & apple HDMI adapter