Using the Logitech C920 webcam with Gstreamer

Logitech HD Webcam C920You may already know about my existing enthusiasm for Logitech webcams, which is due to the combination of relatively good image quality, high resolution and easy to use UVC interface. I was therefore very happy to learn about their newest camera, the HD Pro Webcam C920, which in addition to the standard HD webcam stuff we already know from the C910, also provides hardware encoded H.264 video stream! This is rather new and there isn’t much software that can take advantage of it; however, with a little tweaking and hacking we can get the H.264 stream into Gstreamer, where after we can do pretty much whatever we want.

Read more

x264enc problem in GStreamer video switcher solved

Back in August 2010 I ran a brief experiment using GstInputSelector to switch between various video sources. You may have noticed that it was using Theora encoder while most of my other DVB experiments used H.264 encoder in MPEG-TS container. The reason for this was that I could not make x264enc work in the pipeline used for the video switcher.

Read more

Webcam pixel formats and Gstreamer caps filters

Up until now I have been using the standard (link) YUV 4:2:2 pixel format with my Logitech Webcam Pro 9000. This format is good for most cases; however, the framerate is limited to 15/2 fps at 1280×720 resolution, while the other supported formats (MJPG, RGB3, BGR3, YU12, YV12) support this reolution with up to 30 fps! So it was time for me to figure it out.

Read more

GstInputSelector to switch between different cameras

An email on the gst-devel mailing list last week pointed me to a rather interesting example in the gst-python repository: switch.py – shows how to use the GstInputSelector element in a Python script to select between different input streams. When I looked at the example I thought right away that it would be cool to use it to switch between different cameras in my simple DVB setup that uses Gstreamer and GNU Radio.

Read more

Pulseaudio device names

Recording audio with gstreamer is easy:

  gst-launch -e pulsesrc ! audioconvert ! \
lamemp3enc target=1 bitrate=64 cbr=true ! \
filesink location=audio.mp3

The pulsesrc element here refers to the pulseaudio input (pulseaudio is AFAIK the default sound system in all linux distributions nowadays). This is good and will capture audio from the default sound input, which can be microphone or line-in depending on the hardware and the pulseaudio configuration.

But what if I plug in my USB webcam with built-in microphone and I want to capture audio from that?

Read more

Full duplex transceiver version of the DVB setup

One MacBook Pro (2.4 GHz) and one USRP running the full duplex video transceiverThis weekend I have been playing with a full duplex transceiver version of the simple DVB setup that allows to use only one computer and one USRP as a transmitter and receiver. By using separate daughterboards I can use one side to transmit and the other side to receive. Using two sets and two frequencies the transceiver can be used for two-way video conferencing over the air 🙂

Read more