Click here to Skip to main content
15,881,881 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I need to display and record a video stream from an IP camera in a Windows application written in c++ and I have seen various libraries and techniques mentioned such as OpenCV, libVlc, DirectShow. There appears to be the need to invest a lot of time and effort in learning these methods and some of them appear to be 'old hat'. Does anyone have any suggestions as to the current way of approaching display/recording live streams efficiently?

What I have tried:

I have read introductory articles to the above.
Posted
Updated 31-Mar-22 21:12pm
Comments
Shao Voon Wong 1-Apr-22 3:28am    
From my experience working with IP cameras, there is no need to learn these technologies as the IP camera manufacturer provides the SDK to its customers. The SDK is easier to work with than these technologies. Just request from your IP camera supplier.
softwaremonkey 1-Apr-22 6:24am    
Thanks. This is what we have done in the past but it creates a significant amount of re-working each time we change camera vendors. I was looking for a more generic approach that would only involve small changes to the application.

1 solution

You are on the right track with your efforts: it isnt easy at all. But streaming from an IP camera should do some standard software or a simple website with some video control. The article Yet another Web Camera control looks nicely, but it is C#.

The examples from vlc or ffmpeg should give you enough insight for some solution. In my company we are usingffmepg code and are fine with it. Maybe you should consider some UI library like Qt or MFC to build the app.

Be careful with the error handling because has to be most in depth. Check every return code you get and provide some error handling like missing data or lost stream reconnect.
 
Share this answer
 
Comments
softwaremonkey 1-Apr-22 6:30am    
Thanks. My application does use MFC but I am not aware of any MFC classes that would assist with video streaming/rendering. Although the article you refer to is in C#, it has prompted me to explore the DirectShow framework.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900