2012-09-21 22:49:38

Abel Gancsos
take a snapshot of video in PHP using FFMPEG

1) install ffmpeg via aptitude install ffmpeg
2) The code:

function getPreview($file,$pName,$time){

exec("ffmpeg -ss ".$time." -i ".$file." -f mjpeg ".$pName);
}
?>


That's it!



TIP: REPLACE [] WITH STANDARD HYPERTEXT PROTOCOL.
TIP: REPLACE WHATEVER IS BETWEEN THE [] WITH YOUR INFORMATION.



Hope that helps!