I want to play live video stream RTSP protocol
using MediaElement
in Universal Windows Platform (UWP) app platform.
I am trying to this way but it now working.
<MediaElement x:Name="mediaPlayer" />
Code Behind
var streamUri = new Uri("rtsp://X.X.X.X:1027/h264/ch1.2");
var streamResponse = await AdaptiveMediaSource.CreateFromUriAsync(streamUri);
if (streamResponse.Status == AdaptiveMediaSourceCreationStatus.Success)
{
mediaPlayer.SetMediaStreamSource(streamResponse.MediaSource);
}
Error:
Got Status => streamResponse.Status = ManifestDownloadFailure
Internal Error
base = {System.Runtime.InteropServices.COMException (0xC00D36B2): The request is invalid in the current state. The request is invalid in the current state. at Windows.Media.Streaming.Adaptive.AdaptiveMediaSourceCreationResult.get_MediaSource()}
Is there any third party solution or another way video play in UWP app?
I used "VLC.MediaElement" for playing RTSP live videos (like camera's streaming).
You can get this control from Nuget: https://www.nuget.org/packages/VLC.MediaElement/
Just set the "Source" of the control and you're set.
User contributions licensed under CC BY-SA 3.0