pose-to-video
v1.5.10
Published
A library to convert pose estimation data from a custom binary format to a video.
Maintainers
Readme
Pose to Video
A library to convert pose file to a video.
Installation
npm install pose-to-videoUsage
const { poseToVideo } = require('pose-to-video');
poseToVideo('path/to/your/pose/file.pose', 'path/to/output/video.mp4')
.then(() => console.log('Video created successfully!'))
.catch(err => console.error(err));Dependencies
- binary-parser: For parsing the binary pose file.
- canvas: For rendering the pose frames.
- ffmpeg: Required for stitching the frames into a video. Make sure you have
ffmpeginstalled and available in your system's PATH. - pose-format: For parsing the pose file.
- pose-viewer: For rendering the pose frames.
The pose-format and pose-viewer library is included in the src. Since I needed to modify the src code of these library, I copied them into my repo. The credit goes to the original authors.
How it works
- Parse Pose File: The library reads the
.posefile and parses the header and body information. - Render Frames: For each frame in the pose data, it uses a renderer (currently a
canvasrenderer) to draw the pose on a canvas. - Stitch Frames: The rendered frames are then stitched together into a video using
ffmpeg.
