Solved

How to create FLV preview image (png)

Posted on 2009-04-14
5
2,122 Views
Last Modified: 2012-05-06
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?
0
Comment
Question by:slicer123
5 Comments
 
LVL 5

Expert Comment

by:john_hollings
Comment Utility
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:
http://richapps.de/?p=48

0
 

Expert Comment

by:aBigDorkyDimwit
Comment Utility
On a MAC you can use COMMAND-SHIFT-4 then hit the SPACEBAR and it will make an image file from any window clicked.
0
 
LVL 1

Expert Comment

by:alexandremattar
Comment Utility
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";

                        

exec($cmd);

Open in new window

0
 
LVL 2

Author Comment

by:slicer123
Comment Utility
I'm using JWplayer, and streamer xmoov.php (not sure if this does anything really).

I found utils pyvnc2swf (edit.py), ffmpeg apart from mencoder. Haven't tried the latter two yet, but heard ffmpeg was good as well.
0
 
LVL 1

Accepted Solution

by:
alexandremattar earned 500 total points
Comment Utility
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.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now