Bad quality video capture from Logitech C920

4 posts
by Robo » Tue Apr 02, 2013 11:23 am
My goal is to stream video similar in quality to Skype, for now I'm trying to capture a video from the Logitech C920 webcam.

I'm using ffmpeg, the command is:
Code: Select all
avconv -f video4linux2 -s 320x240 -t 30 -i /dev/video0 ~/test.mpg

The command I used to play the video is:
Code: Select all
ffplay -i test.mpg

My questions are:
  • I thought my command would capture a 30 sec video then stop, but it didn't, I had to hit Ctrl+C. How do I limit the duration?
  • The C920 has hardware h264 encoder, but the result video is very low quality and choppy. Do I have to specify some specific encode/decoder format? How do I get high quality capture?
  • For streaming, the options seem to be ffmpeg or GStreamer. Is there a preference on which one is more suitable? I intend to stream it to a custom app, like a one way Skype.

Note, prior to doing all this, I've done a `apt-get update` and `apt-get upgrade`.

From my searches, people seem to have a lot of problems, I don't know whether the info are still relevant, I would just like the latest info. Sorry if all this has already been answered.
Posts: 21
Joined: Fri Sep 21, 2012 6:39 am
by gordon77 » Tue Apr 02, 2013 11:48 am
tried rpi-update to get the improved usb ?

Posts: 688
Joined: Sun Aug 05, 2012 3:12 pm
by Robo » Wed Apr 03, 2013 8:31 am
Just tried it, didn't help. Looks to have gotten worse to be honest. I used the same command as before, and it appears to have only caught one frame, i.e. I move the webcam around, but the video only shows one image.
Posts: 21
Joined: Fri Sep 21, 2012 6:39 am
by Cynar » Thu Apr 04, 2013 4:58 pm
I believe you need a non-standard version of the UVC driver that includes H.264
Otherwise the camera uses an more normal encoding.

My linux knowledge is too poor to help beyond that though
Posts: 2
Joined: Thu Apr 04, 2013 4:33 pm