Example PHP script for creating thumbnails


Download script

Tested with FFmpeg 4.0

Description

This is an example script that creates frame thumbnails from a video and generates a markup file.

It requires the FFmpeg and FFprobe libraries (you need to setup the paths to binary files if they are not installed). Other configured parameters:

  • the width of the thumbnails (default is 160 px), the height is calculated automatically
  • mosaic size (default 5x5)
  • URL and name of the folder for images

To start you need to specify two variables - file (video) and output (markup, which will be generated in the end)

thumbnails.php?file=video.mp4&output=video.vtt

The script will create collections of images at the desired interval and generate a markup file in WebVTT format.




2019 © PlayerJS

Login

Restore password
Sign up
Log in

Sign up free

Sign up
By signing up, you agree to Terms of Service
Login if you have an account

Enterprise

Your name
Website
Email
Phone
Description
Order player

Restore password

Restore
Forgot email? Contact us