stereolabs / zed-gstreamer

Package of GStreamer elements to interface with ZED Cameras
https://www.stereolabs.com/docs/gstreamer/
62 stars 24 forks source link

camera-resolution parameter doesn't seem to work #58

Closed antonioarbues closed 2 months ago

antonioarbues commented 3 months ago

Preliminary Checks

Description

Hi, I am trying to run the following pipeline with and without the parameter camera-resolution. If I omit it, the pipeline runs, otherwise it doesn't. Even setting the parameter to the default value of 6 makes the pipeline fail.

gst-launch-1.0 zedsrc stream-type=2 camera-resolution=6 camera-fps=30 ! queue ! videoconvert ! video/x-raw,format=NV12,width=1280,height=1440 ! nvh264enc bitrate=3000 zerolatency=true preset=low-latency-hp rc-mode=cbr-ld-hq ! queue ! appsink name=appsink sync=false async=false emit-signals=true

Steps to Reproduce

Run the command in the terminal with and without camera-resolution parameter

Expected Result

Should work with camera-resolution=6 and with omitting the parameter

Actual Result

Doesn't run when camera-resolution is set

ZED Camera model

ZED Mini

Environment

OS: Ubuntu 22.04
CPU: intel i7
GPU: Nvidia quadro P1000
SDK version: 4.1
zed-gstreamer repo installation method: cloned and built manually from main branch

Anything else?

No response

Myzhar commented 3 months ago

Hi @antonioarbues the problem is that you are not using the correct resolution in videoconvert. If you change camera-resolution you must adapt the full pipeline:

$ gst-launch-1.0 zedsrc stream-type=2 camera-resolution=6 camera-fps=30 ! queue ! videoconvert ! video/x-raw,format=NV12,width=672,height=752 ! nvh264enc bitrate=3000 zerolatency=true preset=low-latency-hp rc-mode=cbr-ld-hq ! queue ! appsink name=appsink sync=false async=false emit-signals=true

antonioarbues commented 2 months ago

You're right, my bad. In fact this works

gst-launch-1.0 zedsrc stream-type=2 camera-fps=30 camera-resolution=6 ! fakesink