network wrapped ffmpeg for creating thumbnails from videos (ffmpeg, thumbnail, screenshot)
519
https://github.com/markkimsal/video-thumbnailer
Deploy with docker-compose or however you want.
URL parameters are:
The response will be the binary output of the screenshot image. The image is currently not scaled.
Headers returned include:
Run the image
docker run --rm -d -p 9999:80 markkimsal/video-thumbnailer:1.1.0
Test the service:
curl -O -J -X GET "http://127.0.0.1:9999/index.php?url=https://github.com/markkimsal/video-thumbnailer/raw/master/fixtures/ISS-live-stream-earth-from-space-2020-05-08.mp4&s=3.8"
This will download the file and use the header from Content-disposition: attachment;filename="" to save the file locally.
The filename is a ULID.
This is essentially an open proxy, so secure it with:
You can restrict the video downloading to a list of known hosts via the DOMAINS environment variable.
#docker-compose.yml
environment:
- DOMAINS=github.com,igotaprinter.com
If the requested video's host does not match something in the list, it will be rejected with '422 Unprocesible Entity'.
Matching is done with the host component of php's parse_url() function.
---
version: '3.4'
services:
vthumb:
image: markkimsal/video-thumbnailer:1.1.0
ports:
- 9999:80
environment:
- DOMAINS=github.com
Content type
Image
Digest
Size
268.8 MB
Last updated
about 6 years ago
docker pull markkimsal/video-thumbnailer