Jelajahi Sumber

Add video thumbnails docs & update changelog

DarthSim 5 tahun lalu
induk
melakukan
6b3abfae30
3 mengubah file dengan 23 tambahan dan 1 penghapusan
  1. 6 0
      CHANGELOG.md
  2. 7 0
      docs/configuration.md
  3. 10 1
      docs/image_formats_support.md

+ 6 - 0
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

+ 7 - 0
docs/configuration.md

@@ -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'`;

+ 10 - 1
docs/image_formats_support.md

@@ -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.
@@ -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.