Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/davidalgis/pyeasyvideotools
Contains simple video tools
https://github.com/davidalgis/pyeasyvideotools
Last synced: 6 days ago
JSON representation
Contains simple video tools
- Host: GitHub
- URL: https://github.com/davidalgis/pyeasyvideotools
- Owner: davidAlgis
- License: mit
- Created: 2024-10-28T19:17:13.000Z (18 days ago)
- Default Branch: main
- Last Pushed: 2024-10-28T19:38:56.000Z (18 days ago)
- Last Synced: 2024-10-28T20:33:13.688Z (18 days ago)
- Language: Python
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Easy video tools with python
This Python script gives some tools to modify video in a easy way. It propose to rotates and/or compresses a video file, with options to customize the rotation angle, compression settings, and output path. If desired, it can apply only compression without rotation, allowing for flexible video processing.
## Installation
Before running the script, ensure you have python 3.6 or newer installed on your system and you need to install the required Python libraries. You can install them using the provided `requirements.txt` file.
```bash
pip install -r requirements.txt
```- **HandBrakeCLI**: To enable video compression, install HandBrakeCLI from [HandBrake's website](https://handbrake.fr/downloads2.php) and provide its executable path if it differs from the default.
## Usage
To use the script, run it from the command line with the desired options.
```bash
python main.py [options]
```## Options
- `-i`, `--input `: Specify the path to the input video file. This option is required.
- `-r`, `--rot `: Specify the rotation angle (0-360 degrees) to rotate the video. If not specified, the rotation is skipped, and only compression is applied if enabled.
- `-c`, `--compress `: Set to `True` or `False` to enable or disable compression after rotation. Default is `True`. Compression is done using HandBrakeCLI, so ensure HandBrakeCLI is installed.
- `-hb`, `--handbrake-path `: Specify the path to the `HandBrakeCLI` executable. Default is `"C:\Program Files\HandBrake\HandBrakeCLI.exe"` on Windows. Adjust this path if HandBrakeCLI is located elsewhere.
- `-o`, `--output `: Specify the path of the final output video file. If not specified, the script will save the file with a default name based on the input file name and applied transformations.
- `-h`, `--help`: Display help information showing all command-line options.
## Example
To rotate a video by 90 degrees, compress it, and save it as `output_video.mp4`:
```bash
python main.py -i input_video.mp4 -r 90 -o output_video.mp4
```