# fast-preview-cli

> A cli tool for generating thumbnail(animated webp) from a video

Latest version **1.3.4** (published 2022-09-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install fast-preview-cli
pnpm add fast-preview-cli
yarn add fast-preview-cli
bun add fast-preview-cli
```

Provides the command `fpreview`.

## 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.3.4 |
| Published | 2022-09-06 |
| First published | 2022-08-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.8.0 |
| Dependencies | 2 |
| Unpacked size | 4.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | TurnerXi |
| Maintainers | turnerxi |
| Keywords | ffmpeg, animated webp, thumbnail |

## Links

- npm: https://www.npmjs.com/package/fast-preview-cli
- Repository: https://github.com/TurnerXi/fast-preview
- Homepage: https://github.com/TurnerXi/fast-preview#readme
- Issues: https://github.com/TurnerXi/fast-preview/issues
- npm.io page: https://npm.io/package/fast-preview-cli

## Dependencies (2)

- [commander](https://npm.io/package/commander.md) ^9.4.0
- [fast-preview](https://npm.io/package/fast-preview.md) ^1.3.4

## Alternatives

- [exif-parser](https://npm.io/package/exif-parser.md) — 3.8M weekly downloads
- [vite-plugin-compression](https://npm.io/package/vite-plugin-compression.md) — 569.5K weekly downloads
- [pica](https://npm.io/package/pica.md) — 442.4K weekly downloads
- [@reportportal/client-javascript](https://npm.io/package/@reportportal/client-javascript.md) — 408.8K weekly downloads
- [@tldraw/state](https://npm.io/package/@tldraw/state.md) — 316.0K weekly downloads

## Recent versions

- 1.3.4 (latest) — 2022-09-06
- 1.3.3 — 2022-09-06
- 1.3.2 — 2022-09-06
- 1.3.1 — 2022-08-30
- 1.3.0 — 2022-08-30
- 1.2.31 — 2022-08-30
- 1.2.30 — 2022-08-26
- 1.2.29 — 2022-08-26
- 1.2.28 — 2022-08-26
- 1.2.27 — 2022-08-25
- 1.2.26 — 2022-08-25
- 1.2.25 — 2022-08-19
- 1.2.24 — 2022-08-19
- 1.2.23 — 2022-08-19
- 1.2.22 — 2022-08-18
- … 17 more at https://npm.io/package/fast-preview-cli/versions

## README

# `fast-preview-cli`

## Install
```sh
npm install -g fast-preview-cli
```
Or
```sh
$ npm install fast-preview
```

```js
var FastPreview = require("fast-preview").default;
var preview = new FastPreview("video.mp4");
preview.exec();
```

## Usage

```
fpreview --help

Usage: cli [options] <files...>

Options:
  -c, --clip-count <number>       设置要截取的视频片段的数量 (default: 5)
  -t, --clip-time <number>        每个片段持续时间(秒) (default: 5)
  -s, --clip-strategy <strategy>  片段选择策略 (choices: "max-size", "min-size", "random", default: "max-size")
  -r, --clip-range <numbers...>   片段选择范围(视频时间的百分比) (default: [0.1,0.9])
  -f, --fps-rate <number>         图像帧率(-1: 保持原视频帧率) (default: 10)
  -o, --output <path>             动态预览图存放的目录, 默认输出到输入文件目录
  -m, --speed-multi <number>      片段播放速度的倍数 (default: 2)
  -w, --width <number>            视频缩放宽度, 默认-1(按高度等比缩放) (default: -1)
  -h, --height <number>           视频缩放高度, 默认-1(按宽度等比缩放) (default: -1)
  --help                          display help for command
```

## Example
```
fpreview /path/to/video.mp4
```

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