Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get thumbnail snapshot of video and pdf file in php

Can anyone help me out that how i can display video and pdf file as thumbnail?? Thanks..............

like image 703
user75472 Avatar asked Mar 09 '09 08:03

user75472


1 Answers

For the PDF you can use Imagick.

How it's done is here in great detail

For the video snapshot, you can use FFMPEG. Here's an example code.

// this will create many images
$thumb = exec("ffmpeg -i video.mpg image%d.jpg");
like image 158
Ólafur Waage Avatar answered Sep 29 '22 15:09

Ólafur Waage