DSP

ffmpeg 摄像头视频采集的一个成功终端快照

2019-07-13 16:13发布

huzia@huzia-laptop:~$ sudo ffmpeg -f oss -i /dev/dsp -f video4linux2 -r 25 -b 500k -s 320x240 -i /dev/video0 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 @ 0x9a17420]Estimating duration from bitrate, this may be inaccurate
Input #0, oss, from '/dev/dsp':
Duration: N/A, start: 1272722262.107591, bitrate: N/A
Stream #0.0: Audio: pcm_s16le, 44100 Hz, 1 channels, s16, 705 kb/s
[video4linux2 @ 0x9a199a0][4]Capabilities: 5000001
[video4linux2 @ 0x9a199a0]Estimating duration from bitrate, this may be inaccurate
Input #1, video4linux2, from '/dev/video0':
Duration: N/A, start: 0.000000, bitrate: 0 kb/s
Stream #1.0: Video: mjpeg, yuvj422p, 320x240, 0 kb/s, 25 tbr, 1000k tbn, 25 tbc
File 'out.mpg' already exists. Overwrite ? [y/N] y
Output #0, mpeg, to 'out.mpg':
Metadata:
encoder : Lavf52.61.0
Stream #0.0: Video: mpeg1video, yuv420p, 320x240, q=2-31, 500 kb/s, 90k tbn, 25 tbc
Stream #0.1: Audio: mp2, 44100 Hz, 1 channels, s16, 64 kb/s
Stream mapping:
Stream #1.0 -> #0.0
Stream #0.0 -> #0.1
Press [q] to stop encoding
qrame= 3 fps= 0 q=2.0 size= 0kB time=0.08 bitrate= 0.0kbits/s dup=0 drop=4268
按下q后跳出一下程序 video:5kB audio:1734kB global headers:0kB muxing overhead 1.207477%
Received signal 2: terminating