Page 1 of 1

How can I play H264 videos from Dot.Net ?

Posted: 22 Jan 2009 15:00
by Developer2009
Hi all, I'm trying to play H264 video files from an application that I wrote using C#, Dot.Net on a Windows-XP computer, but nothing I tried didn't help, I tried to use an ActiveX component called "X360 Video to Avi Converter ActiveX Control" but it didn't work (it runs AVI files without any problem) , I tried to install "K-Lite Codec Pack Full 4.5.3" codec, but still can't run H264 video files, then I installed "CoreAVC 14 Day Trial Edition" codec, but it also didn't help.

Also I can't play the H264 videos with "Windows Media Player 11".

The ONLY way I can run the H264 video files is through the "VLC Media Player", that's nice, but I want to play it from within my Dot.Net application, how can I do that? can I use the "LibVLC" for doing this ?

I need to play the file, with basic options as 'Play', 'Stop' and 'Pause', I also need to read Meta data like Width and Height of the frame, and the Duration of the video in seconds.

Any help will be very appreciated.

Thanks very much.
Dan.

Re: How can I play H264 videos from Dot.Net ?

Posted: 22 Jan 2009 15:06
by Jean-Baptiste Kempf
Why not using the Interop C# wrapper?

Re: How can I play H264 videos from Dot.Net ?

Posted: 22 Jan 2009 15:43
by Developer2009
Is it easier? how do I use it? can you please show an example? is there any Zip file that I can download, unzip, compile under Dot.Net, and run right away to see the results?

I never did such thing, and I have no ideo about how to implement this.

Thanks very much!

Re: How can I play H264 videos from Dot.Net ?

Posted: 22 Jan 2009 23:01
by Jean-Baptiste Kempf

Re: How can I play H264 videos from Dot.Net ?

Posted: 25 Jan 2009 14:13
by Developer2009
I tried your link but it didn't help, I could't run the video file, I got an error message saying "unable to load libvlc.dll", after I copied that dll into the Exe folder the message was gone but when I tried again to open the H264 (MP4) video file nothing happened and no video was display.

I also couldn't compile the source code, I'm getting a message saying that this application solution was created with a newer version of "Visual C# 2005", and it can't be loaded, I'm using the free version that can be download from Microsoft web site.

Isn't there any COMPLETE example project that I can downoad as a Zip file and just build it and run it without any changes? I found many links to many source files but it's very unclear how to use them.

I need the fastest solution, something that can be completed in 2-3 days of work.

Any help will be very appreciated.

Thanks!

Re: How can I play H264 videos from Dot.Net ?

Posted: 17 Feb 2009 07:46
by elund
I also couldn't compile the source code, I'm getting a message saying that this application solution was created with a newer version of "Visual C# 2005", and it can't be loaded, I'm using the free version that can be download from Microsoft web site.
In the project file "DMediaPlayer.sln" you can replace:

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008

with:

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005

Or you could download the free Visual Studio 2008 Express Version ;-)

Best regards, Elund