Help with connecting Ip camera to jetson nano and to Azure IoT Edge

Hi,
my setup is:

  • Hardware Platform (Jetson Nano)
  • Deepstream Version 4.0.2
  • Jetpack Version 4.3
  • Dahua IP Camera

In my configuration file I have:

[sink3]
enable=1
#Type - 1=FakeSink 2=EglSink 3=File 4=RTSPStreaming
type=4
#1=h264 2=h265
codec=1
sync=0
bitrate=4000000
# set below properties in case of RTSPStreaming
rtsp-port=8554
#udp-port=5400

I’m using Azure IoT edge and deepstream. The 4 modules; iotCentralBridge, deepstream, edgeAgent and edgeHub seems running correctly. With the “traffic video demo” I get the telemetry data in Azure IoT central and I can see the output video using VLC with the URL: rtsp://192.168.1.3:8554/ds-test

Now I want to use my own IP camera to do the same but I don’t know why it is not working.

I already checked that my camera is funtional using VLC but only as an input rtsp://admin:12345678W@192.168.1.108:554/cam/realmonitor?channel=1&subtype=1

Do somebody know what I’m missing to connect the Ip camera to the IoT edge?

I’m following this tutorial and I should get something like this.

Thank you.

Hi,
After connecting the IP camera and a TV through HDMI with Jetson Nano, please try the gstreamer pipeline:

$ gst-launch-1.0 uridecodebin uri=rtsp://admin:12345678W@192.168.1.108:554/cam/realmonitor?channel=1&subtype=1 ! nvoverlaysink

And check if you can see video preview.

Seems that I still can’t connect the IP camera to the Jetson Nano. I can’t see the video preview with a TV through HDMI. I get the error:

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://admin:12345678W@192.168.1.108:554/cam/realmonitor?channel=1
Progress: (open) Retrieving server options
Progress: (open) Retrieving media info
ERROR: from element /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source: Could not open resource for reading.
Additional debug info:
gstrtspsrc.c(5829): gst_rtspsrc_setup_auth (): /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source:
No supported authentication protocol was found
ERROR: pipeline doesn't want to preroll.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

Hi,
Please check

Since it fails in rtspsrc ! fakesink, it seems to be an issue in rtspsrc plugin. We would suggest go to gstreamer forum to get assistance.

Ok, I will, thanks

Hi,
the previous problem was because it doesn’t admit the"&" character, so I replaced it with “/”
So, the rtspsrc works and I can see the video preview in TV through HDMI

dlinano@jetson-nano:~$ gst-launch-1.0 uridecodebin uri=rtsp://admin:12345678W@192.168.1.108:554/cam/realmonitor?channel=1/subtype=1 ! nvoverlaysink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://admin:12345678W@192.168.1.108:554/cam/realmonitor?channel=1/subtype=1
Progress: (open) Retrieving server options
Progress: (open) Retrieving media info
Progress: (request) SETUP stream 0
Progress: (open) Opened Stream
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Progress: (request) Sending PLAY request
Progress: (request) Sending PLAY request
Progress: (request) Sent PLAY request
Opening in BLOCKING MODE 
NvMMLiteOpen : Block : BlockType = 261 
NVMEDIA: Reading vendor.tegra.display-size : status: 6 
NvMMLiteBlockCreate : Block : BlockType = 261 
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:05.407572851
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

Then again connected the Jetson to my dev machine trough USB, and still can not see the output video of my IP camera in VLC. The VLC show me this error
Your input can’t be opened:

“VLC is unable to open the MRL ‘rtsp://192.168.55.1:8554/ds-test’. Check the log for details”

and its log says:

