Reproducción de video en una aplicación .NET

Lately, I've been trying to setup a media center PC. I've played around with all the common media center applications like XBMC, Plex, Boxee, and WMC. But all of them have one issue or another. So I was thinking about writing my own application from scratch.

My problem is I have no experience with developing software that plays media such as videos or music. I'm also not interested in spending a huge amount of time trying to figure this out, considering all the different file formats and codecs out there. I'm really more interested in developing the database and library interface for my application and reusing someone else's control or code for actually playing the media.

One option I was thinking was to just control an existing media player externally. So for example you may browse for a video to play in my application, and then when you hit play it would fire up VideoLAN or some other popular video player.

However, I was wondering if there was an easy way to play video inside a .NET application. I'm looking for something that is capable of playing a wide variety of formats such as MKV files, and DVD ISOs. I'm more experience with WinForms, but was also thinking about using this project as an opportunity to learn WPF.

preguntado el 01 de febrero de 12 a las 22:02

MediaPortal is .NET based and open source - -

4 Respuestas

i've spent many years looking at playing video under wpf.

La respuesta corta

There is no easy way to guarantee to be able to play a variety of formats under wpf ( mkv,dvd etc etc ) or under windows for that matter.

the long answer

If you are looking just to run this at home and not release it, install all the codecs you need and most of the formats will run via mediaelement in wpf.

Getting all the codecs to cooperate can sometimes be frustrating.

Now moving into slightly harder territory. if you want to play DVD then you need to replace mediaelement with wpfmediakit

wpfmediakit gives a base library to get access to the low level directshow functionality. There is already a code base for playing DVDs based on wpfmediakit.

Now moving onto the very hard territory.

if you want to distribute your application and have users be able to "just watch" most/all media formats means you need to be able to completely control their codecs, which generally means distributing the codecs with your package and building the directshow filter graph in code rather than let windows build it.

Respondido 02 Feb 12, 06:02

Respondido 02 Feb 12, 02:02

was trying myself a while ago for something to play media in winforms, and found out there is vlc wrappers for .Net, dunno how good they are as i gave up, but you can try

here is one them:

Respondido 02 Feb 12, 02:02

Thanks for all the great answers. But just found out that VLC can actually be controlled through HTTP. So I think I'm just going to use that to point an instance of VLC running with the HTTP interface at whatever file I want to play.

respondido 01 mar '12, 04:03

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.