Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VLC player doesn't play any video

Tags:

c#

winforms

vlc

I added the VLC plugin from COM Component, dragged it to my form, added two buttons to the form ("Play" and "Stop"), and wrote the following code:

private void Form1_Load(object sender, EventArgs e)
{
    axVLC.AutoPlay = false;
    axVLC.playlist.add(@"C:\Users\Hanif\Documents\Visual Studio 2010\Projects\Education Visualization\Vlc\Resources\Video1.wmv");
}

private void btnPlay_Click(object sender, EventArgs e)
{
    axVLC.playlist.play();
}

private void btnStop_Click(object sender, EventArgs e)
{
    axVLC.playlist.stop();
}

But when I click on "Play", nothing happens.

What am I doing wrong?

like image 376
HanifCs Avatar asked Apr 18 '14 14:04

HanifCs


People also ask

Why does VLC only play sound but not video?

If the VLC still play without video the problem can be due to the incompatible video codec contained in the files. In this case, maybe need to convert the file to VLC more supported video format. You can choose Makemkv or Pavtube video converter,both powerful video tools.

Why some MP4 won't play on VLC?

The MP4 file uses an encoding format that VLC doesn't support. MP4 is a container format. It can use various codecs. If it is encoded with a VLC unsupported codec, VLC will be unable to play it.

Why is my video file not playing?

Common Reasons for Video Playback Errors Your media player cannot play it. Codecs are missing from your computer. The file extension is unrecognized. A DRM decryption key is missing.

Does VLC player play MP4 files?

Is it possible to play an MP4 file in the VLC media player? In most cases, the answer is yes, but things happen that you can't play MP4 files in the VLC media player, just like the user feedback below. MP4 is a video file format with a multimedia container.


1 Answers

Is the VLC plugin of type AxAXVLC.AxVLCPlugin2? If yes, then try these:

1) try playing video of other formats, e.g. .avi, .mkv, etc.

2) try adding file:/// in the beginning of URI:

@"file:///C:\Users\Hanif\Documents\Visual Studio 2010\Projects\Education Visualization\Vlc\Resources\Video1.wmv"

3) try adding 2 more arguments in the add command:

axVLC.playlist.add(@"C:\Users\Hanif\Documents\Visual Studio 2010\Projects\Education Visualization\Vlc\Resources\Video1.wmv", null, null);
like image 174
Bhaskar Avatar answered Oct 15 '22 09:10

Bhaskar