video-generator-rohr
v0.0.6
Published
This project is a React-based application that allows users to generate a video slideshow from uploaded images using FFmpeg. The generated video can be downloaded as an MP4 file.
Downloads
12
Readme
Video Generator App
This project is a React-based application that allows users to generate a video slideshow from uploaded images using FFmpeg. The generated video can be downloaded as an MP4 file.
Getting Started
This project was bootstrapped with Create React App.
Prerequisites
Ensure you have Node.js installed on your system. You will also need the following dependencies:
@ffmpeg/ffmpegfor handling video generationfile-saverfor downloading the generated videoframer-motionfor animations
Installation
Clone the repository and install dependencies:
git clone <repository-url>
cd <project-directory>
npm installAvailable Scripts
In the project directory, you can run:
npm start
Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.
npm test
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
npm run build
Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
How It Works
- Users can upload multiple image files.
- The images are processed and converted into a video using FFmpeg.
- Each image is displayed in the video for 2 seconds.
- The generated video is available for download as an MP4 file.
- The default scale is 1080x1024.
Video Generation Logic
The app follows this process:
- Load FFmpeg
- Store uploaded images in FFmpeg's virtual filesystem
- Create an input list for FFmpeg (ensuring correct sequence and duration per image)
- Execute FFmpeg commands to generate the video
- Read the generated video and provide it for download
Example FFmpeg Command Used
ffmpeg -f concat -safe 0 -i input.txt -c:v libx264 -pix_fmt yuv420p -r 30 output.mp4