Unable to use RTSP with MediaCapture UWP

131 views Asked by At

Following this article: https://blogs.windows.com/windowsdeveloper/2019/10/10/connecting-network-cameras-to-windows-10-devices/ We can initiate MediaCapture with RTSP URI link in constructor. I'm using VLC and IpCameraEmulator as RTSP streamers. I've also tested stream with VLC player. This code should open stream, but I get native exception which I cannot resolve.

var mcis = new MediaCaptureInitializationSettings()
    {
        DeviceUri = new Uri("rtsp://127.0.0.1:8554/live"),
        StreamingCaptureMode = Windows.Media.Capture.StreamingCaptureMode.Video
    };

await mediaCapture.InitializeAsync(mcis);

Exception throws at InitializeAsync(bool) with following message: "The specified object or value does not exist. (Exception from HRESULT: 0xC00D36D5)" and because it came from native(?) source, I can't find reason why it happens. My UWP app preparations are correct as I know: target and dev machine with Windows 11 build 22000 and minimum required is Windows 10 build 20348. Visual Studio 2022. Additionally, disabled firewall.

0

There are 0 answers