[FFmpeg-user] Catching the h264 vidoestream from a Logitech C920 to a file...
meino.cramer at gmx.de
meino.cramer at gmx.de
Sat Sep 13 13:02:38 CEST 2014
Hi,
I am running
ffmpeg version 1.2.6 Copyright (c) 2000-2014 the FFmpeg developers
built on Sep 6 2014 18:22:04 with gcc 4.8.2 (Gentoo 4.8.2 p1.3r1, pie-0.5.8r1)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar --optflags='-march=native -O2 -pipe -msse3 -ggdb' --extra-cflags='-march=native -O2 -pipe -msse3 -ggdb' --extra-cxxflags='-march=native -O2 -pipe -msse3 -ggdb' --disable-static --enable-gpl --enable-postproc --enable-avfilter --enable-avresample --disable-stripping --disable-indev=oss --disable-outdev=oss --enable-bzlib --disable-runtime-cpudetect --disable-debug --disable-doc --disable-gnutls --enable-hardcoded-tables --enable-iconv --enable-network --disable-openssl --enable-ffplay --enable-vaapi --enable-vdpau --enable-zlib --disable-libvo-aacenc --disable-libvo-amrwbenc --enable-libmp3lame --disable-libfdk-aac --disable-libaacplus --disable-libfaac --enable-libtheora --disable-libtwolame --enable-libx264 --disable-libxvid --disable-libcdio --disable-libiec61883 --disable-libdc1394 --disable-libcaca --disable libavutil 52. 18.100 / 52. 18.100
libavcodec 54. 92.100 / 54. 92.100
libavformat 54. 63.104 / 54. 63.104
libavdevice 54. 3.103 / 54. 3.103
libavfilter 3. 42.103 / 3. 42.103
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
on a Gentoo Linux system
After searching, I found here a recipe:
http://ffmpeg-users.933282.n4.nabble.com/ffmpeg-cannot-capture-h264-from-webcam-C920-td4660906.html
It say, that this would do the trick.
fmpeg -report -s 1920x1080 f v4l2 -vcodec h264 -i /dev/video0 -copyinkf -vcodec copy test.mp4
Applying this, ffmpeg says
ffmpeg started on 2014-09-13 at 13:00:38
Report written to "ffmpeg-20140913-130038.log"
ffmpeg version 1.2.6 Copyright (c) 2000-2014 the FFmpeg developers
built on Sep 6 2014 18:22:04 with gcc 4.8.2 (Gentoo 4.8.2 p1.3r1, pie-0.5.8r1)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar --optflags='-march=native -O2 -pipe -msse3 -ggdb' --extra-cflags='-march=native -O2 -pipe -msse3 -ggdb' --extra-cxxflags='-march=native -O2 -pipe -msse3 -ggdb' --disable-static --enable-gpl --enable-postproc --enable-avfilter --enable-avresample --disable-stripping --disable-indev=oss --disable-outdev=oss --enable-bzlib --disable-runtime-cpudetect --disable-debug --disable-doc --disable-gnutls --enable-hardcoded-tables --enable-iconv --enable-network --disable-openssl --enable-ffplay --enable-vaapi --enable-vdpau --enable-zlib --disable-libvo-aacenc --disable-libvo-amrwbenc --enable-libmp3lame --disable-libfdk-aac --disable-libaacplus --disable-libfaac --enable-libtheora --disable-libtwolame --enable-libx264 --disable-libxvid --disable-libcdio --disable-libiec61883 --disable-libdc1394 --disable-libcaca --disable libavutil 52. 18.100 / 52. 18.100
libavcodec 54. 92.100 / 54. 92.100
libavformat 54. 63.104 / 54. 63.104
libavdevice 54. 3.103 / 54. 3.103
libavfilter 3. 42.103 / 3. 42.103
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
/dev/video1: Invalid argument
But this works:
gst-launch-1.0 -e v4l2src device=/dev/video1 pixel-aspect-ratio=16:9 force-aspect-ratio=True ! video/x-h264, width=1920, height=1080, framerate=30/1 ! avdec_h264 ! xvimagesink sync=false
(only to proof that /dev/video1 is of as the camera is working)
What am I doing wrong here ?
Thank you very much for any help in advance!
Best regards,
mcc
More information about the ffmpeg-user
mailing list