View Single Post
Old 05-19-2009, 03:59 PM  
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,359
Quote:
Originally Posted by SmokeyTheBear View Post
if you want to do every flv in a directory at once try this
<?php
foreach (glob("*.flv") as $filename) {
echo exec("/usr/local/bin/ffmpeg -i /home/account/public_html/video/$filename -an -ss 1 -t 00:00:01 -r 1 -y -s qcif -f mjpeg /home/account/public_html/snapshot/$filename.jpg");

}

?>

drop the php file in the folder with the flv's

p.s. change the paths to your paths of course
he wants it to do it via the flash player, that will do a directory.

plus you could do it easier via a shell script

Code:
for i in *.flv; do ffmpeg -an -y -t 00:00:01 -i "$i" -f image2 "`echo $i |sed 's/.flv$/.jpg/'`" ;done
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote