The Muffin Man
The Muffin Man

Reputation: 20004

How to generate a thumbnail of flash movie (.flv)

I'm using ColdFusion and need to generate a thumbnail from a flash movie stored on the server. I have heard of ffMpeg but have no idea how to use it. (Once you put it on your server what's the next step?)

Upvotes: 3

Views: 840

Answers (2)

Antony
Antony

Reputation: 3781

You can use cfexecute to run a command line on the CF server.

Karthik linked a blog post that suggests the following syntax for ffmpeg:

ffmpeg -itsoffset -4 -i test.avi -vcodec mjpeg -vframes 1 -an -f rawvideo -s 320x240 test.jpg

So you could do something like this:

<cfexecute 
    name="c:\pathto\ffmpeg\ffmpeg.exe"
    arguments="-itsoffset -4  -i #sourcevideo# -vcodec mjpeg -vframes 1 -an -f rawvideo -s 320x240 #thumbnaildestination" />

I haven't run ffmpeg like this and you'll likely need to experiment with the syntax to get a result you like, but once you do your workflow is pretty straightforward.

You may also run into issues executing fmpeg.exe depending on the user account your ColdFusion server instance is running as.

Upvotes: 1

Related Questions