Hi, it works! Thanks! With low latency, but I have several points and doubts:
1st:
The streamings had a lot of microcuts, but I solved it by switching from h264 to h265
2nd
It works perfect with this command:
gst-launch-1.0 nvarguscamerasrc ! nvvidconv ! video/x-raw,width=1280,height=720,framerate=30/1 ! timeoverlay valignment=4 halignment=1 ! nvvidconv ! 'video/x-raw(memory:NVMM),width=1280,height=720' ! tee name=t ! nvv4l2h265enc insert-sps-pps=1 idrinterval=15 ! h265parse ! rtph265pay ! udpsink host=192.168.0.118 port=5000 sync=0 t. ! queue ! nvegltransform ! nveglglessink sync=0
But when I try to launch:
Server:
./test-launch nvarguscamerasrc ! nvvidconv ! video/x-raw,width=1280,height=720,framerate=30/1 ! timeoverlay valignment=4 halignment=1 ! nvvidconv ! 'video/x-raw(memory:NVMM),width=1280,height=720' ! tee name=t ! nvv4l2h265enc insert-sps-pps=1 idrinterval=15 ! h265parse ! rtph265pay ! udpsink host=127.0.0.1 port=8554 sync=0 t. ! queue ! nvegltransform ! nveglglessink sync=0
Client:
gst-launch-1.0 uridecodebin uri=rtsp://127.0.0.1:8554/test ! nvoverlaysink
I get this error:
(test-launch:17419): GLib-GObject-WARNING **: 15:13:47.307: invalid cast from 'GstNvArgusCameraSrc' to 'GstBin'
(test-launch:17419): GStreamer-CRITICAL **: 15:13:47.307: gst_bin_get_by_name: assertion 'GST_IS_BIN (bin)' failed
(test-launch:17419): GLib-GObject-WARNING **: 15:13:47.307: invalid cast from 'GstNvArgusCameraSrc' to 'GstBin'
(test-launch:17419): GStreamer-CRITICAL **: 15:13:47.307: gst_bin_get_by_name: assertion 'GST_IS_BIN (bin)' failed
(test-launch:17419): GLib-GObject-WARNING **: 15:13:47.307: invalid cast from 'GstNvArgusCameraSrc' to 'GstBin'
(test-launch:17419): GStreamer-CRITICAL **: 15:13:47.307: gst_bin_get_by_name: assertion 'GST_IS_BIN (bin)' failed
3rd
As JerryChang said on IMX219 set sensor_mode
There are several modes with diferent framerates and resolution for the IMX219, and depending of the resolution and the framerate wrote on the command it will switch to the closest sensor mode. However I tried 1280x720@120fps:
gst-launch-1.0 nvarguscamerasrc ! nvvidconv ! video/x-raw,width=1280,height=720,framerate=120/1 ! timeoverlay valignment=4 halignment=1 ! nvvidconv ! 'video/x-raw(memory:NVMM),width=1280,height=720' ! tee name=t ! nvv4l2h265enc insert-sps-pps=1 idrinterval=15 ! h265parse ! rtph265pay ! udpsink host=192.168.0.118 port=5000 sync=0 t. ! queue ! nvegltransform ! nveglglessink sync=0
But i get this error and it stopped:
Setting pipeline to PAUSED ...
Using winsys: x11
Opening in BLOCKING MODE
Pipeline is live and does not need PREROLL ...
Got context from element 'eglglessink0': gst.egl.EGLDisplay=context, display=(GstEGLDisplay)NULL;
Setting pipeline to PLAYING ...
New clock: GstSystemClock
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3264 x 2464 FR = 21,000000 fps Duration = 47619048 ; Analog Gain range min 1,000000, max 10,625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 3264 x 1848 FR = 28,000001 fps Duration = 35714284 ; Analog Gain range min 1,000000, max 10,625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 1920 x 1080 FR = 29,999999 fps Duration = 33333334 ; Analog Gain range min 1,000000, max 10,625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 1640 x 1232 FR = 29,999999 fps Duration = 33333334 ; Analog Gain range min 1,000000, max 10,625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 1280 x 720 FR = 59,999999 fps Duration = 16666667 ; Analog Gain range min 1,000000, max 10,625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 1280 x 720 FR = 120,000005 fps Duration = 8333333 ; Analog Gain range min 1,000000, max 10,625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 2
Output Stream W = 1920 H = 1080
seconds to Run = 0
Frame Rate = 29,999999
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
ERROR: from element /GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:00.401237835
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
GST_ARGUS: Cleaning up
CONSUMER: Done Success
GST_ARGUS: Done Success
Setting pipeline to NULL ...
Freeing pipeline ...
I also tried 3264x1848:
gst-launch-1.0 nvarguscamerasrc ! nvvidconv ! video/x-raw,width=3264,height=1848,framerate=30/1 ! timeoverlay valignment=4 halignment=1 ! nvvidconv ! 'video/x-raw(memory:NVMM),width=1280,height=720' ! tee name=t ! nvv4l2h265enc insert-sps-pps=1 idrinterval=15 ! h265parse ! rtph265pay ! udpsink host=192.168.0.118 port=5000 sync=0 t. ! queue ! nvegltransform ! nveglglessink sync=0
And it works but I get this response, so im not sure if it is working on the resolution I wanted:
Using winsys: x11
Opening in BLOCKING MODE
Pipeline is live and does not need PREROLL ...
Got context from element 'eglglessink0': gst.egl.EGLDisplay=context, display=(GstEGLDisplay)NULL;
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Redistribute latency...
NvMMLiteOpen : Block : BlockType = 8
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 8
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3264 x 2464 FR = 21,000000 fps Duration = 47619048 ; Analog Gain range min 1,000000, max 10,625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 3264 x 1848 FR = 28,000001 fps Duration = 35714284 ; Analog Gain range min 1,000000, max 10,625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 1920 x 1080 FR = 29,999999 fps Duration = 33333334 ; Analog Gain range min 1,000000, max 10,625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 1640 x 1232 FR = 29,999999 fps Duration = 33333334 ; Analog Gain range min 1,000000, max 10,625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 1280 x 720 FR = 59,999999 fps Duration = 16666667 ; Analog Gain range min 1,000000, max 10,625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 1280 x 720 FR = 120,000005 fps Duration = 8333333 ; Analog Gain range min 1,000000, max 10,625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 2
Output Stream W = 1920 H = 1080
seconds to Run = 0
Frame Rate = 29,999999
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
NVMEDIA: H265 : Profile : 1
It says that it catch camera mode 2.