main debug: processing request item: rtsp://192.168.55.1:8554/ds-test, node: Playlist, skip: 0
main debug: resyncing on rtsp://192.168.55.1:8554/ds-test
main debug: rtsp://192.168.55.1:8554/ds-test is at 4
main debug: starting playback of new item
main debug: resyncing on rtsp://192.168.55.1:8554/ds-test
main debug: rtsp://192.168.55.1:8554/ds-test is at 4
main debug: creating new input thread
main debug: Creating an input for 'rtsp://192.168.55.1:8554/ds-test'
main debug: requesting art for new input thread
main debug: using timeshift granularity of 50 MiB
main debug: using timeshift path: C:\Users\renan\AppData\Local\Temp
main debug: `rtsp://192.168.55.1:8554/ds-test' gives access `rtsp' demux `any' path `192.168.55.1:8554/ds-test'
main debug: creating demux: access='rtsp' demux='any' location='192.168.55.1:8554/ds-test' file='\\192.168.55.1:8554\ds-test'
main debug: looking for access_demux module matching "rtsp": 15 candidates
live555 debug: version 2016.11.28
main debug: looking for meta fetcher module matching "any": 1 candidates
lua debug: Trying Lua scripts in C:\Users\renan\AppData\Roaming\vlc\lua\meta\fetcher
lua debug: Trying Lua scripts in C:\Program Files\VideoLAN\VLC\lua\meta\fetcher
main debug: no meta fetcher modules matched
main debug: looking for art finder module matching "any": 2 candidates
lua debug: Trying Lua scripts in C:\Users\renan\AppData\Roaming\vlc\lua\meta\art
lua debug: Trying Lua scripts in C:\Program Files\VideoLAN\VLC\lua\meta\art
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\lua\meta\art\00_musicbrainz.luac
lua debug: skipping script (unmatched scope) C:\Program Files\VideoLAN\VLC\lua\meta\art\00_musicbrainz.luac
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\lua\meta\art\01_googleimage.luac
lua debug: skipping script (unmatched scope) C:\Program Files\VideoLAN\VLC\lua\meta\art\01_googleimage.luac
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\lua\meta\art\02_frenchtv.luac
qt debug: IM: Setting an input
lua debug: skipping script (unmatched scope) C:\Program Files\VideoLAN\VLC\lua\meta\art\02_frenchtv.luac
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\lua\meta\art\03_lastfm.luac
lua debug: skipping script (unmatched scope) C:\Program Files\VideoLAN\VLC\lua\meta\art\03_lastfm.luac
main debug: no art finder modules matched
main debug: looking for meta fetcher module matching "any": 1 candidates
lua debug: Trying Lua scripts in C:\Users\renan\AppData\Roaming\vlc\lua\meta\fetcher
lua debug: Trying Lua scripts in C:\Program Files\VideoLAN\VLC\lua\meta\fetcher
main debug: no meta fetcher modules matched
main debug: looking for art finder module matching "any": 2 candidates
lua debug: Trying Lua scripts in C:\Users\renan\AppData\Roaming\vlc\lua\meta\art
lua debug: Trying Lua scripts in C:\Program Files\VideoLAN\VLC\lua\meta\art
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\lua\meta\art\00_musicbrainz.luac
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\lua\meta\art\01_googleimage.luac
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\lua\meta\art\02_frenchtv.luac
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\lua\meta\art\03_lastfm.luac
main debug: no art finder modules matched
live555 debug: connection timeout
live555 error: Failed to connect with rtsp://192.168.55.1:8554/ds-test
main debug: no access_demux modules matched
main debug: creating access: rtsp://192.168.55.1:8554/ds-test
main debug: (path: \\192.168.55.1:8554\ds-test)
main debug: looking for access module matching "rtsp": 27 candidates
satip debug: try to open 'rtsp://192.168.55.1:8554/ds-test'
satip debug: connect to host '192.168.55.1'
main debug: net: connecting to 192.168.55.1 port 8554
main debug: connection succeeded (socket = 1804)
main debug: net: opening 0.0.0.0 datagram port 9160
main debug: net: opening 0.0.0.0 datagram port 9161
satip error: Failed to setup RTSP session
main debug: net: connecting to 192.168.55.1 port 8554
main debug: connection succeeded (socket = 1804)
access_realrtsp warning: Cseq mismatch, got 1, assumed 0
access_realrtsp debug: rtsp connected
access_realrtsp warning: only real/helix rtsp servers supported for now
main debug: no access modules matched
main debug: dead input
qt debug: IM: Deleting the input
main debug: changing item without a request (current 4/5)
main debug: nothing to play

PS.- I also removed the “gstreamer ugly” pluggin

Hi,
There is a sample config file for Nano:

source8_1080p_dec_infer-resnet_tracker_tiled_display_fp16_nano.txt

Please check if you can run the default one. And then enable [sink2] to try RTSP streaming. If the IP address of Nano(looks to be 192.168.55.1 from the log) and ethernet connection is good, it should work fine.

I can run the default one with:

$ deepstream-app -c deepstream_sdk_v4.0.2_jetson/samples/configs/deepstream-app/source8_1080p_dec_infer-resnet_tracker_tiled_display_fp16_nano.txt

but once I enable [sink2] of that sample config file and run it, I get this messages:

WARNING from sink_sub_bin_sink1: A lot of buffers are being dropped.
Debug info: gstbasesink.c(2902): gst_base_sink_is_too_late (): /GstPipeline:pipeline/GstBin:processing_bin_0/GstBin:sink_bin/GstBin:sink_sub_bin1/GstNvOverlaySink-nvoverlaysink:sink_sub_bin_sink1:
There may be a timestamping problem, or this computer is too slow.

Although I found a similar problem in the forum, of avoiding those warning messages by setting “sync=0” in [sink0], but I still without been able to stream it to VLC

The error message in VLC still been:

Your input can’t be opened:

VLC is unable to open the MRL …

Hi,
For cross comparison, please run a RTSP server through test-launch on Nano and check if you can open the stream from another PC. Please refer to the steps in
Jetson Nano FAQ
Q: Is there any example of running RTSP streaming?

The implementation in DeepStream SDK is same as test-launch. See if you can run it successfully.

Hi,
Yes, It ran succesfully doing the cross comparision. I can see the videotestsrc in VLC