# video-thumbnail-extractor

> Video thumbnail extractor microservice

Latest version **1.4.2** (published 2015-09-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install video-thumbnail-extractor
pnpm add video-thumbnail-extractor
yarn add video-thumbnail-extractor
bun add video-thumbnail-extractor
```

Provides the command `video-thumbnail-extractor`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.4.2 |
| Published | 2015-09-13 |
| First published | 2015-02-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | 4 |
| Dependencies | 10 |
| Known vulnerabilities | 0 (+10 in 3 direct dependencies) |
| Install scripts | no |
| Author | Jonathan Ong |
| Maintainers | jongleberry |
| Keywords | video, thumbnail, service, micro, extract, extractor |

## Links

- npm: https://www.npmjs.com/package/video-thumbnail-extractor
- Repository: https://github.com/mgmtio/video-thumbnail-extractor
- Homepage: https://github.com/mgmtio/video-thumbnail-extractor#readme
- Issues: https://github.com/mgmtio/video-thumbnail-extractor/issues
- npm.io page: https://npm.io/package/video-thumbnail-extractor

## Dependencies (10)

- [mz](https://npm.io/package/mz.md) ^2.0.0
- [koa](https://npm.io/package/koa.md) ^1.0.0
- [sharp](https://npm.io/package/sharp.md) ^0.11.3
- [temp-path](https://npm.io/package/temp-path.md) ^1.0.0
- [validator](https://npm.io/package/validator.md) ^4.0.5
- [http-assert](https://npm.io/package/http-assert.md) ^1.1.0
- [koa-favicon](https://npm.io/package/koa-favicon.md) ^1.2.0
- [koa-s3-cache](https://npm.io/package/koa-s3-cache.md) ^1.0.0
- [download-cache](https://npm.io/package/download-cache.md) ^1.1.0
- [koa-json-error](https://npm.io/package/koa-json-error.md) ^1.0.1

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.4.2 (latest) — 2015-09-13
- 1.4.1 — 2015-05-07
- 1.4.0 — 2015-05-01
- 1.3.0 — 2015-03-03
- 1.2.2 — 2015-02-13
- 1.2.1 — 2015-02-13
- 1.1.0 — 2015-02-13
- 1.0.0 — 2015-02-02

## README

# video-thumbnail-extractor

[![NPM version][npm-image]][npm-url]
[![Build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]
[![Dependency Status][david-image]][david-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]

Dynamically extract thumbnails from videos with optional cropping.

## GET /:url?frame=&x=&y=&width=&height=&maxsize=

`url` should be `encodeURIComponent`ed.
`frame` defaults to `0`.
`x`, `y`, `width`, and `height` must all be defined to be valid.
Returns a `jpeg` image.

## GET /:encryptedUrl?frame=&x=&y=&width=&height=&maxsize=

Same as above, but with encrypting the URLs instead of encoding.
This is so people don't know the original video URL as well as not allow arbitrary videos.
Here's how to encrypt a URL:

```js
var crypto = require('crypto');

var hostname = 'http://localhost:3000';
var password = 'some-password-you-set';

function encrypt(url) {
  var cipher = crypto.createCipher('aes256', password);
  var buffers = [];
  buffers.push(cipher.update(url));
  buffers.push(cipher.final());
  return hostname + '/' + Buffer.concat(buffers).toString('hex');
}
```

Now accessing `encrypt(url) + '?frame=' + index` will return the image at a specific index.

[gitter-image]: https://badges.gitter.im/mgmtio/video-thumbnail-extractor.png
[gitter-url]: https://gitter.im/mgmtio/video-thumbnail-extractor
[npm-image]: https://img.shields.io/npm/v/video-thumbnail-extractor.svg?style=flat-square
[npm-url]: https://npmjs.org/package/video-thumbnail-extractor
[github-tag]: http://img.shields.io/github/tag/mgmtio/video-thumbnail-extractor.svg?style=flat-square
[github-url]: https://github.com/mgmtio/video-thumbnail-extractor/tags
[travis-image]: https://img.shields.io/travis/mgmtio/video-thumbnail-extractor.svg?style=flat-square
[travis-url]: https://travis-ci.org/mgmtio/video-thumbnail-extractor
[coveralls-image]: https://img.shields.io/coveralls/mgmtio/video-thumbnail-extractor.svg?style=flat-square
[coveralls-url]: https://coveralls.io/r/mgmtio/video-thumbnail-extractor
[david-image]: http://img.shields.io/david/mgmtio/video-thumbnail-extractor.svg?style=flat-square
[david-url]: https://david-dm.org/mgmtio/video-thumbnail-extractor
[license-image]: http://img.shields.io/npm/l/video-thumbnail-extractor.svg?style=flat-square
[license-url]: LICENSE
[downloads-image]: http://img.shields.io/npm/dm/video-thumbnail-extractor.svg?style=flat-square
[downloads-url]: https://npmjs.org/package/video-thumbnail-extractor

---
_Source: https://npm.io/package/video-thumbnail-extractor · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
