09-21-2021 04:18 AM
Hi everyone,
I have an IP camera and I need to integrate video streaming into my program.
The only protocol available is RTSP. I cannot use the webserver of the camera via the Internet Explorer ActiveX because every time it would be necessary to re-enter the login credentials.
How can I show the RTSP stream in CVI?
Thanks in advance,
Mattia Guerra
09-21-2021 08:40 AM - edited 09-21-2021 08:40 AM
Most likely the "easiest" thing would be to use the VLC library from your program. Easiest is between quotes here because VLC does do the RTPS handling for you but you still will need to get the data from a VLC object into a LabWindows/CVI control.
09-21-2021 10:33 AM
Hi rolfk,
Thanks for your reply.
I tried using VLC's activeX by creating the controller from CVI but I was unable to view even a video file.
I also noticed that CVI is unstable with the activeX in the UIR. It crashes many times.
The project is attached. Can you help me?
Thanks
09-21-2021 01:50 PM
ActiveX is old and nowadays really just a legacy technology. Maybe that the VLC ActiveX control is well programmed, or maybe not. In general trying to use ActiveX nowadays is a sure way to paint yourself into a corner if you plan to do anything that isn't just a quick and dirty trial.
Personally I would use the DLL interface of VLC. But that is quite low level programming. Maybe there is a .Net control or at least a .Net Automation interface to VLC. You may have to do some real work in converting image data from the VLC interface into something that can be displayed in a native LabWindows/CVI control.
09-23-2021 02:14 AM
I have been trying to find a solution in the past few days but have not found anything that helps me.
I also found the attached SDK (https://we.tl/t-tjg23KTdWk) but it is in C ++ and is not integrable in CVI. Furthermore, the example is very confusing
The road to the solution seems very complex indeed.
If you could help me take the correct path to the solution I would be truly grateful.
09-23-2021 02:20 AM - edited 09-23-2021 02:29 AM
I'm sorry but I'm swamped with real work. Aside from that I don't really program in LabWindows/CVI most of the time. I do quite a bit of C (and some C++) but that is mostly for integrating it into LabVIEW. While I used to work with CVI quite a bit in the past, I haven't done serious work recently. In fact it is not even installed on my current PC.
RTSP is quite a complex technology. You don't want to program on the RTSP level itself. But there are also a myriad of video streaming libraries out there and many are open source, although licensing can be sometimes a tricky thing.
Possible candidates would be:
- FFmpeg
- Live555
- OpenRTSP
- VLC (which I believe uses under the hood parts of above projects)
None of them is a ready made solution when you want to integrate it somewhere. Partly that is simply the character of the beast, video streaming is really complex, and partly it is also the business model of those projects. They are usually carried by an entity that makes a living of providing the according services. While the code is open source, use of it is complex enough that they gladly want to sell you their services.