https://github.com/davidfstr/vidcrush
Reduces the byte size of a video file by reencoding it at half width and height.
https://github.com/davidfstr/vidcrush
handbrake video video-encoding
Last synced: 4 months ago
JSON representation
Reduces the byte size of a video file by reencoding it at half width and height.
- Host: GitHub
- URL: https://github.com/davidfstr/vidcrush
- Owner: davidfstr
- Created: 2017-10-15T16:23:33.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-05T15:32:56.000Z (over 6 years ago)
- Last Synced: 2025-02-24T03:36:39.255Z (4 months ago)
- Topics: handbrake, video, video-encoding
- Language: Python
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vidcrush
Reencodes the specified input video file, reducing the video size, by default at 1/2 width and height.
## Requirements
* Python 3.6+
* macOS 10.14+
* HandBrakeCLI, installed in `/Applications`## Install
* Clone this repository.
* Open a terminal and `cd` to this repository's directory.
* `pip3 install -r requirements.txt`
* Add this repository to your `$PATH` variable so that `vidcrush.py` can be run from anywhere.## Usage
```
$ vidcrush.py --help
usage: vidcrush.py [-h] [-s SCALE] [-r] video_filepaths [video_filepaths ...]Reencode video files at a smaller size.
positional arguments:
video_filepathsoptional arguments:
-h, --help show this help message and exit
-s SCALE, --scale SCALE
fraction to multiply the original video dimensions by
-r, --replace replaces the original video file
```The output video will be scaled to 50% the original size.
The output video will be put in the same directory as the input video with a suffix reflecting how much the video was scaled down. For example a input `video.mp4` would generate an output `video-0.5.mp4` by default.
If `--replace` is specified then the input video will be replaced with the output video, with the input video moved to the trash (or recycle bin).
## Running Tests
There aren't any tests yet but you can run the typechecker using:
```
make
```