Skip to content

Commit

Permalink
Add video thumbnails docs & update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
DarthSim committed Mar 18, 2020
1 parent b99b5bd commit 6b3abfa
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
@@ -1,6 +1,12 @@
# Changelog

## [Unreleased]
## Addded
- Video thumbnails.

## Changed
- Quantizr updated to 0.2.0 in Docker image.


## [2.11.0] - 2020-03-12
## Changed
Expand Down
7 changes: 7 additions & 0 deletions docs/configuration.md
Expand Up @@ -137,6 +137,13 @@ imgproxy can use the `Width`, `Viewport-Width` or `DPR` HTTP headers to determin

**⚠️Warning:** Headers cannot be signed. This means that an attacker can bypass your CDN cache by changing the `Width`, `Viewport-Width` or `DPR` HTTP headers. Have this in mind when configuring your production caching setup.

## Video thumbnails

imgproxy Pro can extract specific frames of videos to create thumbnails. The feature is disabled by default^ but can be enabled with `IMGPROXY_ENABLE_VIDEO_THUMBNAILS`.

* `IMGPROXY_ENABLE_VIDEO_THUMBNAILS`: <img class="pro-badge" src="assets/pro.svg" alt="pro" /> then true, enables video thumbnails generation. Default: false;
* `IMGPROXY_VIDEO_THUMBNAIL_SECOND`: <img class="pro-badge" src="assets/pro.svg" alt="pro" /> the timestamp of the frame in seconds that will be used for a thumbnail. Default: 1.

## Watermark

* `IMGPROXY_WATERMARK_DATA`: Base64-encoded image data. You can easily calculate it with `base64 tmp/watermark.png | tr -d '\n'`;
Expand Down
11 changes: 10 additions & 1 deletion docs/image_formats_support.md
Expand Up @@ -8,7 +8,7 @@ At the moment, imgproxy supports only the most popular image formats:
* GIF;
* ICO;
* SVG;
* MP4 _(result only)_ <img class="pro-badge" src="assets/pro.svg" alt="pro" />;
* MP4 <img class="pro-badge" src="assets/pro.svg" alt="pro" />;
* HEIC _(source only)_;
* BMP;
* TIFF.
Expand Down Expand Up @@ -54,3 +54,12 @@ Since processing of animated images is pretty heavy, only one frame is processed
Animated images results can be converted to MP4 by specifying `mp4` extension.

Since MP4 requires usage of a `<video>` tag instead of `<img>`, automatic conversion to MP4 is not provided.

## Video thumbnails <img class="pro-badge" src="assets/pro.svg" alt="pro" />

If you provide a video as a source, imgproxy takes its specific frame to create a thumbnail. Doing this imgproxy downloads only the amount of data required to reach the needed frame.

Since this still requires more data to be downloaded, video thumbnails generation is disabled by default and should be enabled with `IMGPROXY_ENABLE_VIDEO_THUMBNAILS` config option.

* `IMGPROXY_ENABLE_VIDEO_THUMBNAILS`: then true, enables video thumbnails generation. Default: false;
* `IMGPROXY_VIDEO_THUMBNAIL_SECOND`: the timestamp of the frame in seconds that will be used for a thumbnail. Default: 1.

0 comments on commit 6b3abfa

Please sign in to comment.