View Full Version : help with ffmpeg please
cirtexgurl
03-04-2007, 02:09 AM
If I have and .flv (full size) and I upload it to my server, then how do I make a thumbnail from this using ffmpeg. I'm a complete novice at this. I need to make some thumbnails for my site that poiint to the larger videos. Is there a tutorial for this, or a line of code I need to employ, and if so, I don't know exactly where to go to reach the tool for ffmpeg. Hope someone can get a newbie at this started. Thank you.
brendandonhue
03-04-2007, 03:09 AM
Hello,
You might want to take a look at the ffmpeg documentation (http://ffmpeg-php.sourceforge.net/apidoc.php). It has some sample code that will help you.
Heres an outline of the functions you'll want to use:
1. new ffmpeg_movie() to open your video file
2. getFrame to pick a frame out of the movie for your thumbnail
3. resize() to make it smaller
4. toGDImage() to make a GD image
5. imagegif() or imagejpeg() to save your picture.
Cirtex Admin
03-04-2007, 03:20 AM
Here's also a sample ffmpeg code:
exec("/usr/local/bin/ffmpeg -i /home/user/public_html/file.avi -f flv -acodec mp3 -ab 64 -ac 1 /home/user/public_html/converted/converterd.flv");
cirtexgurl
03-04-2007, 03:36 AM
Ok - I suppose I was hoping for a simple user interface to do this, but now I have to expose my ignorance and ask a bit more.
Is ffmpeg then something I am addressing via code in php? That is, I insert some php code (as described above) into my file and then the process is done on the fly? Or am I way way off in my understanding of this...
Cirtex Admin
03-04-2007, 03:39 AM
Hi
1) Theres ffmpeg you can use via SSH if your hosting package includes SSH Access (Advanced users only) and execute raw commands.
2) You can use ffmpeg via ffmpeg-php for example: http://ffmpeg-php.sourceforge.net/apidoc.php has all help
and I included sample command.
Cheers
ultramedia
03-06-2007, 08:32 PM
ok first up, don't use any brackets in your filename i.e. ( or ). ffmpeg chucks a tantrum and cancels conversion. Second make sure the target directory has adequate permissions or conversion will fail.
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.