Skip to main content

Easily create a video montage (either a sequence or a grid of videos)

Project description

video_montage

Easily create a video montage (either a sequence or a grid of videos)

Installing

Install:

pip install video_montage

Usage

Before running, you must have a prepare an input video folder with videos the following structure, eg.

<INPUT_VIDEO_FOLDER_PATH>
├── <video1>.mp4
├── <video2>.mp4
└── ...

video_grid_montage: Create a grid of videos (all playing at the same time)


video_grid_montage --help

usage: video_grid_montage --input_video_folder_path INPUT_VIDEO_FOLDER_PATH
                          [--output_video_folder_path OUTPUT_VIDEO_FOLDER_PATH]
                          [--output_video_filename OUTPUT_VIDEO_FILENAME]
                          [--max_n_videos MAX_N_VIDEOS]
                          [--max_duration_seconds MAX_DURATION_SECONDS]
                          [--fps FPS] [--num_per_row NUM_PER_ROW]
                          [--overlay_filename] [-h]

optional arguments:
  --input_video_folder_path INPUT_VIDEO_FOLDER_PATH
                        (Path, required)
  --output_video_folder_path OUTPUT_VIDEO_FOLDER_PATH
                        (Path, default=.)
  --output_video_filename OUTPUT_VIDEO_FILENAME
                        (str, default=2023-10-20_00-16-32_video_grid_montage.mp4)
  --max_n_videos MAX_N_VIDEOS
                        (Union[int, NoneType], default=None)
  --max_duration_seconds MAX_DURATION_SECONDS
                        (Union[int, NoneType], default=None)
  --fps FPS             (Union[int, NoneType], default=None)
  --num_per_row NUM_PER_ROW
                        (Union[int, NoneType], default=None)
  --overlay_filename    (bool, default=False)
  -h, --help            show this help message and exit

video_sequence_montage: Create a sequence of videos (playing one at a time sequentially)

video_sequence_montage --help

usage: video_sequence_montage --input_video_folder_path INPUT_VIDEO_FOLDER_PATH
                              [--output_video_folder_path OUTPUT_VIDEO_FOLDER_PATH]
                              [--output_video_filename OUTPUT_VIDEO_FILENAME]
                              [--max_n_videos MAX_N_VIDEOS] [--fps FPS]
                              [--overlay_filename] [-h]

optional arguments:
  --input_video_folder_path INPUT_VIDEO_FOLDER_PATH
                        (Path, required)
  --output_video_folder_path OUTPUT_VIDEO_FOLDER_PATH
                        (Path, default=.)
  --output_video_filename OUTPUT_VIDEO_FILENAME
                        (str, default=2023-10-20_00-17-06_video_sequence_montage.mp4)
  --max_n_videos MAX_N_VIDEOS
                        (Union[int, NoneType], default=None)
  --fps FPS             (Union[int, NoneType], default=None)
  --overlay_filename    (bool, default=False)
  -h, --help            show this help message and exit

Example Usage

(video_montage_env) ➜  video_montage git:(main) ✗ tree openai_rubiks_cube 

openai_rubiks_cube
├── 2023-10-07_20-04-36_openai_rubiks_cube.gif
├── 2023-10-07_20-05-13_openai_rubiks_cube.gif
├── 2023-10-07_20-05-48_openai_rubiks_cube.gif
├── 2023-10-07_20-07-27_openai_rubiks_cube.gif
├── 2023-10-07_20-08-02_openai_rubiks_cube.gif
└── 2023-10-07_20-11-18_openai_rubiks_cube.gif

0 directories, 6 files
(video_montage_env) ➜  video_montage git:(main) ✗ video_grid_montage --input_video_folder_path openai_rubiks_cube
Moviepy - Building video 2023-10-07_20-16-08_video_grid_montage.mp4.
Moviepy - Writing video 2023-10-07_20-16-08_video_grid_montage.mp4

Moviepy - Done !
Moviepy - video ready 2023-10-07_20-16-08_video_grid_montage.mp4

example_video_montage

You can also add the --overlay_filename argument to add the clip's filename to each video clip.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

video_montage-0.1.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

video_montage-0.1.0-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file video_montage-0.1.0.tar.gz.

File metadata

  • Download URL: video_montage-0.1.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.12

File hashes

Hashes for video_montage-0.1.0.tar.gz
Algorithm Hash digest
SHA256 eebe14efd80b0cb3c6ecba281a437d66b5afc7f4a4a6086d292504dba37200cf
MD5 3af1f114ca752b0992f75310d9c42c46
BLAKE2b-256 e4f3d3968516dd5680a5ccddfd671375be8cfbbaf8ca7a49bec79c17a030c35a

See more details on using hashes here.

File details

Details for the file video_montage-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for video_montage-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4f4a2459db1ed119c6a9156a58de8fdfaa8de4c1e21729e9d731eb208ef6f84b
MD5 9f3f12f7c2a42ffe44f4e440c001ae04
BLAKE2b-256 f078c00fc662a3398a24eb0113cb083f276ff13a8f67146c8af82e2b43eb7f79

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page