Skip to main content

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


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 hashes)

Uploaded Source

Built Distribution

shrinkx-1.1-py3-none-any.whl (4.6 kB view hashes)

Uploaded Python 3

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