如何用ffmpeg获取USB摄像头数据并存储到本地
推荐于2016-05-08
展开全部
我用的命令是
ffmpeg -f video4linux -s 320*240 -r 10 -i /dev/video0 test.asf
运行的结果是
FFmpeg version SVN-r16967, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --enable-pthreads --enable-x11grab --enable-memalign-hack --enable-gpl --enable-libmp3lame --disable-vhook
libavutil 49.14. 0 / 49.14. 0
libavcodec 52.11. 0 / 52.11. 0
libavformat 52.25. 0 / 52.25. 0
libavdevice 52. 1. 0 / 52. 1. 0
built on Feb 3 2009 15:22:03, gcc: 4.3.2
Input #0, video4linux, from '/dev/video0':
Duration: N/A, start: 1233715988.062058, bitrate: 9216 kb/s
Stream #0.0: Video: rawvideo, yuv420p, 320x240, 9216 kb/s, 10.00 tb(r)
Output #0, asf, to 'test.asf':
Stream #0.0: Video: msmpeg4, yuv420p, 320x240, q=2-31, 200 kb/s, 10.00 tb(c)
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
VIDIOCMCAPTURE: Invalid argument
frame= 1 fps= 0 q=6.5 Lsize= 32kB time=0.10 bitrate=2594.5kbits/s
video:28kB audio:0kB global headers:0kB muxing overhead 11.194542%
ffmpeg -f video4linux -s 320*240 -r 10 -i /dev/video0 test.asf
运行的结果是
FFmpeg version SVN-r16967, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --enable-pthreads --enable-x11grab --enable-memalign-hack --enable-gpl --enable-libmp3lame --disable-vhook
libavutil 49.14. 0 / 49.14. 0
libavcodec 52.11. 0 / 52.11. 0
libavformat 52.25. 0 / 52.25. 0
libavdevice 52. 1. 0 / 52. 1. 0
built on Feb 3 2009 15:22:03, gcc: 4.3.2
Input #0, video4linux, from '/dev/video0':
Duration: N/A, start: 1233715988.062058, bitrate: 9216 kb/s
Stream #0.0: Video: rawvideo, yuv420p, 320x240, 9216 kb/s, 10.00 tb(r)
Output #0, asf, to 'test.asf':
Stream #0.0: Video: msmpeg4, yuv420p, 320x240, q=2-31, 200 kb/s, 10.00 tb(c)
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
VIDIOCMCAPTURE: Invalid argument
frame= 1 fps= 0 q=6.5 Lsize= 32kB time=0.10 bitrate=2594.5kbits/s
video:28kB audio:0kB global headers:0kB muxing overhead 11.194542%
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询