WinRT RTSP and ONVIF
Hello,
I am developing an app that depend on WinRT components. As written in Microsoft Blog Windows 10/11 has support for ONVIF cameras. Also, there is mentioned that
The API supports ONVIF and generic RTSP server URIs. This allows applications to use the standard Windows Media APIs to capture video from generic cameras that do not conform to the ONVIF standards, or from an arbitrary URI without pairing.
but unfortunately, I have not been able to connect any of my RTSP capable cameras to WinRT app. I have tried on x64 Windows 10 and 11 machines and no luck so far it breaks on await mediaCapture.InitializeAsync(mediacapturesettings); with {"The specified object or value does not exist. (Exception from HRESULT: 0xC00D36D5)"}.
MediaCapture mediaCapture = new MediaCapture();
MediaCaptureInitializationSettings mediacapturesettings = new MediaCaptureInitializationSettings
{
DeviceUri = new Uri("rtsp://192.168.1.202:5504/channel=0,stream=0"),
DeviceUriPasswordCredential = new PasswordCredential
{
UserName = "system",
Password = "system",
},
StreamingCaptureMode = StreamingCaptureMode.Video
};
try
{
await mediaCapture.InitializeAsync(mediacapturesettings);
}
catch (Exception exception)
{
Console.WriteLine(exception);
throw;
}
WebCaptureElement.Source = mediaCapture;
Thank you in advance.