472,119 Members | 990 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,119 software developers and data experts.

play video/audio in C# application

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
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.

Oct 26 '07 #1
3 8161
Hello, Ryan!

Playing video using DirectX can be pretty simple.

Have a look here
http://www.c-sharpcorner.com/UploadF...e-758f96525409

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

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

RLHi,

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

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

RLI download DirectX SDK, I also heard Flash video/audio now is widely
RLused.
RLAnd seems DivX player supports many type of video format, including
RLreal format(*.rm).
RLSeems DirectX only plays uncompressed audio file and for video, it
RLdoes not support real format(*.rm).

RLSo 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~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.
Oct 26 '07 #2
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.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Ryan Liu" <rl**@PowerCATI.comwrote in message
news:eQ**************@TK2MSFTNGP03.phx.gbl...
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
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.

Oct 26 '07 #3
In article <ez**************@TK2MSFTNGP04.phx.gbl"Nicholas
Paldino[.NET/C# MVP]" <mv*@spam.guard.caspershouse.comwrote:
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.
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

--
I'm trying a new usenet client for Mac, Nemo OS X.
You can download it at http://www.malcom-mac.com/nemo

Oct 26 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by laredotornado | last post: by
4 posts views Thread by jaffar | last post: by
2 posts views Thread by Chrysan | last post: by
1 post views Thread by News.microsoft.com | last post: by
reply views Thread by google | last post: by
6 posts views Thread by k.vanderstarren | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.