LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

IP cameras via RTSP

Good day. How can I capture an RTSP stream from 20 IP cameras and then display it on 20 Image Display? I have cameras made by Beward.

0 Kudos
Message 1 of 8
(2,449 Views)

@lama5 wrote:

Good day. How can I capture an RTSP stream from 20 IP cameras and then display it on 20 Image Display? I have cameras made by Beward.


I'm reasonably certain that LabVIEW does not support communication over the RTSP Protocol,  I have successfully acquired image data from multiple IP cameras communicating over TCP/IP (which LabVIEW does support).

 

Bob Schor

0 Kudos
Message 2 of 8
(2,406 Views)

Can you help with a sample code to solve this problem?

I managed to get an RTSP stream, but only from one camera.

0 Kudos
Message 3 of 8
(2,380 Views)

The only way I have managed to do this in the past is to start an instance of ffMPEG in the background using system exec which acquires the RTSP stream and creates a new MJPEG stream. You can then read from this MJPEG stream and extract the JPEG files for each frame.

 

Converting the JPEG files to something you can display is another challenge but there are few posts floating around discussing how to do that.

 

I have not dealt with RTSP in the past, but I warn you depending upon your frame rate handling 20 streams will not be gentle on your CPU and network. Definitely doable you just have to be careful.

 

How have you managed to get an RTSP stream in LabVIEW at the moment

0 Kudos
Message 4 of 8
(2,373 Views)

Yes, I have this problem. What other way can I use? I don't have a strict requirement to use only RTSP stream. I am a novice user, and this is the only way that I was prompted. Currently, a solution using Callback functions is being used. The libraries are written in C++.

0 Kudos
Message 5 of 8
(2,371 Views)

@lama5 wrote:

Can you help with a sample code to solve this problem?

I managed to get an RTSP stream, but only from one camera.


A single video stream only supports a single camera.  So what you need to do is the following:

  • Write a sub-VI that "does everything you need to do with a single camera".  It needs to initialize the Camera, set up its parameters, start acquiring images, open a video output file, stream the images from the camera to the file, close the file, shut down the camera, all under whatever User Control you require.
  • Once you have this "one-camera" VI working, add an "identifier" as a Control to this VI that identifies the Camera and Video (from 1 to how ever many cameras you are trying to run simultaneously).
  • What you now want to do is to run this VI as a "Clone", a unique Instance of this code that runs as Pre-allocated Reentrant VI, started with Start Asynchronous Call.  You generate as many such Clones as you have Cameras and "bandwidth" (meaning Ethernet Traffic and Disk I/O for the video files), keeping an Array of their references so you can manage them properly.

None of this is particularly easy.  I had at least 5 years experience with LabVIEW before a colleague asked me to help him with a multi-camera multi-video "problem", and it took several months of hard work to get it started.  But if you've worked with Asynchronous Clones before, and have several years of LabVIEW Vision experience, you should be alright.

 

Bob Schor

0 Kudos
Message 6 of 8
(2,356 Views)

I don't have that much experience. Just starting to use LabVIEW. But the task exists. No need to save to a file. Only display on the indicator. We managed to capture the stream using ActiveX, but even one stream loads the computer heavily.
I will look for another solution.

0 Kudos
Message 7 of 8
(2,324 Views)

Hi lama5,

Can you help me , how to stream in RTSP ? 

0 Kudos
Message 8 of 8
(1,421 Views)