Imagor instance to support both video and HTML previews
Find a file
2022-10-13 17:29:24 +08:00
.github chore: update sponsor button 2022-10-04 08:10:33 +08:00
cmd/imagorvideo feat: imagorvideo init 2022-09-08 20:44:10 +08:00
ffmpeg test: ffmpeg select frame and frame(n) filter 2022-10-13 17:29:24 +08:00
testdata test: ffmpeg select frame and frame(n) filter 2022-10-13 17:29:24 +08:00
.dockerignore feat: imagorvideo init 2022-09-08 20:44:10 +08:00
.gitignore feat: imagorvideo init 2022-09-08 20:44:10 +08:00
config.go feat: imagorvideo init 2022-09-08 20:44:10 +08:00
config_test.go test: ffmpeg processor tests 2022-09-16 14:21:56 +08:00
Dockerfile build: go 1.19.2 2022-10-06 14:45:15 +08:00
go.mod build: imagor 1.2.0 2022-10-12 10:31:48 +08:00
go.sum build: imagor 1.2.0 2022-10-12 10:31:48 +08:00
LICENSE feat: imagorvideo init 2022-09-08 20:44:10 +08:00
Makefile feat: imagorvideo init 2022-09-08 20:44:10 +08:00
option.go feat: imagorvideo init 2022-09-08 20:44:10 +08:00
processor.go test: ffmpeg select frame and frame(n) filter 2022-10-13 17:29:24 +08:00
processor_test.go test: ffmpeg select frame and frame(n) filter 2022-10-13 17:29:24 +08:00
README.md docs: update description 2022-10-03 13:31:16 +08:00

imagorvideo

Test Status Coverage Status Docker Hub GitHub Container Registry

imagorvideo is a new initiative that brings video thumbnail capability through ffmpeg, built on the foundations of imagor - a fast, Docker-ready image processing server written in Go with libvips.

imagorvideo uses ffmpeg C bindings that extracts image thumbnail from video by attempting to select the best frame, then forwards to libvips to perform all the image cropping, resizing and filters supported by imagor.

imagorvideo uses read stream for mkv and webm video types. For other video types that requires seeking from a non seek-able source such as HTTP or S3, it simulates seek using memory buffer or temp file, by having the whole file to be fully loaded to perform seek.

This also aims to be a reference project demonstrating imagor extension.

Quick Start

docker run -p 8000:8000 shumc/imagorvideo -imagor-unsafe

Original:

https://raw.githubusercontent.com/ietf-wg-cellar/matroska-test-files/master/test_files/test4.mkv

Result:

http://localhost:8000/unsafe/fit-in/300x200/filters:label(imagorvideo,10,-10,20,yellow):fill(yellow)/https://raw.githubusercontent.com/ietf-wg-cellar/matroska-test-files/master/test_files/test4.mkv

Check out imagor for all image features supported.

Configuration

Config options specific to imagorvideo. Please refer to imagor for all existing options supported.

  -ffmpeg-fallback-image string
        FFmpeg fallback image on processing error. Supports image path enabled by loaders or storages