play video/audio in C# application

R

Ryan Liu

Hi,

I want to play Audio/Video in my C# application(standlalone, not web
applicatoin). The source of multimedia may in different formats and decided
by the end user, which I have no control.

My question is -- which is the best approach to add multimedia capability to
my c# application, to support most possible formats, and make it easiest for
the end user(e.g. does not need convert before play it)?

I download DirectX SDK, I also heard Flash video/audio now is widely used.
And seems DivX player supports many type of video format, including real
format(*.rm).


Seems DirectX only plays uncompressed audio file and for video, it does not
support real format(*.rm).

So what is the best approach? Any input is highly appreciated.

~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.

Ryan Liu
137 0173 5101
Shanghai Fengpu Software Co. Ltd
Shanghai , China

http://www.PowerCATI.com
http://www.fpsoft.net.cn
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.
 
V

Vadym Stetsiak

Hello, Ryan!

Playing video using DirectX can be pretty simple.

Have a look here
http://www.c-sharpcorner.com/Upload...rticleID=3d1c3b81-1a12-48e7-ad5e-758f96525409

--
With best regards, Vadym Stetsiak.
Blog: http://vadmyst.blogspot.com

You wrote on Fri, 26 Oct 2007 15:35:04 +0800:

RL> Hi,

RL> I want to play Audio/Video in my C# application(standlalone, not web
RL> applicatoin). The source of multimedia may in different formats and
RL> decided by the end user, which I have no control.

RL> My question is -- which is the best approach to add multimedia
RL> capability to my c# application, to support most possible formats,
RL> and make it easiest for the end user(e.g. does not need convert
RL> before play it)?

RL> I download DirectX SDK, I also heard Flash video/audio now is widely
RL> used.
RL> And seems DivX player supports many type of video format, including
RL> real format(*.rm).


RL> Seems DirectX only plays uncompressed audio file and for video, it
RL> does not support real format(*.rm).

RL> So what is the best approach? Any input is highly appreciated.

RL> ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.

RL> Ryan Liu 137 0173 5101
RL> Shanghai Fengpu Software Co. Ltd
RL> Shanghai , China

RL> http://www.PowerCATI.com http://www.fpsoft.net.cn
RL> ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.
 
N

Nicholas Paldino [.NET/C# MVP]

Ryan,

Real is a problem with most video players, as far as I know, as there
isn't a codec out there for Windows Media players. You could try and use
the Real player, but I am not sure that it can be embedded in your app.

What it comes down to is that whatever player you choose to embed in
your app, you have to have the appropriate codecs for the media format that
you want to play.

I would be very cautious if you are distributing your app, not to
install codecs for video types over the user's preferences. Video codecs
can be a tricky thing, and I've found that I have come to loathe programs
that install codecs without my knowledge or (explicit) approval.
 
P

Peter Duniho

Real is a problem with most video players, as far as I know, as
there isn't a codec out there for Windows Media players. You could
try and use the Real player, but I am not sure that it can be
embedded in your app.

I'm not aware of a codec that supports Real streaming in WMP, but
there is Real Alternative, which allows for playback of many Real
formats in
WMP.<http://www.free-codecs.com/download/Real_Alternative.htm>

Note that if you can figure out a way to embed the Media Player
Classic (included in the above download), that will stream Real format
without having the Real player. Of course, that still requires a
different component than the regular DirectX supported on.

Personally, I wouldn't worry about supporting Real. There are too
many reasons to avoid Real anyway; the less third-party applications
do to support it, the better. Just my opinion, of course.
[...]
I would be very cautious if you are distributing your app, not
to install codecs for video types over the user's preferences. Video
codecs can be a tricky thing, and I've found that I have come to
loathe programs that install codecs without my knowledge or
(explicit) approval.

I would like to heartily agree with this advice. You'd think a video
codec would just do one thing: encode or decode a specific video
format. Unfortunately, there are lots of situations where one codec
tries to handle a format handled by some other codec already
installed, causing conflicts in software that expects a particular
codec to be handling a particular format. Yes, this is all due to bad
design on the part of the codecs and the dependent software, but it's
a fact of life. Don't make things worse by not giving the user
complete control over how your application manages the codecs.

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top