Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

On Raspbery Pi's Raspbian (based on Debian Wheezy) I'm trying to make a simplest video grab from a Logitech C910 webcam to a video file via ffmpeg/avconv.

I say:

$ avconv -t 5 -f video4linux2 -s 320x240 -r 30 -i /dev/video0 -vcodec mpeg1video out.avi

but get

avconv version 0.8.6-6:0.8.6-1+rpi1, Copyright (c) 2000-2013 the Libav developers
  built on Mar 31 2013 13:58:10 with gcc 4.6.3
[video4linux2 @ 0x1371840] Cannot find a proper format for codec_id 0, pix_fmt -1.
/dev/video0: Input/output error

Line video4linux2 suggests, that the problem is with input codec, not output?

May be I haven't installed some package?

What's wrong? Seems, that solution should be very simple. Thanks.

share|improve this question
    
@slhck Edited post. Hardware is Logitech C910 camera and Raspberry Pi (so to be precise OS is Raspbian, not Debian Wheeze). –  Bob Apr 30 '13 at 12:40

1 Answer 1

I saw this problem on my logitech C310 and raspbian. After some more poking around i found some help with the pixel format needed.

$ sudo apt-get install v4l-utils
...
$ sudo v4l2-ctl --list-formats
    ioctl: VIDIOC_ENUM_FMT
    Index       : 0
    Type        : Video Capture
    Pixel Format: 'YUYV'
    Name        : YUV 4:2:2 (YUYV)

    Index       : 1
    Type        : Video Capture
    Pixel Format: 'MJPG' (compressed)
    Name        : MJPEG

adding "-pix_fmt yuyv422" to the ffmpeg command line got it going again.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.