This script, video_frame_overlay.py
, add an image overlay to video frames and saves the result as a new video file.
- Python
- OpenCV
- moviepy
- Install the required packages by running:
pip install -r requirements.txt
.
- Place your video file in the
input
directory and name itvideo.mp4
. - Place your PNG overlay image with transparency in the
image_folder
directory and name itimage.png
. - Run the script:
python overlay_video.py
. - The resulting video with the overlay will be saved in the
output
directory asvideo.mp4
.
- The script automatically resizes the image overlay to match the dimensions of the video.
- The image overlay must be in PNG format with an alpha channel for transparency.