Object detection of a stream from IP camera over network

I am trying to setup my nano so that I can run imagenet-camera on the stream received from an IP camera.

This camera is not directly connected to the nano through USB. Instead, the connection should be established via the network using its IP.

My googling has led me to believe that I need to establish an RTSP connection inside of gstcamera, but nothing I have tried has worked.

Any ideas on how to approach this?

Thanks in advance,


I set up something with raspberry Pis using vlc to send and receive rtsp. VLC is a simple solution that can stream a pre-processed and compressed video stream from point A to B using RTSP.

One problem using RTSP is that it’s insecure. It’s not encrypted and if somebody manages to intercept your password, well, most people use the same or a variant of a password in most places. Even if wasn’t useful, I could freely spy on your video feed, even modifying the stream. If these are your security cameras, suddenly they are working against you. If you are watching birds, it’s probably not so important.

RTDP is also a UDP based protocol meaning there is no error correction. This could be important if you are relying on wifi at long-ish ranges. Many dropped packets means holes in the video you can’t fix. This means you need a tcp based protocol like http.

There are plenty of http, flash based solutions out there. I would avoid them given the technology is deprecated and support is poor for mobile devices. The last I looked into this the technology was shifting towards html5 video, however there are plenty of other streaming video protocols.

You could just have a samba/nfs/SFTP share on a server somewhere and the cameras perioidically connect to coy their new video files over (or write directly). That’s may be a good solution if your cameras are battery powered. You can even power down wifi this way. Really it all depends on what your needs are. You may be able to get away with using RTSP or you may need something more.

Thanks for the quick reply,

Would VLC allow me to run the stream through imagenet?
I am hoping to run real-time object detection, and am able to get a live stream from my IP camera using streaming platforms like VLC.
However, I am unaware of how to incorporate the stream with the imagenet code.

My cameras will run using POE so I’m not too worried about dropped packets or power and they are not going to be for security but for vehicle detection. I basically want to count vehicles using (ML) imagenet and IP cameras instead of USB cameras on my nano. This is only because I need to place the cameras relatively far away from the nano but still on the same local network.

Vlc is just a tool to stream video around. It has to be encoded beforehand and decoded at the other end. I don’t vlc think it has hw encode/decode in Nano. Thankfully, vlc supports the “copy” video and audio codec that just copy streams around with no modification (and almost no CPU usage)

Your basic idea camera side could be to:

  1. Encode (and preprocess if possible) video on the camera. Pipe the video via stdout or other method to:
  2. Vlc, which accepts connections from or connects to another instance of vlc.

I had a pi set up like this to stream on startup, bit I don’t recommend the Pi for use as a video camera because it lacks a real-time clock and there are unavoidable synch issues with video over the network as a result.

On the host side, you do the reverse:

  1. Have a service running vlc to connect to your camera when they are available (or await connections, up to you which way to set it up).

  2. On successful connection, you send the video stream to your decoder, decode it, and run imagenet or whatever you want.

You may have a look to this.

This is probably an even better solution for the receiving end.

you can change utils/camera/gst-camera/gst-camera.cpp code and decode RTSP stream


Isn’t RTSP as secure as your wifi? It is very insecure inside your wifi but to outsiders, they have to be logged into your wifi, which should be hard.

Rtsp is as secure as the transport. If your traffic never leaves the lan, then it’s as secure as the lan. If you are streaming over the internet, you should assume that others can watch that stream and any credentials you pass… But it sounds like that’s fine here so long as it’s just counting cars on a public street, the creds are unique per camera and not reused to log in via something like ssh.

I need to stream the camera feed from nano to remotely connected pc
Rasberry pi camera is connected to jetson.
jetson and pc are connected on local network.