A Node.js toolkit for video processing includes subtitle-based video frame extraction
- Extract video frames based on SRT subtitle timestamps
- Generate screenshots at subtitle transition points
- Create slideshow videos from extracted frames
- Support for custom output directories and file naming
- Node.js (v14 or higher)
- FFmpeg (for video processing)
Navigate to the specific tool directory and install dependencies:
# For video subtitle tool
cd subcap
npm install
- Configure settings in
subcap/main.js:
const config = {
videoPath: './video_source/video.mp4', // Video file path
srtPath: './video_source/subtitles.srt', // SRT subtitle file path
outputDir: './output_screenshots', // Output directory
slideshowVideo: './output_screenshots/slideshow.mp4', // Slideshow output
};- Run the tool:
cd subcap
npm startThe SRT subtitle file should follow the standard format:
1
00:00:00,000 --> 00:00:05,000
First subtitle text
2
00:00:05,000 --> 00:00:10,000
Second subtitle text
- FFmpeg: Must be installed and accessible from command line
- Node.js: Version 14 or higher
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
For issues and questions, please open an issue on the GitHub repository.