Playing FLV file?

J

Johnny J.

Can anybody get me started on how to play an FLV file? Like you play e.g.
mpeg files using the wmplayer control, I want a box on my form where the FLV
is played and the playback is controlled byt the user.

Cheers,
Johnny J.
 
P

Peter Duniho

Johnny said:
Can anybody get me started on how to play an FLV file? Like you play e.g.
mpeg files using the wmplayer control, I want a box on my form where the FLV
is played and the playback is controlled byt the user.

I don't actually know for sure, but my first thought would be to use the
System.Forms.WebBrowser class to display some HTML generated from a
template that includes the usual "embed" with the Flash object
configured to play the desired FLV file.

In other words, figure out how to play the FLV in a regular HTML page,
and then host that HTML inside your form using the WebBrowser control class.

Pete
 
J

Johnny J.

Ah, but sorry - it's not an ASP application, it's a Winforms application...

Cheers,
Johnny
 
J

Johnny J.

True, but the problem with this approach is that the user has to make sure
himself that he has got Flash Player installed. I would like a solution
that's independent of that (if possible).

Cheers,
Johnny J.
 
A

Andrew Morton

Johnny said:
True, but the problem with this approach is that the user has to make
sure himself that he has got Flash Player installed. I would like a
solution that's independent of that (if possible).

That would be like wanting to play a CD without having a CD player.

You could, of course, decode the data in the flv yourself, if you can find
documentation on the format.

Andrew
 
P

Patrice

Or to avoid the Flash player dependancy you could convert to a format that
is supported at the OS level (for example animations in Windows are AFAIK
provided as AVI files). Of course it depends what is the purpose of this FLV
file in your app...
 
J

Johnny J.

Well, it's simply a video like any wmv or mpg video file. I want to show it
in the form like I do with mpg's

It is an alternative to convert it. But for that I would probably need a
third party control. Does anybody know of any? Or maybe just a control that
can actually show the FLV file without Flash installed?

Cheers,
Johnny
 
P

Peter Duniho

Johnny said:
Well, it's simply a video like any wmv or mpg video file. I want to show it
in the form like I do with mpg's

It's not, actually. It's a specific video format designed for the
Macromedia Flash Player, not supported by the built-in media player for
Windows, which is what would be used for WMV or MP4, etc.

As Andrew said, you could of course write your own decoder to process
the file. At that point, you could either use the decoded data to
convert the file to something Windows Media Player does handle, or you
could simply write your own video-display code, essentially reinventing
an FLV media player.

Finally, you could of course find a different third-party media player
that handles FLV format files and which can be used as a window control
and use that instead of the Flash player. That would at least avoid
having the WebBrowser layer in your window, assuming you can find such a
third-party control.

I don't know the specifics, but it's entirely possible that you could
simply use the Flash player directly as an ActiveX control in your
window, rather than putting it as an object in some HTML. I just
figured the latter would be easier to implement. So using the Flash
player doesn't necessarily mean you have to also use the WebBrowser
component.

But on the topic of third-party controls...
It is an alternative to convert it. But for that I would probably need a
third party control. Does anybody know of any? Or maybe just a control that
can actually show the FLV file without Flash installed?

I really don't understand why you are okay with using a third-party
control, but not the Flash player (which is, after all, basically just a
third-party control). What's so wrong about requiring the Flash player
to be installed, given your requirement to play the FLV format that is
specific to the Flash player?

In any case, there is no built-in .NET component that will automatically
handle FLV format files. So, it doesn't seem to me that your question
really has anything to do with .NET or C#, and as such is probably
better answered in some other newsgroup.

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