了解ffmpeg输入流信息

Understanding ffmpeg input stream information

当 运行ning ffmpeg 我得到以下 input/output/stream 语句。我需要了解这里的细节。

$ ffmpeg -y -nostdin -f v4l2 -framerate 30 -video_size 1920x1080 -c:v mjpeg -i /dev/video1 -c:v copy /tmp/v1.mov

Input #0, video4linux2,v4l2, from '/dev/video1':
  Duration: N/A, start: 762195.237801, bitrate: N/A
    Stream #0:0: Video: mjpeg, yuvj422p(pc, bt470bg/unknown/unknown), 1920x1080, -5 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc

Output #0, mov, to '/tmp/v1.mov':
  Metadata:
    encoder         : Lavf56.40.101
    Stream #0:0: Video: mjpeg (jpeg / 0x6765706A), yuvj422p, 1920x1080, q=2-31, -5 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc

Stream mapping:
  Stream #0:0 -> #0:0 (copy)
frame= 1685 fps= 30 q=-1.0 Lsize=  212483kB time=00:00:56.08 bitrate=31036.6kbits/s    

我想通过 USB 3.0 集线器连接 2 个 USB 摄像头。我的相机是 USB 2.0 相机。 运行 2 个摄像头在低分辨率或帧率下工作,但在高 resolution/framerate,我 运行 超出了 USB 带宽。

Does Video: mjpeg, yuvj422p(pc, bt470bg/unknown/unknown) means that ffmpeg is receiving both the compresses mjpeg stream and and uncompressed yuv stream? If this is the case it explains the bandwidth issue. I ask because I can see that the compressed bitrate is only 31 Mbit in the Stream mapping section.

My question would then become, can I force the camera to only stream the compressed mjpeg stream?

p.s。我知道我可以将相机插入单独的 USB 端口,但我只有 3 个端口并且需要记录 6 个相机,因此每个 USB (3.0) 集线器至少需要 2 个相机。

Video: mjpeg, yuvj422p(pc, bt470bg/unknown/unknown)中,mjpeg是编解码器,yuvj422p是ffmpeg将输入解码到的未压缩流的像素格式,pc表示整个位深度用于表示颜色,即 0 = 黑色和 255 = 白色。接下来的三个值表示颜色 space 属性。我相信顺序是初选、space 和传递特性(或伽马函数)。

因此,您不会同时摄取两个流。