Meta.Vlc icon indicating copy to clipboard operation
Meta.Vlc copied to clipboard

Black screen with no video but audio playing

Open ghost opened this issue 8 years ago • 5 comments

Hey guys.

I'm having a problem with this library.

The control is created via XAML and I load media in the code behind. Randomly, the video will play but there will be no picture, just the videos audio will play. Sometimes it plays the video fine.

Why is this, and how can I circumvent it?

Thank you

ghost avatar Mar 24 '17 00:03 ghost

Having this problem as well. The issue shows up even with with the latest commit unmodified code.

  • Just run the cleanly built "Meta.Vlc.Wpf.Sample.exe" .Net 4.5
  • Use the Load button to play video files.
  • Close the application with the Exit button and repeat the process.

at least 1 out of 5 times, the video will not show up, only Audio plays. I suspect something is not initialized correctly or there is still a race condition somewhere.

The problem shows up even more easily, if you create a new project and put the LoadMedia and Play method in the MainWindow method and run them immediately on startup, like so. Then the video almost does not show up half of the time.

What's the best way to ensure the VlcPlayer plays the video? Or at least make sure the Player is properly initialized before attempting to play?

public partial class MainWindow : Window
{

    VlcPlayer Player = null;

    public MainWindow()
    {
        InitializeComponent();

        Player = new VlcPlayer();
        MainGrid.Children.Add(Player);

        Player.Stop();
        Player.LoadMedia(@"C:\DemoVideos\AD2.mp4");
        Player.Play();

H1p3ri0n avatar Apr 03 '17 00:04 H1p3ri0n

Oh I can communicate in Chinese as well, Higan, if I can help in anyway please let me know. 有什么能帮忙测试或者其他的事请尽管提。很愿意帮忙!谢啦。

H1p3ri0n avatar Apr 03 '17 00:04 H1p3ri0n

I'm having the same issue. Any update?

flawiddsouza avatar Jul 14 '17 07:07 flawiddsouza

I have the same problem, eager to update.

darkLightx avatar Oct 04 '18 10:10 darkLightx

I've been running the lib on my machines with no problems. Had the black screen thing happen on a client's machine. I installed the full VLC player package and it seemed to fix it. Then it happened last night on another client's system. Again I installed VLC and again the problem went away. I'm thinking I never saw it on my machines because I've always installed VLC on them first. Might just be coincidence but I'm thinking the bug is the result of not setting up something the full VLC installer sets up.

JohnnyPhoton avatar Feb 02 '19 18:02 JohnnyPhoton