Object detection and Classification with RTSP or RTP

I read here but don’t understand exactly

How can I do object recognition and classification

First, make sure your RTSP/RTP source is working with the example video-viewer commands from that page. Then, simply substitute imagenet or detectnet program for video-viewer in your command line.

For example, this would perform object detection on an RTP input stream:

$ detectnet --input-codec=h264 rtp://@:1234

like this:
$ detectnet --input-codec=h264 rtp:// or
$ detectnet rtsp://

just like this do i have to write to terminal?

Yes, essentially. First make sure that you can view the RTP/RTSP stream with video-viewer, then just substitute detectnet - they all use the same video I/O command-line arguments.

Note that for RTP input, the IP address will always be localhost (i.e. rtp://@:8080) or a multicast group, because RTP is directed from a source to a specific host or multicast address. Whereas RTSP can be subscribed to, and you provide the source IP for RTSP.

OK, thank you.
When I run detectnet or imagenet, will it recognize objects I previously trained?

i mean in jetson-inference/python/training/detection/ssd

If you want to run a custom model, then use those arguments to load your model in the command line - for example:


detectnet --model=$NET/ssd-mobilenet.onnx --labels=$NET/labels.txt \
          --input-blob=input_0 --output-cvg=scores --output-bbox=boxes \
          --input-codec=h264 rtp://@:8080

You just need to replace the camera input string with RTP/RTSP input string.

Thank you

Hey, again
while i connect to ip camera it shows

i installed the gstreamer but nothing happened. How should i go?

Can you try running with the --input-codec=h264 (or whatever your RTSP stream’s encoding is) like below?

$ video-viewer --input-codec=h264 rtsp://admin:123456@

I tried that too, but i got an error

What error did you get? If it is related to authentication, please see this thread:


For testing, you could also try temporarily disabling username/password authentication on your camera if you think the problem is related to that.