개요
카메라(Camera)의 지원 가능한 해상도 목록 정보를 확인하는 방법을 알아 보겠습니다.
v4l2-ctl
"v4l2-ctl" 명령을 이용하면 손쉽게 지원 가능한 해상도 목록 정보를 얻을 수 있습니다.
vas@raspberrypi:~ $ v4l2-ctl -d /dev/video0 --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture
[0]: 'MJPG' (Motion-JPEG, compressed)
Size: Discrete 640x480
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)
Size: Discrete 352x288
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)
Size: Discrete 320x240
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)
Size: Discrete 176x144
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)
Size: Discrete 160x120
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)
ffmpeg
"ffmpeg" 명령을 다음과 같이 실행하면, 카메라가 지원하는 해상도 정보를 얻을 수 있습니다.
vas@raspberrypi:~ $ ffmpeg -f video4linux2 -list_formats all -i /dev/video0
ffmpeg version 4.3.5-0+deb11u1+rpt2 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 10 (Debian 10.2.1-6)
configuration: --prefix=/usr --extra-version=0+deb11u1+rpt2 --toolchain=hardened --incdir=/usr/include/aarch64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --disable-mmal --enable-neon --enable-v4l2-request --enable-libudev --enable-epoxy --enable-sand --libdir=/usr/lib/aarch64-linux-gnu --arch=arm64 --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-vout-drm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
[video4linux2,v4l2 @ 0x55c996f750] Compressed: mjpeg : Motion-JPEG : 640x480 352x288 320x240 176x144 160x120
/dev/video0: Immediate exit requested
gst-device-monitor-1.0
"gst-device-monitor-1.0" 명령을 이용하면 카메라 뿐만 아니라, 오디오 관련 정보까지 모두 확인할 수 있습니다. 이 명령을 이용하기 위해서는 사전에 "gstreamer1.0-plugins-base-apps" 패키지를 설치해야 합니다.
vas@raspberrypi:~ $ gst-device-monitor-1.0
Probing devices...
[143:17:43.917069594] [54142] INFO Camera camera_manager.cpp:293 libcamera v0.0.1+54-d528119f
Device found:
name : /base/scb/pcie@7d500000/pci@0,0/usb@0,0-1.4.4:1.0-0c45:62f0
class : Source/Video
caps : image/jpeg, width=160, height=120
image/jpeg, width=176, height=144
image/jpeg, width=320, height=240
image/jpeg, width=352, height=288
image/jpeg, width=640, height=480
gst-launch-1.0 libcamerasrc camera-name="/base/scb/pcie\@7d500000/pci\@0\,0/usb\@0\,0-1.4.4:1.0-0c45:62f0" ! ...
참고자료
- "How can I find out the supported webcam resolutions?":https://askubuntu.com/questions/214977/
728x90
반응형
'Linux,Unix,BSD > RaspberryPI' 카테고리의 다른 글
[RPi 4] NodeJS 20.x에서 발생하는 GLIBCXX_3.4.26 오류 문제 (0) | 2024.03.25 |
---|---|
[RPi] OpenVINO 빌드 중 발생한 오류 - Python module 'cython>=0.29.22' is missed (0) | 2022.11.16 |
[RPi] 와치독(watchdog) 설정하기 (0) | 2022.08.03 |
[RPi] DNS 찾지 못하는 문제 (0) | 2022.07.30 |
[RPi 4] NodeJS 최신 버전 설치하기 (0) | 2022.07.15 |