Question

Is there any way where i can create a thumbnail image from a flash movie file(flv /swf) [NOT FROM A VIDEO File ] in ASP.NET ? Any samples of implementation ?

Was it helpful?

Solution

you can use ffmpeg to create thumbnails of the flash video

OTHER TIPS

For .flv you can use ffmpeg to convert parts of the video (e.g. one frame) into an image (sequence)

I've used it as command-line application by calling Process.Start(), but there is at least one wrapper for .NET (I haven't tested it myself): http://www.codeplex.com/ffmpegdotnet

For .swf I don't know any way to achieve this without some Adobe tool.

for flv it can be done easily, as others mentioned ...

for swf, it depends HIGHLY on the swf ... if the swfs visual appearence is determined by code, there is no other way than to embed a flash player in you app and either let the flash player make the snapshots, encode them as JPEG/PNG, and send them somewhere using TCP or LocalConnection (a flash<->flash communication connection, which can be used with C# as well) or try to somehow grab its output buffer yourself ... the first possibility should be no more than 10-20 lines of actionscript code ... don't know about the latter ...

other than that, you might use an external command line converter ... there are a few floating around the web ...

greetz

back2dos

Take a look at this article, it should point you in the right direction. It uses SharpFFmpeg to extract thumbnail images from movie clips from a variety of formats.

the only way to get an image, is to use a full flash client that starts playing and allows you to capture the first frame.

I would take a close look at flirt (they actually have an example that renders pngs) Maybe some of the other flash libraries may be of help ( swfdec gnash swift tools gplflash)

Gnash is probably the best choice since its the most mature project out there, but i do not know how easy it is to integrate into command line tools or into your own projects.

We have been working on this in my company, and we got a proof of concept working pretty fast (but the project we made it for is on hold right now). I am not able to share the code, but I can give you some pointers.

It is not pure ASP.NET, but maybe you can still use it. We made a windows service that can be called from ASP.NET.

Basicly you install the flash plugin on the server, the windows services can then simply open the swf through the swf ActiveX component and then you can grap a picture of the whole thing. It works pretty well, notice that you do not have to actually render the ActiveX component on screen to capture the picture.

Check out this post. It does not tell you everything but I guess it provides the ground work required for it. You probably have to figure out how to get the object tag out of the flash-html you are trying to download from a web page. After that you'd have to figure out when to capture the frames. Its a long ride however. You don't need the asp.net part. Just concentrate on the windows project part. Hope this helps. :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top