0

I have been trying to run a webcam/audio stream from usb devices on my rpi.

I have run the following commands:

avconv -f video4linux2 -i /dev/video0 –s 640×360 r 10 –b 350k –f flv    rtmp://x.xxxxxxxx.fme.ustream.tv/ustreamVideo/xxxxxxxx/streamkey

and

avconv -f video4linux2 -i /dev/video0 -vcodec mpeg2video -r 25 -pix_fmt yuv420p -me_method epzs -b 2600k -bt 256k -f flv rtmp://x.xxxxxxxx.fme.ustream.tv/ustreamVideo/xxxxxxxx/streamkey

"this command as per this source"

both return error: [video4linux2 @ 0xa3e720] Cannot find a proper format for codec_id 0, pix_fmt -1. /dev/video0: Input/output error

This only occurs on rpi, as my ubuntu laptop can run avconv -f video4linux2 -i /dev/video0 perfectly using default values.

is v4l2 broken? or am I doing something wrong here.

p.s. the audio hasn't been a problem at all, so I didn't include much info on it.

  • What camera and OS are you using on the Pi? If you are trying to use something other than a camera you may need a different input device (i.e. not /dev/video0) – Wilf Aug 15 '15 at 23:09
  • It's a generic Microsoft USB webcam. That crossed my mind, but I hadn't checked yet. – axwege Aug 15 '15 at 23:49
  • Try with somehting like fswebcam first to see if it works. You can find a list of supported devices here if needed. – Wilf Aug 16 '15 at 16:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.