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?
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.
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.
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.
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.
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);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With