lost the image when using multiple video views
Summary
When I use RTSP mosaic refer to the sample here, finally lost two images, and the other iamges look blur.
Minimal project and steps to reproduce
-
prepare 6 VideoView in xaml
-
set the rtsp to play in code
//xaml
<WrapPanel x:Name="FirstDisplay" Grid.Row="1" Margin="126,0,0,0">
<Grid MouseDown="ClickToBindSource" x:Name="indie1" Margin="10,20,10,10" AllowDrop="True" >
<shared:VideoView RenderOptions.BitmapScalingMode="LowQuality" x:Name="VideoView0" Width="230" Height="150"/>
<Border/>
</Grid>
<Grid MouseDown="ClickToBindSource" x:Name="indie2" Margin="00,20,10,10" AllowDrop="True" VerticalAlignment="Top">
<shared:VideoView RenderOptions.BitmapScalingMode="LowQuality" x:Name="VideoView1" Width="230" Height="150"/>
<Border/>
</Grid>
<Grid MouseDown="ClickToBindSource" x:Name="indie3" Margin="0,20,0,10" VerticalAlignment="Top">
<shared:VideoView RenderOptions.BitmapScalingMode="LowQuality" x:Name="VideoView2" Width="230" Height="150"/>
<Border/>
</Grid>
<Grid MouseDown="ClickToBindSource" x:Name="indie4" Margin="10,20,10,0" VerticalAlignment="Top">
<shared:VideoView RenderOptions.BitmapScalingMode="LowQuality" x:Name="VideoView3" Width="230" Height="150"/>
<Border/>
</Grid>
<Grid MouseDown="ClickToBindSource" x:Name="indie5" Margin="0,20,10,0" VerticalAlignment="Top">
<shared:VideoView RenderOptions.BitmapScalingMode="LowQuality" x:Name="VideoView4" Width="230" Height="150"/>
<Border/>
</Grid>
<Grid MouseDown="ClickToBindSource" x:Name="indie6" Margin="0,20,0,0" VerticalAlignment="Top">
<shared:VideoView RenderOptions.BitmapScalingMode="LowQuality" x:Name="VideoView5" Width="230" Height="150"/>
<Border/>
</Grid>
</WrapPanel>
//c#
VideoView0.MediaPlayer = new MediaPlayer(_libvlc);
VideoView0.MediaPlayer.EnableHardwareDecoding = true;
using (var media = new Media(_libvlc, new Uri(device.mainStream)))
{ media.AddOption(":no-audio"); VideoView0.MediaPlayer.Play(media); }
//VideoView 1 2 3 4..
VideoView5.MediaPlayer = new MediaPlayer(_libvlc);
VideoView5.MediaPlayer.EnableHardwareDecoding = true;
using (var media = new Media(_libvlc, new Uri(device.mainStream)))
{ media.AddOption(":no-audio"); VideoView5.MediaPlayer.Play(media); }
What is the current bug behavior?
-
use multiple VideoViews, but display is not complete
-
it took few 4-5 seconds to see the image, but i use vlc, it just like 1 second
(is some parameters like probesize in ffmpeg) -
the images were blur, but sometimes not
What is the expected correct behavior?
-
all VideoViews can show the images
-
open the video in 1 second
3) the images not blur
Does it work on other plaforms? Does it work with the official VLC apps?
I only have the windows10 platform, i use offical vlc app to play the rtsp ,everythin is right.
Relevant logs and/or screenshots
Environment
- OS: windows
- Version windows 10
- Device: laptop
- LibVLC libvlcsharp v3.5.1
- LibVLCSharp version libvlcsharp.wpf v3.5.1