Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7867533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T00:44:11+00:00 2026-06-03T00:44:11+00:00

Recently stumbled upon this post whilst trying to decide on the best way of

  • 0

Recently stumbled upon this post whilst trying to decide on the best way of getting a VLC player into C#.

Does VLC media player have a C# interface?

I downloaded the dll files and imported them into my project, but then realised I had no real idea of how to use them. Has anyone got a Windows Forms example of this code that works? The code have tried is shown below –

Vlc.DotNet.Core.Medias.MediaBase media = new
    Vlc.DotNet.Core.Medias.PathMedia(@"C:\Users\...\SampleVideos\Wildlife.wmv");

Vlc.DotNet.Forms.VlcControl vlcControl1 = new Vlc.DotNet.Forms.VlcControl();
vlcControl1.Play(media);

I am also using the code in this link in the main program.cs of my project.

http://vlcdotnet.codeplex.com/wikipage?title=Forms

The current problem I experience is that upon starting the project it throws a NullReferenceException when it gets to ->

vlcControl1.Play(media)

The problem seems to be with the vlcControl but I am unsure why. The documentation seems to rather thin and I couldn’t find any working examples on the codeplex site. If anyone has a working forms example or knows what I might have missed please let me know!

Here is the call stack present when the error occurs ->

RTSPViewer_Test.exe!RTSPViewer_Test.Form1.Form1_Load(object sender, 
    System.EventArgs e) Line 31 + 0xd bytes C#
RTSPViewer_Test.exe!RTSPViewer_Test.Program.Main() Line 30 + 0x1d bytes C#

When debugging it appears that the Media and Medias attribute of the VLC control are both null. When trying to set the Media of the control to the media object created above a

NullReferenceException

Checking the VLC control object Media does indeed equal null, but I am not sure why it hasn’t been initialised properly.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T00:44:12+00:00Added an answer on June 3, 2026 at 12:44 am

    I was unable to get the program to work using the latest version of the Vlc.dotnet libraries but instead used the alpha 2 version which was posted by Raj. I used VLC version 1.1.5 with this library to get the basic example to function properly. My end objective was to stream from an rtsp device, however this library does not appear to support this functionality yet.

    For anyone looking to use a good C# wrapper for using VLC then this is a great example –

    http://www.codeproject.com/Articles/109639/nVLC

    Used the library files from VLC 1.1.1 with this project and works fine. Supports pretty much all the features that you would usually use in VLC but gives you much more control over what you use them for.

    Many of the issues that arise when using these DLL wrappers arose from incorrect versions of the source DLL files. The VLC libraries are only 32 bit at this time, so you need to make sure to compile using x86 mode otherwise the libvlc.dll will not load properly and the application will crash. Using the above example you must also make sure that the libvlc.dll, libvlccore.dll and the plugins folder are included in the build folder.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been working on topcoder recently and I stumbled upon this question which I
I recently stumbled upon a global hotkey class ( This one ), it works
I recently stumbled upon this page . And I was particularly interested about the
I recently stumbled upon this: PCRE Regex Syntax - Recursive Patterns It appears to
So I recently stumbled upon this great library for handling HTTP requests in Python;
I recently stumbled over this post , which introduces the collect method for Scala
I have recently stumbled into this really neat api for showing callOutbubbles in android
I recently stumbled upon this in a project I'm working on. In package A
Recently searching for a 'technical article' I stumbled upon this Microsoft page: http://academic.research.microsoft.com/ .
Recently stumbled upon this neat little bug or 'feature' in PHP: function myCmpFunc($a,$b) {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.