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.

I'm currently trying to get webcam streaming to work on a Logitech E2500 with ffmpeg.

Running the command gives me some kind of buffer length error.

pi@raspberrypi ~/ffmpeg-dmo-1.0 $ sudo /usr/sbin/webcam.sh

This script contains the following:

ffserver -f /etc/ffserver.conf & ffmpeg -v verbose -r 5 -s 320x240 -f video4linux2 -i /dev/video0 http://localhost/webcam.ffm

It gives the following output:

ffserver version 1.0 Copyright (c) 2000-2012 the FFmpeg developersffmpeg version 1.0 Copyright (c) 2000-2012 the FFmpeg developers
built on Dec  2 2012 17:56:37 with gcc 4.6 (Debian 4.6.3-12+rpi1)
configuration: 
libavutil      51. 73.101 / 51. 73.101

built on Dec  2 2012 17:56:37 with gcc 4.6 (Debian 4.6.3-12+rpi1)
configuration: 
libavutil      51. 73.101 / 51. 73.101
libavcodec     54. 59.100 / 54. 59.100
libavformat    54. 29.104 / 54. 29.104
libavcodec     54. 59.100 / 54. 59.100
libavformat    54. 29.104 / 54. 29.104
libavdevice    54.  2.101 / 54.  2.101
libavfilter     3. 17.100 /  3. 17.100
libswscale      2.  1.101 /  2.  1.101
libswresample   0. 15.100 /  0. 15.100
libavdevice    54.  2.101 / 54.  2.101
libavfilter     3. 17.100 /  3. 17.100
libswscale      2.  1.101 /  2.  1.101
libswresample   0. 15.100 /  0. 15.100
[video4linux2,v4l2 @ 0x250a620] [3]Capabilities: 5000001
[video4linux2,v4l2 @ 0x250a620] The V4L2 driver changed the video from 320x240 to 320x232
[video4linux2,v4l2 @ 0x250a620] Buffer len [0] = 40960 != 74240
/dev/video0: Operation not permitted

Contents of /etc/ffserver.conf:

Port 1025
BindAddress 0.0.0.0
MaxClients 10
MaxBandwidth 50000
NoDaemon

<Feed webcam.ffm>
file /tmp/webcam.ffm
FileMaxSize 10M
</Feed>

<Stream webcam.mjpeg>
Feed webcam.ffm
Format mjpeg
VideoSize 320x240
VideoFrameRate 10
VideoBitRate 2000
VideoQMin 1
VideoQMax 10
</Stream>

What is going on here and how do I fix this? Answers are much appreciated.

share|improve this question
    
It contains the following command: ffserver -f /etc/ffserver.conf & ffmpeg -v verbose -r 5 -s 320x240 -f video4linux2 -i /dev/video0 http://localhost/webcam.ffm –  MainframeX Dec 3 '12 at 21:42
    
Per this comment it seems your camera produces MJPEG and video4linux2 can't handle this properly. Maybe try adding a -c:v mjpeg before the -f video4linux2 option. –  slhck Dec 3 '12 at 21:53
    
Thanks, tried it and it spat out the exact same error. However, the post you linked is interesting. Maybe v4l2-ctl might contain a solution. Installing v4l-utils now. –  MainframeX Dec 3 '12 at 22:14
    
You can cut out all of the ffserver stuff to clarify the issue as in output to a file instead. See the output of v4l2-ctl --list-formats-ext to show camera capabilities. Also see the ffmpeg V4L2 input device option -list_formats all. Then choose the desired format with -input_format (such as mjpeg or yuyv422). Choose size with -video_size (such as 640x480). –  LordNeckbeard Dec 4 '12 at 0:19
    
Tried everything I could think of. The camera simply doesn't work. Moved the camera to my Linux Mint laptop and it refuses to work there either. –  MainframeX Dec 5 '12 at 20:39

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.