Go back
HDMI capture without breaking the bank 2020-06-20

I got one of the cheap HDMI capture dongles everyone on Twitter has been raving about - see this thread by marcan and the quoted tweet by Arsenio for some documentation + a bit of fault finding.

Mine was £12 shipped, with UK stock:
eBay listing

Here's a picture of mine:
Picture of HDMI capture dongle on desk as well as the obligatory board picture - yes, the heatsink was crooked when I opened it. Picture of HDMI capture dongle on desk, out of its case

Out of the box it works fine in OBS.
Screenshot of OBS preview The only downside is that you have to use MJPEG to get any kind of reasonable framerate (60fps in <= 720p, 30fps above 720p) as it only does 30fps at 640x480 in YUYV, with decreasing framerates all the way down to 5fps at 1080p.

It seems to appear as a standard USB video device, as well as a standard USB audio device - no wonky drivers needed!
The USB audio exposed is 96Khz mono, but it turns out it's actually 48KHz stereo and can be used as stereo with the correct ALSA quirks (see the patch by marcan). Hopefully that should be upstreamed reasonably quickly, and we'll see it in a future Linux release.
The only issue that can't be fixed by quirks is that the channels are swapped, so the stereo->mono change might be to cover this up...
It can be fixed relatively easily though - as I use Pulseaudio for my desktop audio, I used module-remap-source.
Just put this snippet into your /etc/pulse/default.pa -
load-module module-remap-source source_name=macrosilicon-reverse-stereo master=alsa_input.usb-MACROSILICON_2109-02.analog-stereo channels=2 master_channel_map=front-right,front-left channel_map=front-left,front-right
which creates a new virtual audio device with the correct channel mapping. Virtual device as seen in pavucontrol
However, this has a couple of downsides - sometimes it picks the wrong device to remap, especially if I unplug the device without restarting Pulse, resulting in "Remapped Built-in Analog Stereo" when it picks my mic. It also doesn't work if you plug in the device without restarting Pulse, because the module gets loaded at boot. Something can probably be done with udev rules to add/remove the module at runtime, but I didn't do that yet.