RidgeRun / gst-interpipe

GStreamer plug-in for interpipeline communication
Other
140 stars 63 forks source link

How to set gainrange and expsosuretimerange when creating source pipe (solved) #144

Open tbanetwork opened 1 year ago

tbanetwork commented 1 year ago

First of all thank you for this awesome project. It has made my life way easier!

At the moment, I'm successfully running an interpipe source. Unfortunately i need a fixed gain and exposure time and im struggling with setting it up.

My source is set up with the following (working) command:

./gstd/bin/gstd-client pipeline_create cam_src_pipe nvarguscamerasrc sensor-id=0 sensor_mode=0 awblock=true aeloc=true \ ! 'video/x-raw(memory:NVMM),width=3840,height=2160,framerate=25/1' \ ! nvvidconv flip-method=3 \ ! nvjpegenc quality=95 \ ! interpipesink name=cam_src

As soon as i try to add

exposuretimerange="34000 358733000" gainrange="1 16"

which results in

./gstd/bin/gstd-client pipeline_create cam_src_pipe nvarguscamerasrc sensor-id=0 sensor_mode=0 awblock=true aeloc=true exposuretimerange="34000 358733000" gainrange="1 16" \ ! 'video/x-raw(memory:NVMM),width=3840,height=2160,framerate=25/1' \ ! nvvidconv flip-method=3 \ ! nvjpegenc quality=95 \ ! interpipesink name=cam_src

gstd fails with the following error:

GstD version 0.14.0 Copyright (C) 2015-2021 RidgeRun (https://www.ridgerun.com)

0:00:10.030206567 1283 0x55badabd90 ERROR gstdpipeline gstd_pipeline.c:513:gstd_pipeline_create:GstdPipeline@0x7f78008810 Unable to create pipeline: no element "358733000" 0:00:10.030323236 1283 0x55badabd90 ERROR gstdlist gstd_list.c:235:gstd_list_create:GstdList@0x55bad4b000 Could not create the resource "cam_src_pipe" on "pipelines" 0:00:10.077636692 1283 0x55badabd90 ERROR gstdlistreader gstd_list_reader.c:111:gstd_list_reader_read:GstdListReader@0x55bad452c0 No resource cam_src_pipe in (null) 0:00:10.077680130 1283 0x55badabd90 ERROR gstdsession gstd_session.c:292:gstd_get_by_uri:GstdSession@0x55bad47020 Invalid node cam_src_pipe GST_ARGUS: NvArgusCameraSrc: Setting Exposure Time Range : 34000 GST_ARGUS: Need two values to set range

I do think its a problem of passing the arguments correctly to nvarguscamerasrc, but i do not know how to do it properly.

Any help would be greatly appreciated.

Thank you Timo

tbanetwork commented 1 year ago

As always, after fiddling around for quite a while and asking the question on github i found it out by myself.

So if anyone got the same problem, here is what to do:

./gstd/bin/gstd-client pipeline_create cam_src_pipe nvarguscamerasrc 'sensor-id=0 sensor_mode=0 awblock=true aeloc=true exposuretimerange="34000 358733000" gainrange="1 16"' ! 'video/x-raw(memory:NVMM),width=3840,height=2160,framerate=25/1' ! nvvidconv flip-method=3 ! nvjpegenc quality=95 ! interpipesink name=cam_src

The trick was to put all nvarguscamerasrc arguments in ''

Best regards Timo