video-thumbnailer
TypeScript icon, indicating that this package has built-in type declarations

0.0.9 • Public • Published

Video Thumbnailer

GitHub license npm npm downloads total npm downloads GitHub watchers GitHub stars GitHub forks open bugs total open issues GitHub pull requests

Get thumbnails from video files (mp4) in a browser using ffmpeg via wasm

npm install video-thumbnailer

Getting started

You can find full example in example/src/routes/+page.svelte built with SvelteKit

import { VideoThumbnailer } from "video-thumbnailer";

await thumbnailer.load();
// or you can select a File from the browser
const urlOrFile =
  "https://storage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4";

// contains a Blob that can be directly set to img.src
const { blob, metadata } = await thumbnailer.getThumbnail(urlOrFile);

Demo

To run the demo:

cd example
npm run dev
# navigate to http://localhost:5173

Demo (GIF) 👇 Demo

Development

To build the library:

cd video-thumbnailer
npm run build

License

MIT

Copyright © 2023 Eugene Hauptmann

Package Sidebar

Install

npm i video-thumbnailer

Weekly Downloads

1

Version

0.0.9

License

MIT

Unpacked Size

11 kB

Total Files

6

Last publish

Collaborators

  • eugenehp