Logitech c920 HD Pro Webcam in Linux

I started my YouTube channel about 6 months ago. Like everything in life, this was an improvisation: my first 20 videos or so were shoot using my cell phone which was always changing focus (something that hurt the quality of my initial Volca Sample Tutorial Series). Since November I’ve been experimenting with my old Olympus camera (a VG-160) and also a Toshiba Camileo SX900 I brought in second hand. All three machines are capable of shooting 720p HD video (which is also the highest resolution I can manage on my laptop). The cell phone shoots at 25 fps, with very decent low light performance, while the other cameras go up to 30 fps, but the indoors video always looks grainy. Moreover, the focus on the Camileo is apparently broken, and the lower right corner of the image is always blurry . On top of that, neither machine is capable of accepting external audio, which makes sync’ing the audio from the synthesizers a messy job, to say the least. Now, I am just a hobbyist and  I’m not interested in spending a lot of money on a DSL with external audio capture. So, I brought the Logitech c920 to try and record video directly to my laptop, while also recording the audio from my focusrite. These are my first impressions after recording and editing a test video with it (focusing on the Volca Keys).




As far as consumer webcams go, the Logitech c920 is a bit on the expensive side. I brought mine for a little over 100 €, making it the most expensive webcam on the catalogue on the shops. So what are you paying for? Well, the first thing I found is that the camera is heavier and bigger than other webcams with similar design, like HP’s HD 2300. The second thing I noticed is that the camera has a socket for screwing to a standard camera tripod, which is very useful.

Now, about running it on Linux… I have the details about my system at the end of the post, for your reference. This webcam is fully supported by my current version of the UVC driver (including the H.264 encoding), and it can capture in 1920×1280@30fps without any major problem… Now for the not-so-great news: Cheese is easy to work with, but I could not find it useful enough. It recognized the camera, and allowed me to set the resolution at will, but the image was always out of focus. Also, the only audio capture available is the integrated mic on the camera, which is not what I was expecting. Furthermore, cheese appears to get the compressed H.264 video from the camera, un-compresses it and then re-compresses it again, making one of my CPU cores run at 100%.




A better alternative was guvcview. I didn’t knew about this program and can not praise it enough. It allows me to access all the parameters supported by the camera drivers, allowing me to use the digital zoom, tilt and pan (since I shoot at 720p, I have a little of lee way without losing image quality). It also allows me to change the encoder settings and select the audio source for the video! Since it uses Portaudio, it can connect directly to any sound card, or to any sound source available on JACK. And this is were things get interesting, because I can set the audio track to be either the audio being captured from the USB-audio interface, or something more interesting, such as the backing track while I’m overdubbing or even the click track! This makes sync’ing the audio much easier while making videos like the one for “The Looper Song”.

Not everything when smooth, though. The version in Arch’s community repository is the GTK version which allowed me to control the camera, but could not connect to any audio source, nor record video directly. I then managed to get the Qt5-git version from AUR, and it works fine. Also, guvcview might consume a lot of CPU while recording. I managed to overcome this by setting the video encoder on the machine (Video Controls -> Camera Output) to H264 and also setting the output codec (Video-> Video Codec) to be also MPEG4-AVC (H264). I also experienced some hard crashes on the end of the video recording, but the program left me with a perfectly usable video (although without any audio on it). I eventually figured out that setting the audio codec to linear PCM, although it is a good idea, sets the audiorate to 48000Hz, while I record in 44100Hz. Setting the audio codec to MP2 does degrade the sound a little bit but runs stable. I only use the audio on the video to align it with the main audio so I’m fine with this compromise.

The video above was made using the Logitech c920 placed some 25 to 30cm above the Volca Keys. The video was recorded directly using guvcview, in 720p@30fps with domestic lighting (the camera is great in low lighting, by the way). The audio from the Volca Keys was captured by my Focusrite Scarlett 2i2, which is managed by JACK. The audio is being recorded at the same time by guvcview (which shows some VU-type meters on the screen while recording) and also by ardour on a mono track. This mono track was latter edited (EQ, compression, and also a little bit of tape emulation) and re-joined to the video using kdenlive. Because I can see on kdenlive the amplitude envelope of the original audio, matching it to the one of the edited track was extremely easy… this whole post-recording process took me no longer than 2 minutes, excluding the sound editing stage. The video might have one or two occasional hiccup, but nothing too serious, and the overall image quality is, in my opinion, far greater than anything I have accomplished before.

I also took the chance to try out some new templates for including text in my videos… I hope they are as easy to read as the old ones (which were far too big when watching from a computer screen).

In summary, I’d say this is a really good addition to my setup, and might encourage me to post more music videos with complex overdubbing, while before I was mostly limited to tutorials.




This is my current Linux Machine: Toshiba Tecra R850, Intel Core i5-2410M@2.30GHz, 8Gb RAM, 750Gb HDD, running Arch Linux Kernel version 4.3.3, guvcview 2.0.3 (Qt5), jackd 0.124.1, ardour 4.4.0 and gcc 5.3.0).