ffmpeg摄像头视频采集 音频采集的正确参数

huzia@huzia-laptop:~$ ffmpeg  -f video4linux2 -s 320*240 -r 10 -i /dev/video0  test.asf
FFmpeg version git-60ff1c3, Copyright (c) 2000-2010 the FFmpeg developers
  built on Apr 21 2010 20:39:20 with gcc 4.3.3
  configuration:
  libavutil     50.14. 0 / 50.14. 0
  libavcodec    52.66. 0 / 52.66. 0
  libavformat   52.61. 0 / 52.61. 0
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale     0.10. 0 /  0.10. 0
[video4linux2 @ 0x8c8d420]Cannot open video device /dev/video0 : Permission denied
/dev/video0: Input/output error
huzia@huzia-laptop:~$ sudo ffmpeg  -f video4linux2 -s 320*240 -r 10 -i /dev/video0  test.asf
FFmpeg version git-60ff1c3, Copyright (c) 2000-2010 the FFmpeg developers
  built on Apr 21 2010 20:39:20 with gcc 4.3.3
  configuration:
  libavutil     50.14. 0 / 50.14. 0
  libavcodec    52.66. 0 / 52.66. 0
  libavformat   52.61. 0 / 52.61. 0
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale     0.10. 0 /  0.10. 0
[video4linux2 @ 0xa946420][3]Capabilities: 5000001
[video4linux2 @ 0xa946420]Estimating duration from bitrate, this may be inaccurate
Input #0, video4linux2, from '/dev/video0':
  Duration: N/A, start: 0.000000, bitrate: 0 kb/s
    Stream #0.0: Video: mjpeg, yuvj422p, 320x240, 0 kb/s, 10 tbr, 1000k tbn, 10 tbc
File 'test.asf' already exists. Overwrite ? [y/N] y
Output #0, asf, to 'test.asf':
  Metadata:
    WM/EncodingSettings: Lavf52.61.0
    Stream #0.0: Video: msmpeg4, yuv420p, 320x240, q=2-31, 200 kb/s, 1k tbn, 10 tbc
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop encoding
frame=    3 fps=  0 q=2.0 Lsize=      10kB time=0.30 bitrate= 270.1kbits/s dup=0 drop=6811   
video:8kB audio:0kB global headers:0kB muxing overhead 27.898459%
huzia@huzia-laptop:~$ ffmpeg -f oss -i /dev/dsp   /tmp/out.mpg
FFmpeg version git-60ff1c3, Copyright (c) 2000-2010 the FFmpeg developers
  built on Apr 21 2010 20:39:20 with gcc 4.3.3
  configuration:
  libavutil     50.14. 0 / 50.14. 0
  libavcodec    52.66. 0 / 52.66. 0
  libavformat   52.61. 0 / 52.61. 0
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale     0.10. 0 /  0.10. 0
[oss @ 0xaa39420]Estimating duration from bitrate, this may be inaccurate
Input #0, oss, from '/dev/dsp':
  Duration: N/A, start: 1271899902.828937, bitrate: N/A
    Stream #0.0: Audio: pcm_s16le, 44100 Hz, 1 channels, s16, 705 kb/s
Output #0, mpeg, to '/tmp/out.mpg':
  Metadata:
    encoder         : Lavf52.61.0
    Stream #0.0: Audio: mp2, 44100 Hz, 1 channels, s16, 64 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop encoding
size=     188kB time=23.77 bitrate=  64.8kbits/s   
video:0kB audio:186kB global headers:0kB muxing overhead 1.230997%

huzia@huzia-laptop:~$ ffmpeg  -f video4linux2 -s 320*240 -r 10 -i /dev/video0  test.asf

huzia@huzia-laptop:~$ ffmpeg -f oss -i /dev/dsp   /tmp/out.mpg

 

本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/huzia/archive/2010/04/22/5514435.aspx

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值