How to create FLV preview image (png)

Given an flv movie file, is there an open source command line tool that can capture the first frame to create a preview .png image file?
Who is Participating?
alexandremattarConnect With a Mentor Commented:
FFmpeg is great for converting your videos to FLV, but it will not generate the image you need. The JWplayer is the end user FLV player, MPlayer is a linux compatible player that accepts command line instructions to capture a frame form any given time and save the JPG to the server's hard drive, then you can convert this image using PHP GD or Image Magic into PNG and even change it's size to create thumbnails.
If memory serves me right, the player will display the first frame of the video as the file buffers, then it plays the file.

There is an alpha release of RichFLV which can edit certain parts of an flv, might be worth looking at:

On a MAC you can use COMMAND-SHIFT-4 then hit the SPACEBAR and it will make an image file from any window clicked.
You can use MPlayer with PHP in an Apache environment. See an example below:

$config = array();
$config['mplayer']        =  '/usr/bin/mplayer';
$config[tmpimgpath]        =  '/some_dir';
$cmd = $config[mplayer]." $video -ss ".$i." -nosound -vo  jpeg:outdir=".$config[tmpimgpath]."/".$video_name." -frames 2";

Open in new window

slicer123Author Commented:
I'm using JWplayer, and streamer xmoov.php (not sure if this does anything really).

I found utils pyvnc2swf (, ffmpeg apart from mencoder. Haven't tried the latter two yet, but heard ffmpeg was good as well.
All Courses

From novice to tech pro — start learning today.