A Python tool for effortlessly compressing media files for sharing online.
Project description
Shrinkx
Shrinkx is a Python tool for effortlessly compressing media files using ffmpeg. The tool is inspired by the website https://8mb.video and the annoyance of memorizing ffmpeg command arguments 😩.
Demo
https://github.com/stormedx/shrinkx/assets/88412569/1937f006-138b-4cea-b86b-2b10a71ce76a
Requirements
- Python 3.8 or higher
- ffmpeg 5.x or higher is required and needs to be a $PATH variable on your system. Please read ffmpeg for additional information.
Commands
- '-f', '--format': Choose the file format you want to encode the output to (i.e .mp4, .webm, .mov, .mkv).
- '-s', '--size': Allows you to compress a file to a specific size (kilobytes, megabytes, gigabytes).
- '-o', '--output': Output directory for the compressed file. If no location is given, the output file will output to the parent working directory of the source file.
- '--no-audio' : Removes all audio in the output file.
- '--chan' : Shortcut for compressing files into a .webm suitable for 4chan (<3.5mb in size, no audio).
- '--discord' : Shortcut for compressing files into an .mp4 >8mb in size
Usage Examples
In it's simplest form, shrinkx file.mov
will automatically compress & encode to .mp4 for sharing easily on platforms such as Discord.
shrinkx --size 5mb -f webm video.mp4
ffmpeg installation
WIP
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
shrinkx-1.1.tar.gz
(4.4 kB
view details)
Built Distribution
shrinkx-1.1-py3-none-any.whl
(4.6 kB
view details)
File details
Details for the file shrinkx-1.1.tar.gz
.
File metadata
- Download URL: shrinkx-1.1.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1517a5ba306b04e1f93987b1f280bf066ec7a31e2c991c40799364244f46217c |
|
MD5 | 1f19bce266920b42a713719a60db19fb |
|
BLAKE2b-256 | 9e46ed5f5c06ecab72058a3a8d719248472a04d77e5daed575e5b41a26201ff3 |
File details
Details for the file shrinkx-1.1-py3-none-any.whl
.
File metadata
- Download URL: shrinkx-1.1-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 348adeb122db0a0c80db7ec955dd96f88b0be8a988a3f8444c282736466a1496 |
|
MD5 | 9723f88a959479af1e211cfeb6c43dc9 |
|
BLAKE2b-256 | f1ef04b264e59229d4e3477665f166e28eb82680153159163664725434299d3e |