Skip to content

Add an image overlay to video frames: A Python script to apply a PNG image with transparency to every frame of a video using OpenCV and moviepy.

Notifications You must be signed in to change notification settings

mmmark0/video-frame-overlay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Video Frame Overlay

This script, video_frame_overlay.py, add an image overlay to video frames and saves the result as a new video file.

Requirements

  • Python
  • OpenCV
  • moviepy

Installation

  1. Install the required packages by running: pip install -r requirements.txt.

Usage

  1. Place your video file in the input directory and name it video.mp4.
  2. Place your PNG overlay image with transparency in the image_folder directory and name it image.png.
  3. Run the script: python overlay_video.py.
  4. The resulting video with the overlay will be saved in the output directory as video.mp4.

Notes

  • 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.

About

Add an image overlay to video frames: A Python script to apply a PNG image with transparency to every frame of a video using OpenCV and moviepy.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages