How to use Sony cameras as webcam in Linux
I've finally found a setup that allows me to get good picture quality on video calls and in youtube videos, while keeping the number of hacks and configuration necessary at zero level.
Now I'm using a Sony a6400 camera with a simple HDMI cable, and a cheap $10 HDMI to USB capture card. It allows the camera to be detected in my system as a plain old webcam, while keeping all the benefits of a good camera, like autofocus and good color balance.
Most guides on the internet will tell you to use companion software from the vendor, and connect the cameras through USB directly. But this has a few shortcomings:
- The software is often buggy and gets fixes rarely. This is because the direct capture from the camera to USB is a rare use-case, and the vendor doesn't earn any money with making this software reliable.
- The software only works on Windows or Mac. Or even only on Windows.
- Virtual webcams created by the software are often not visible in certain apps like Skype without special hacks. And it may break with new releases as well.
The only reliable way is to use a real HDMI capture card. One of the reasons this works is because modern mirrorless cameras have HDMI output that is used in professional settings (e.g. monitoring the video feed from the camera on external screens). So if you buy a camera that supports clean HDMI output, you may be certain that it will just work. And if it works when you buy it, there's no need to update the firmware or fiddle with anything.
One caveat I've found with this approach is that you need to be careful which vendors you buy the cameras from. There's a law in Europe that says that everything that can record more than 30 consecutive minutes of video is considered a movie camera and is taxed with an additional tax. So Canon cameras, for example, don't even allow you to get a continuous and uninterrupted video stream. They are just programmed to auto-shutdown after 30 minutes, and there's nothing you can do about it.
Sony, on the other hand, apparently decided to make their cameras a bit more expensive, but include the uninterrupted video functionality. So I just purchased one of their latest products, the a6400.
One of the best things about these Sony cameras is that they have a smart sleep functionality. If the receiving end is not actively reading data from HDMI, it will fall asleep after a certain period of time. So if you've ended a video call or recording, but forgot to switch off the camera, it is smart enough to shut itself off.