video-thumbnailer
v0.0.9
Published
Make video thumbnails in the browser
Downloads
22
Maintainers
Readme
Video Thumbnailer
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) 👇
Development
To build the library:
cd video-thumbnailer
npm run build
License
Copyright © 2023 Eugene Hauptmann