Skip to main content

Thread: ffmpeg video capture


anybody had success in getting ffmpeg work advertised video capture webcam? want convert webcam output vp8 or h264, apparently ffmpeg can't capture webcam video4linux device.

code:
mike@lic9:/opt/test/vp8$ ffmpeg -f oss -i /dev/dsp -f video4linux2 -i /dev/video0 test.mpg  ffmpeg version svn-r23439, copyright (c) 2000-2010 ffmpeg developers    built on jun  3 2010 11:01:08 gcc 4.4.3    configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --  enable-libfaad --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-lib  vorbis --enable-libx264 --enable-libxvid --enable-x11grab    libavutil     50.16. 0 / 50.16. 0    libavcodec    52.73. 0 / 52.73. 0    libavformat   52.67. 0 / 52.67. 0    libavdevice   52. 2. 0 / 52. 2. 0    libavfilter    1.20. 0 /  1.20. 0    libswscale     0.11. 0 /  0.11. 0    libpostproc   51. 2. 0 / 51. 2. 0  [oss @ 0x9c1f510]estimating duration bitrate, may inaccurate  input #0, oss, '/dev/dsp':    duration: n/a, start: 1283203006.144882, bitrate: n/a      stream #0.0: audio: pcm_s16le, 44100 hz, 1 channels, s16, 705 kb/s  [video4linux2 @ 0x9c21aa0]cannot find proper format codec_id 0, pix_fmt -1.  /dev/video0: input/output error

i logged onto machine running 64bit lucid. it's different error, seems may farther. checked v4l-info proper size webcam uses default 640x480.

code:
$ sudo ffmpeg -f video4linux2 -i /dev/video0 -s 640x480 -r 60000/10010 out.mpeg ffmpeg version svn-r0.5.1-4:0.5.1-1ubuntu1, copyright (c) 2000-2009 fabrice bellard, et al.   configuration: --extra-version=4:0.5.1-1ubuntu1 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable -pthreads --enable-zlib --disable-stripping --disable-vhook --enable-runtime-cpudetect --enable-gpl --enable-postproc -- enable-swscale --enable-x11grab --enable-libdc1394 --enable-shared --disable-static   libavutil     49.15. 0 / 49.15. 0   libavcodec    52.20. 1 / 52.20. 1   libavformat   52.31. 0 / 52.31. 0   libavdevice   52. 1. 0 / 52. 1. 0   libavfilter    0. 4. 0 /  0. 4. 0   libswscale     0. 7. 1 /  0. 7. 1   libpostproc   51. 2. 0 / 51. 2. 0   built on mar  4 2010 12:41:55, gcc: 4.4.3 [video4linux2 @ 0x1282480]wrong size (0x0) /dev/video0: error while opening file
i intended medibuntu version of ffmpeg, think have normal ubuntu repository version.

code:
mike@lic8:/opt/test/vp8$ sudo apt-cache show ffmpeg package: ffmpeg priority: optional section: graphics installed-size: 792 maintainer: ubuntu core developers <ubuntu-devel-discuss@lists.ubuntu.com> original-maintainer: debian multimedia packages maintainers <pkg-multimedia-maintainers@lists.alioth.debian.org> architecture: amd64 version: 4:0.5.1-1ubuntu1 depends: libavcodec52 (>= 4:0.5.1-1ubuntu1) | libavcodec-extra-52 (>= 4:0.5.1-1ubuntu1), libavcodec52 (<< 4:0.5.1-99) | libavcodec-extra-52 (<< 4:0.5.1-99), libavdevice52 (>= 4:0.5.1-1ubuntu1) | libavdevice-extra-52 (>= 4:0.5.1-1ubuntu1), l ibavdevice52 (<< 4:0.5.1-99) | libavdevice-extra-52 (<< 4:0.5.1-99), libavfilter0 (>= 4:0.5.1-1ubuntu1) | libavfilter-ex tra-0 (>= 4:0.5.1-1ubuntu1), libavfilter0 (<< 4:0.5.1-99) | libavfilter-extra-0 (<< 4:0.5.1-99), libavformat52 (>= 4:0.5 .1-1ubuntu1) | libavformat-extra-52 (>= 4:0.5.1-1ubuntu1), libavformat52 (<< 4:0.5.1-99) | libavformat-extra-52 (<< 4:0. 5.1-99), libavutil49 (>= 4:0.5.1-1ubuntu1) | libavutil-extra-49 (>= 4:0.5.1-1ubuntu1), libavutil49 (<< 4:0.5.1-99) | lib avutil-extra-49 (<< 4:0.5.1-99), libc6 (>= 2.7), libpostproc51 (>= 4:0.5.1-1ubuntu1) | libpostproc-extra-51 (>= 4:0.5.1- 1ubuntu1), libpostproc51 (<< 4:0.5.1-99) | libpostproc-extra-51 (<< 4:0.5.1-99), libsdl1.2debian (>= 1.2.10-1), libswsca le0 (>= 4:0.5.1-1ubuntu1) | libswscale-extra-0 (>= 4:0.5.1-1ubuntu1), libswscale0 (<< 4:0.5.1-99) | libswscale-extra-0 ( << 4:0.5.1-99) filename: pool/main/f/ffmpeg/ffmpeg_0.5.1-1ubuntu1_amd64.deb size: 242256 md5sum: 64198ad1625452a353fc7b12dd660a12 sha1: 0a680590ed9d5b64d31d7fa11514448d5f138f7e sha256: e4c54c86cc1c7376715b07e471e2a0c475bb46eb94c26175dfcd09c65fa74912 description: multimedia player, server , encoder  package contains ffplay multimedia player, ffserver streaming  server , ffmpeg audio , video encoder. support existing  file formats (avi, mpeg, ogg, matroska, asf...) , encoding formats (mpeg,  divx, mpeg4, ac3, dv...). homepage: http://ffmpeg.org/ bugs: https://bugs.launchpad.net/ubuntu/+filebug origin: ubuntu supported: 3y task: mythbuntu-backend-master, mythbuntu-backend-slave, mythbuntu-desktop, mythbuntu-frontend


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support Multimedia Software [ubuntu] ffmpeg video capture


Ubuntu

Comments

Popular posts from this blog

How to decompile jsxbin to jsx

Gavik Photoslide GK2: Not able to upload photos - Joomla! Forum - community, help and support

Phoca Guestbook logger registret bruger af - Joomla! Forum - community, help and support