Stream multiple IP (RTSPSRC) camera with TK1

Hi,

I am a newbie in GStreamer. I am trying to stream multiple IP camera and show it to display. I am able to stream one camera with below command,

#gst-launch-0.10 rtspsrc location=rtsp://USERID:PASSWORD@IP_ADDR:PORT latency=0 ! rtph264depay ! nv_omx_h264dec ! nv_omx_videosink

After some research I know that we can use queue and overlay , but unable to make it work.
Can someone please guide me.

Thanks in advance.

Hi,
If you have multiple rtsp sources, you may run each source in individual gstreamer pipeline.

1 Like

Hi,

I am trying to run with below two command, But unable to get second camera output. Can you please suggest how can I achieve.

gst-launch-0.10 rtspsrc location=rtsp://USERID:PASSWORD@IP_ADDR:PORT latency=0 ! rtph264depay ! nv_omx_h264dec ! nv_omx_videosink rtspsrc location=rtsp://admin:USERID:PASSWORD@IP_ADDR:PORT latency=0 ! rtph264depay ! nv_omx_h264dec ! nv_omx_videosink

gst-launch-0.10 rtspsrc location=rtsp://USERID:PASSWORD@IP_ADDR:PORT latency=0 ! rtph264depay ! nv_omx_h264dec ! nv_omx_videosink overlay-x=800 overlay-y=0 overlay-w=700 overlay-h=500 &

gst-launch-0.10 rtspsrc location=rtsp://USERID:PASSWORD@IP_ADDR:PORT latency=0 ! rtph264depay ! nv_omx_h264dec ! nv_omx_videosink overlay-x=0 overlay-y=0 overlay-w=700 overlay-h=500 &

Hi,
Below two commands run fine:

gst-launch-1.0 filesrc location= videoplayback.mp4 ! qtdemux ! h264parse ! omxh264dec ! nvhdmioverlaysink overlay-w=640 overlay-h=480 overlay=1 & gst-launch-1.0 filesrc location= videoplayback.mp4 ! qtdemux ! h264parse ! omxh264dec ! nvhdmioverlaysink overlay-x=700 overlay-w=640 overlay-h=480 overlay=2 &
gst-launch-0.10 filesrc location= videoplayback.mp4 ! qtdemux ! h264parse ! nv_omx_h264dec ! nv_omx_hdmi_videosink overlay-w=640 overlay-h=480 overlay=1 & gst-launch-0.10 filesrc location= videoplayback.mp4 ! qtdemux ! h264parse ! nv_omx_h264dec ! nv_omx_hdmi_videosink overlay-x=700 overlay-w=640 overlay-h=480 overlay=2 &

Please replace with your rtspsrc and give it a try.

Hi ,

I tried with gst-launch-0.10, I am getting 2 camera’s but I want 4 camera’s to be display.
I saw the nv_omx_hdmi_videosink pad property, overlay property have 1-2 range. So I can’t stream 3rd and 4th camera.

How can I achieve this ?

Hi,
You may use nveglglessink:

$ export DISPLAY=:0
$ gst-launch-1.0 filesrc location= a.mp4 ! qtdemux ! h264parse ! omxh264dec ! nveglglessink & gst-launch-1.0 filesrc location= a.mp4 ! qtdemux ! h264parse ! omxh264dec ! nveglglessink & gst-launch-1.0 filesrc location= a.mp4 ! qtdemux ! h264parse ! omxh264dec ! nveglglessink &gst-launch-1.0 filesrc location= a.mp4 ! qtdemux ! h264parse ! omxh264dec ! nveglglessink &

You have to manually adjust x, y, w, h of each window.

There is no other way like I can use videomixer and mix 4 camera’s into one stream and I can send it to display.

Any example ?

Hi,
Please refer to

$ gst-launch-1.0 videomixer name=mix sink_1::xpos=660 sink_1::ypos=60 ! xvimagesink filesrc location= a.mp4 ! qtdemux ! h264parse ! omxh264dec ! nvvidconv ! video/x-raw,format=I420,width=640,height=480 ! mix. filesrc location= a.mp4 ! qtdemux ! h264parse ! omxh264dec ! nvvidconv ! video/x-raw,format=I420,width=640,height=360 ! mix.

videomixer and xvimagesink are 3rdparty plugins consuming CPU cycles. Suggest you run in max performance:
https://elinux.org/Jetson/Performance

We have nvcompositor plugin which leverages hardware engine on Jetson Nano. You may take a look if you have further performance request.
https://developer.nvidia.com/embedded/dlc/l4t-multimedia-api-reference-32-1

Hi,

Is it not possible to use Nvidia SINK instead of Xvimagesink. So that I can utilize GPU effectively.

What will be the limitation ?

Hi,
For your usecase, we have proposed working pipelines on TK1. Other users may have better idea to share.

There are optimizations in new releases. You may consider to use other Jetson platforms.

Okay Thanks.
If you come across any, please post it here.