Черный экран с использованием gstreamer и opencv - PullRequest
1 голос
/ 29 января 2020

У меня есть камера openROV, и мой компьютер распознал ее. Однако при попытке открыть камеру с помощью OpenCv у меня появился черный экран и ошибка выбора тайм-аута. Я также попытался с помощью gstreamer открыть камеру с помощью следующей команды:

gst-launch-1.0 -v v4l2src device=/dev/video5 ! video/x-raw,format=\(string\)NV12,width=\(int\)1920,height=\(int\)1080 ! videoconvert ! xvimagesink

и получил те же результаты (черный экран). Я тоже пробовал с понижением разрешения безрезультатно. Вывод gstreamer помимо экрана был:

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:src: caps = video/x-raw, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, format=(string)YV12
/GstPipeline:pipeline0/GstXvImageSink:xvimagesink0.GstPad:sink: caps = video/x-raw, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, format=(string)YV12
/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, interlace-mode=(string)progressive

Это вывод gst-device-monitor-1.0

Device found:
        name  : Condor: Condor
        class : Video/Source
        caps  : video/x-raw, format=(string)NV12, width=(int)2688, height=(int)1520, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){...}
properties:
        udev-probed = true
        device.bus_path = pci-0000:00:14.0-usb-0:3:1.2
        sysfs.path = /sys/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.2/video4linux/video5
        device.bus = usb
        device.subsystem = video4linux
        device.vendor.id = 29fe
        device.vendor.name = "GEO\\x20Semi"
        device.product.id = 4d53
        device.product.name = "Condor:\ Condor"
        device.serial = GEO_Semi_Condor_12345
        device.capabilities = :capture:
        device.api = v4l2
        device.path = /dev/video5
        v4l2.device.driver = uvcvideo
        v4l2.device.card = "Condor:\ Condor"
        v4l2.device.bus_info = usb-0000:00:14.0-3
        v4l2.device.version = 328461 (0x0005030d)
        v4l2.device.capabilities = 2225078273 (0x84a00001)
        v4l2.device.device_caps = 69206017 (0x04200001)
gst-launch-1.0 v4l2src device=/dev/video5 ! ...

Есть ли способ решить эту проблему?

...