long-to-short-cli

A CLI tool to extract a video clip and crop it to a 9:16 aspect ratio using MoviePy


License
GPL-3.0
Install
pip install long-to-short-cli==1.1.0

Documentation

Long to Short CLI

PyPI version PyPI - Downloads Run Tests Coverage Status

A command-line tool for cropping and trimming video files. Easily extract a desired portion of a video and convert it to a vertical video (9:16 aspect ratio). This tool uses the MoviePy library to process videos. It's perfect for creating social media clips or quickly trimming videos while maintaining high-quality audio and video.

Installation

Prerequisites

Install the Package

You can install the package using pip3:

pip3 install long-to-short-cli

Usage

To use the script, run the following command:

  1. Run the long-to-short-cli script with the following command:
long-to-short-cli my_video.mp4 cropped_video.mp4 10 40

Replace input_video.mp4 with the path to the input video file, output_video.mp4 with the desired output file path, and start_time and end_time with the desired start and end times of the clip in HH:MM:SS, MM:SS, or SS format.

Example:

long-to-short-cli my_video.mp4 cropped_video.mp4 00:00:10 00:00:40

This command will extract a clip from my_video.mp4 starting at 10 seconds (00:00:10) and ending at 40 seconds (00:00:40), convert it to a 9:16 aspect ratio, and save the result as cropped_video.mp4.

License

This project is licensed under the GNU License - see the LICENSE file for details.