Screen capturing a .flv video.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Xoligy
Forum Commoner
Posts: 53
Joined: Sun Mar 04, 2007 5:35 am

Screen capturing a .flv video.

Post by Xoligy »

This is something that I wouldn't know where to start with. Does anyone know any resources that could help me with this? Has anyone tried anything before?

Basically I need to make a thumbnail of a .flv video (like what youtube and all these video sites use). Other languages can be used, even a command line program would be suitable.

Thanks for any help.

UPDATE: I found out about a command line program called FFMPEG. I also found out there was a handy PHP library for it. This is exactly what I was looking for.
nitrino
Forum Newbie
Posts: 10
Joined: Tue Jan 02, 2007 10:22 am
Location: Riga, Latvia

Post by nitrino »

Use ffmpeg. For small and medium projects it will fit your needs.

To fetch a thumbnail use this (tried and works on one of webs i wrote):

Code: Select all

exec("/usr/bin/ffmpeg -an -y -i $outputdir$outputfile -f mjpeg -t 0:0:5.000 -vframes 1 -ss 0:0:5.000 $outputdir$outputframe");
Post Reply