ok so got a bit further. Now have installed everything ok. I can see my webcam using
Code: Select all
[root@alarmpi dev]# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 012: ID 046d:081b Logitech, Inc. Webcam C310
[root@alarmpi dev]#
And also have a /dev/video1
Code: Select all
[root@alarmpi dev]# cd /dev/
[root@alarmpi dev]# ls -l vid*
crw-rw---- 1 root video 81, 1 Jun 4 14:58 video1
[root@alarmpi dev]#
Using the example in
http://jeremyblythe.blogspot.co.uk/ I should then run:
Code: Select all
ffserver -f /root/ffserver.conf & ffmpeg -v 2 -r 5 -s 640x480 -f video4linux2 -i /dev/video0 http://localhost:8090/webcam.ffm
This did now seem to be working - my browser just timed out and I could not telnet to 8090. So I tried to just get ffmpeg collecting and writing to a local file with the following
Code: Select all
ffmpeg -f v4l2 -s 640x480 -i /dev/video0 out.mpg
Which did not seem to work also I got:
Code: Select all
ffmpeg -f v4l2 -s 640x480 -i /dev/video1 out.mpg
ffmpeg version 0.10.3 Copyright (c) 2000-2012 the FFmpeg developers
built on May 10 2012 14:43:09 with gcc 4.6.3
configuration: --prefix=/usr --enable-libmp3lame --enable-libvorbis --enable-l ibxvid --enable-libx264 --enable-libvpx --enable-libtheora --enable-libgsm --ena ble-libspeex --enable-postproc --enable-shared --enable-x11grab --enable-libopen core_amrnb --enable-libopencore_amrwb --enable-libschroedinger --enable-libopenj peg --enable-librtmp --enable-libpulse --enable-gpl --enable-version3 --enable-r untime-cpudetect --disable-debug --disable-static
libavutil 51. 35.100 / 51. 35.100
libavcodec 53. 61.100 / 53. 61.100
libavformat 53. 32.100 / 53. 32.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 61.100 / 2. 61.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 6.100 / 0. 6.100
libpostproc 52. 0.100 / 52. 0.100
[video4linux2,v4l2 @ 0xae2b20] ioctl(VIDIOC_DQBUF): No such device
[video4linux2,v4l2 @ 0xae2b20] Estimating duration from bitrate, this may be ina ccurate
Input #0, video4linux2,v4l2, from '/dev/video1':
Duration: N/A, bitrate: 147456 kb/s
Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480, 147456 k b/s, 30 tbr, 1000k tbn, 30 tbc
Incompatible pixel format 'yuyv422' for codec 'mpeg1video', auto-selecting forma t 'yuv420p'
[buffer @ 0xae0860] w:640 h:480 pixfmt:yuyv422 tb:1/1000000 sar:0/1 sws_param:
[buffersink @ 0xae0b00] auto-inserting filter 'auto-inserted scale 0' between th e filter 'src' and the filter 'out'
[scale @ 0xae0f80] w:640 h:480 fmt:yuyv422 -> w:640 h:480 fmt:yuv420p flags:0x4
[mpeg @ 0xadd020] VBV buffer size not set, muxing may fail
Output #0, mpeg, to 'out.mpg':
Metadata:
encoder : Lavf53.32.100
Stream #0:0: Video: mpeg1video, yuv420p, 640x480, q=2-31, 200 kb/s, 90k tbn, 30 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo -> mpeg1video)
Press [q] to stop, [?] for help
[video4linux2,v4l2 @ 0xae2b20] ioctl(VIDIOC_DQBUF): No such device
frame= 0 fps= 0 q=0.0 Lsize= 0kB time=00:00:00.00 bitrate= 0.0kbits/ s
video:0kB audio:0kB global headers:0kB muxing overhead nan%
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters i f used)
I think I am also making it a bit unhappy as the webcam seems to keep shifting from /dev/video0 to /dev/video1