ffmpeg 命令产生黑色图像作为输出

ffmpeg 命令产生黑色图像作为输出

操作系统详细信息:

cat /etc/os-release 的输出

0

Input #0, video4linux2,v4l2, from '/dev/video0':

Duration: N/A, start: 13555.753906, bitrate: 147456 kb/s

Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480, 147456 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc

Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> mjpeg (native))


Press [q] to stop, [?] for help [swscaler @ 0x55fd0eafa3e0] deprecated pixel format used, make sure you did set range correctly Output #0, image2, to 'test1.jpeg':

Metadata:
encoder         : Lavf57.83.100
Stream #0:0: Video: mjpeg, yuvj422p(pc), 640x480, q=2-31, 200 kb/s, 30 fps, 30 tbn, 30 tbc

Metadata:
encoder         : Lavc57.107.100 mjpeg
Side data:
cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
frame= 1 fps=0.0 q=1.6 Lsize=N/A time=00:00:00.03 bitrate=N/A speed=8.41x
video:3kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

我使用的命令:

ffmpeg -i /dev/video0 -vframes 1 test1.jpeg

它生成黑色 jpeg 图像作为输出。为什么?请建议ffmpeg命令以获取网络摄像头图像。

相关内容