Linux で USB ウェブカメラで利用可能なビデオモードを一覧表示するにはどうすればいいですか?

linux usb webcam

昔々、LinuxでUSBウェブカメラのサポートされている解像度&モード(例えばPAL, 640×480)を一覧表示するコマンドラインツール(”UVC “を含む何か)を見つけたことをかすかに覚えていますが、残念なことに、私はそれを失ってしまいました。誰もが私が話していることを知っていますか?私は、のようなものを与える何かが欲しい

> list-uvc-modes /dev/video1
PAL, YUYV, 640x480, 30 FPS
NTSC, MJPEG, ...

Thanks!

  25  gatoatigrado  2013-09-02


ベストアンサー

v4l(ビデオ4 linux 2)がインストールされていればできます

v4l2-ctl --list-formats

39  nerdwaller  2013-09-02


受け入れられた答え(v4l2-ctl --list-formats)は、例えば、最初に利用可能な形式のみを示しているようです

$ v4l2-ctl --list-formats
ioctl: VIDIOC_ENUM_FMT
Index       : 0
Type        : Video Capture
Pixel Format: ''
Name        : 2036315a-0000-0010-8000-00aa003

Index       : 1
Type        : Video Capture
Pixel Format: ''
Name        : 00000050-0000-0010-8000-00aa003

利用可能なすべてのフォーマットを表示するには、以下のようなスクリプトを使用するとよいでしょう

$ for d in /dev/video* ; do echo $d ; v4l2-ctl --device=$d -D --list-formats  ; echo '===============' ; done
/dev/video0
Driver Info (not using libv4l2):
Driver name   : uvcvideo
Card type     : Intel(R) RealSense(TM) 410
Bus info      : usb-0000:00:14.0-1
Driver version: 4.4.13
Capabilities  : 0x84200001
Video Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps   : 0x04200001
Video Capture
Streaming
Extended Pix Format
ioctl: VIDIOC_ENUM_FMT
Index       : 0
Type        : Video Capture
Pixel Format: 'Z16 '
Name        : Depth data 16-bit (Z16)

Index       : 1
Type        : Video Capture
Pixel Format: ''
Name        : 00000050-0000-0010-8000-00aa003

===============
/dev/video1
Driver Info (not using libv4l2):
Driver name   : uvcvideo
Card type     : Intel(R) RealSense(TM) 410
Bus info      : usb-0000:00:14.0-1
Driver version: 4.4.13
Capabilities  : 0x84200001
Video Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps   : 0x04200001
Video Capture
Streaming
Extended Pix Format
ioctl: VIDIOC_ENUM_FMT
Index       : 0
Type        : Video Capture
Pixel Format: ''
Name        : 00000032-0000-0010-8000-00aa003

Index       : 1
Type        : Video Capture
Pixel Format: 'UYVY'
Name        : UYVY 4:2:2

Index       : 2
Type        : Video Capture
Pixel Format: 'Y8I '
Name        : Greyscale 8 L/R (Y8I)

Index       : 3
Type        : Video Capture
Pixel Format: 'Y12I'
Name        : Greyscale 12 L/R (Y12I)

===============
$ v4l2-ctl -D -d /dev/video1 --list-formats-ext
Driver Info (not using libv4l2):
Driver name   : uvcvideo
Card type     : Intel(R) RealSense(TM) 410
Bus info      : usb-0000:00:14.0-1
Driver version: 4.4.13
Capabilities  : 0x84200001
Video Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps   : 0x04200001
Video Capture
Streaming
Extended Pix Format
ioctl: VIDIOC_ENUM_FMT
Index       : 0
Type        : Video Capture
Pixel Format: ''
Name        : 00000032-0000-0010-8000-00aa003
Size: Discrete 424x240
Interval: Discrete 0.011s (90.000 fps)
Interval: Discrete 0.017s (60.000 fps)
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.167s (6.000 fps)
Size: Discrete 480x270
Interval: Discrete 0.011s (90.000 fps)
Interval: Discrete 0.017s (60.000 fps)
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.167s (6.000 fps)
Size: Discrete 640x360
Interval: Discrete 0.011s (90.000 fps)
Interval: Discrete 0.017s (60.000 fps)
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.167s (6.000 fps)
Size: Discrete 640x480
Interval: Discrete 0.011s (90.000 fps)
Interval: Discrete 0.017s (60.000 fps)
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.167s (6.000 fps)
Size: Discrete 848x480
Interval: Discrete 0.011s (90.000 fps)
Interval: Discrete 0.017s (60.000 fps)
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.167s (6.000 fps)
Size: Discrete 1280x720
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.167s (6.000 fps)

Index       : 1
Type        : Video Capture
Pixel Format: 'UYVY'
Name        : UYVY 4:2:2
Size: Discrete 424x240
Interval: Discrete 0.011s (90.000 fps)
Interval: Discrete 0.017s (60.000 fps)
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.167s (6.000 fps)
Size: Discrete 480x270
Interval: Discrete 0.011s (90.000 fps)
Interval: Discrete 0.017s (60.000 fps)
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.167s (6.000 fps)
Size: Discrete 640x360
Interval: Discrete 0.011s (90.000 fps)
Interval: Discrete 0.017s (60.000 fps)
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.167s (6.000 fps)
Size: Discrete 640x480
Interval: Discrete 0.011s (90.000 fps)
Interval: Discrete 0.017s (60.000 fps)
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.167s (6.000 fps)
Size: Discrete 848x480
Interval: Discrete 0.011s (90.000 fps)
Interval: Discrete 0.017s (60.000 fps)
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.167s (6.000 fps)
Size: Discrete 1280x720
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.167s (6.000 fps)

Index       : 2
Type        : Video Capture
Pixel Format: 'Y8I '
Name        : Greyscale 8 L/R (Y8I)
Size: Discrete 424x240
Interval: Discrete 0.011s (90.000 fps)
Interval: Discrete 0.017s (60.000 fps)
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.167s (6.000 fps)
Size: Discrete 480x270
Interval: Discrete 0.011s (90.000 fps)
Interval: Discrete 0.017s (60.000 fps)
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.167s (6.000 fps)
Size: Discrete 640x360
Interval: Discrete 0.011s (90.000 fps)
Interval: Discrete 0.017s (60.000 fps)
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.167s (6.000 fps)
Size: Discrete 640x480
Interval: Discrete 0.011s (90.000 fps)
Interval: Discrete 0.017s (60.000 fps)
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.167s (6.000 fps)
Size: Discrete 848x480
Interval: Discrete 0.011s (90.000 fps)
Interval: Discrete 0.017s (60.000 fps)
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.167s (6.000 fps)
Size: Discrete 1280x720
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.167s (6.000 fps)
Size: Discrete 1920x1080
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.067s (15.000 fps)

Index       : 3
Type        : Video Capture
Pixel Format: 'Y12I'
Name        : Greyscale 12 L/R (Y12I)
Size: Discrete 960x540
Interval: Discrete 0.040s (25.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Size: Discrete 1920x1080
Interval: Discrete 0.040s (25.000 fps)
Interval: Discrete 0.067s (15.000 fps)

5  boardrider  2017-02-19


ウェブカメラにUVCコントロールを使用する場合は、別の方法があります

uvcdynctrl -f

また、あなたはすることができます

uvcdynctrl -l

をクリックすると、すべてのデバイスが一覧表示されます

4  ptonelli  2014-01-27


タイトルとURLをコピーしました