如何在 Raspberry Pi 上以可接受的 FPS 记录 USB 网络摄像头馈送

问题描述

我有一个通用 USB 网络摄像头连接到我的 RaspBerry Pi 3B+。我正在尝试以 30fps 的速度以至少 1280x720 的分辨率录制视频,但目前我无法使用此命令以高于 25fps 的速度录制 640x480:

ffmpeg -f v4l2 -s 640x480 -i /dev/video0 /home/pi/Desktop/out.avi

当我运行 v4l2-ctl --list-formats-ext 命令时,我收到以下响应:

    Type: Video Capture

    [0]: 'MJPG' (Motion-JPEG,compressed)
        Size: discrete 640x480
            Interval: discrete 0.033s (30.000 fps)
        Size: discrete 320x240
            Interval: discrete 0.033s (30.000 fps)
        Size: discrete 1280x720
            Interval: discrete 0.033s (30.000 fps)
        Size: discrete 1920x1080
            Interval: discrete 0.033s (30.000 fps)
            Interval: discrete 0.040s (25.000 fps)
            Interval: discrete 0.050s (20.000 fps)
            Interval: discrete 0.067s (15.000 fps)
            Interval: discrete 0.100s (10.000 fps)
            Interval: discrete 0.200s (5.000 fps)
            Interval: discrete 1.000s (1.000 fps)
        Size: discrete 800x600
            Interval: discrete 0.033s (30.000 fps)
    [1]: 'YUYV' (YUYV 4:2:2)
        Size: discrete 640x480
            Interval: discrete 0.050s (20.000 fps)
        Size: discrete 320x240
            Interval: discrete 0.033s (30.000 fps)
        Size: discrete 1280x720
            Interval: discrete 0.100s (10.000 fps)
        Size: discrete 1920x1080
            Interval: discrete 0.200s (5.000 fps)
        Size: discrete 800x600
            Interval: discrete 0.067s (15.000 fps)"

我尝试了许多不同的录制命令组合,但它们都导致 FPS 低得多。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)