Video Stitcher is a Python application that combines a front bumper video, main content video, and rear bumper video into a single output video.
- Combines three video files (front bumper, main content, rear bumper) into one
- Configurable encoding settings via YAML configuration file
- Progress bar to show stitching progress
- Error handling and logging
- Python 3.8
- FFmpeg
-
Clone this repository:
git clone https://github.com/clarkdever/Bumper-Video-Stitcher.git cd Bumper-Video-Stitcher
-
Create and activate the Anaconda environment:
conda env create -f environment.yml conda activate video-stitcher
video_stitcher.py
: Main script containing theVideoStitcher
class.tests/
: Directory containing unit tests for the project.environment.yml
: Conda environment file specifying dependencies.
-
Ensure you have a
config.yml
file in the project root directory. Example:encoding: codec: libx264 crf: 23 preset: medium audio_codec: aac audio_bitrate: 128k output: format: mp4
-
Run the script with the following command:
python video_stitcher.py path/to/front_bumper.mp4 path/to/content.mp4 path/to/rear_bumper.mp4
You can also specify a custom config file:
python video_stitcher.py path/to/front_bumper.mp4 path/to/content.mp4 path/to/rear_bumper.mp4 --config path/to/custom_config.yml
-
The stitched video will be saved in the
output
directory.
To run the unit tests, use the following command:
pytest tests/test_video_stitcher.py -v
Feel free to fork this repository and create pull requests for improvements or feature additions. Ensure that new code is covered by unit tests.
This project is licensed under the MIT License. See the LICENSE file for details.
For questions, you can contact the project maintainer, Clark Dever.