DebConf18 video work

For personal reasons, I didn't make it to DebConf18 in Taiwan this year; but that didn't mean I wasn't interested in what was happening. Additionally, I remotely configured SReview, the video review and transcoding system which I originally wrote for FOSDEM.

I received a present for that today:

And yes, of course I'm happy about that :-)

On a side note, the videos for DebConf18 have all been transcoded now. There are actually three files per event:

  • The .webm file contains the high quality transcode of the video. It uses VP9 for video, and Opus for audio, and uses the Google-recommended settings for VP9 bitrate configuration. On modern hardware with decent bandwidth, you'll want to use this file.
  • The .lq.webm file contains the low-quality transcode of the video. It uses VP8 for video, and Vorbis for audio, and uses the builtin default settings of ffmpeg for VP8 bitrate configuration, as well as a scale-down to half the resolution; those usually end up being somewhere between a third and half of the size of the high quality transcodes.
  • The .ogg file contains the extracted vorbis audio from the .lq.webm file, and is useful only if you want to listen to the talk and not watch it. It's also the smallest download, for obvious reasons.

If you have comments, feel free to let us know on the mailinglist

Posted
VP9 live streaming from a webcam

I recently bought a new webcam, because my laptop screen broke down, and the replacement screen that the Fujitsu people had on stock did not have a webcam anymore -- and, well, I need one.

One thing the new webcam has which the old one did not is a sensor with a 1920x1080 resolution. Since I've been playing around with various video-related things, I wanted to see if it was possible to record something in VP9 at live encoding settings. A year or so ago I would have said "no, that takes waaay too much CPU time", but right now I know that this is not true, you can easily do so if you use the right ffmpeg settings.

After a bit of fiddling about, I came up with the following:

ffmpeg -f v4l2 -framerate 25 -video_size 1920x1080 -c:v mjpeg -i /dev/video0 -f alsa -ac 1 -i hw:CARD=C615 -c:a libopus -map 0:v -map 1:a -c:v libvpx-vp9 -r 25 -g 90 -s 1920x1080 -quality realtime -speed 6 -threads 8 -row-mt 1 -tile-columns 2 -frame-parallel 1 -qmin 4 -qmax 48 -b:v 4500 output.mkv

Things you might want to change in the above:

  • Set the hw:CARD=C615 bit to something that occurs in the output of arecord -L on your system rather than on mine.
  • Run v4l2-ctl --list-formats-ext and verify that your camera supports 1920x1080 resolution in motion JPEG at 25 fps. If not, change the values of the parameters -framerate and -video_size, and the -c:v that occurs before the -i /dev/video0 position (which sets the input video codec; the one after selects the output video codec and you don't want to touch that unless you don't want VP9).
  • If don't have a quad-core CPU with hyperthreading, change the -threads setting.

If your CPU can't keep up with things, you might want to read the documentation on the subject and tweak the -qmin, -qmax, and/or -speed parameters.

This was done on a four-year-old Haswell Core i7; it should be easier on more modern hardware.

Next up: try to get a live stream into a DASH system. Or something.

Posted