C# .NET Winforms
AnsweredHi there. Is there an existing way to show live video in a winforms c# project?
-
Hello Joseph,
You could stream live video from the Server using Video API.
See API documentation in the web interface of the Server.
Here is the link
https://<your server IP address>:7001/static/api.xml#group_Video_API
0 -
That video API streaming is through the browser correct? Or can it be embedded into a windows form in .NET?
0 -
Joseph,
That video API streaming is through the browser correct?
No, it's not correct. API stands for Application Programming Interface. That means any application can use this interface to access video streaming capabilities of the Server.
can it be embedded into a windows form in .NET?
Yes, it could as long as your .NET application can access Server Video API, pull a stream, decode frames and display them in the Windows form.
I suppose, there should be third party video player components for .NET.
0 -
I know there's lots of third party video players that can stream individual cameras, however lots of companies who sell NVR's with cameras provide SDKs that allow us to connect to their NVR via their prebuilt SDK, and once connected we can access all the cameras in that NVR. This is usually faster and better quality then using a third party video player to connect to individual camera streams.
0 -
Hi, @...
Thanks for reaching out to us!
Can you add some context -- why do you need C# WinForms specifically and what are you trying to achieve/build?
I'm collecting this so that we better understand what developers need and what we probably lack in our platform.
P.S. We do have SDK, but it doesn't have a player or anything like WinForms in it. Our SDK is primarily used for plugins development (Metadata SDK, Storage SDK, etc).0 -
We create software for monitoring centres. These monitoring centres support lots of businesses who use a range of different branded NVRs. Monitoring centre stuff on occasion want to view the live feed of a whole NVR, so brands that have NVR SDKs allow us very easily to connect to the NVR directly and display all streams available. We technically could just use something like a VLC plugin for each individual stream but that's a lot slower and the quality isn't great, which is why we look for NVR brands that provide SDKs for access
0 -
@...
Sorry, but I didn't understand why you need C# winforms for connecting to Nx.
How Nx Server fits in the scenario that you've described?
Why monitoring center staff can't view streams in Nx Client? Or are you developing some custom software, that can connect to different NVRs and you want to embed streams from Nx in the same software?0 -
Joseph,
Thank you forĀ your explanation.
We technically could just use something like a VLC plugin for each individual stream but that's a lot slower and the quality isn't great, which is why we look for NVR brands that provide SDKs for access
We don't have an SDK for accessing video streams, just because we use standard protocols and interfaces: RTSP, HLS etc., for which there are plenty of ready-to-use libs and frameworks on the Internet. Our own client application uses the same HTTP API for accessing video streams.
Here are several examples.
For C# the DirectShow from MS should be appropriate.
https://docs.microsoft.com/en-us/windows/win32/directshow/introduction-to-directshow-application-programming
Here is an example of "How to play a file with DirectShow"https://docs.microsoft.com/en-us/windows/win32/directshow/how-to-play-a-file
Or even more advanced "Audio/Video Playback in DirectShow"
https://docs.microsoft.com/en-us/windows/win32/directshow/audio-video-playback-in-directshow
Here is another suitable framework http://directshownet.sourceforge.net/about.html
The main idea is to get a stream via Server API (RTSP for example) and pass it to DicrectShow for playback.
0
Please sign in to leave a comment.
Comments
8 comments