Skip to main content

A universal media converter CLI using FFmpeg

Project description

🎥 Convertr

A fast, lightweight, and dead-simple Command Line Interface (CLI) for converting any media file to another format. Powered by Python, Typer, and FFmpeg.

🚀 Features

  • Universal Support: Convert video, audio, and images (anything FFmpeg handles).
  • Batch Processing: Convert entire directories with a single command.
  • Smart Defaults: Optimized for high-quality H.264 video and AAC audio.
  • Dependency Check: Automatically ensures FFmpeg is doing the heavy lifting.

📦 Installation

1. Prerequisite: Install FFmpeg

This tool requires FFmpeg to be installed on your system.

  • macOS: brew install ffmpeg
  • Linux: sudo apt install ffmpeg
  • Windows: Download from ffmpeg.org

2. Install the CLI

Once you have published this to PyPI, users can install it via:

pip install universal-converter-cli

🛠 Usage

The CLI provides two main commands: file (for single items) and dir (for batch processing).

1. Convert a Single File

By default, it converts to .mp4 unless specified.

# Basic conversion (AVI to MP4)
convert file video.avi

# Convert to a specific format
convert file video.mov --to mkv

# Convert with a custom output name
convert file input.wav --out song.mp3

2. Batch Convert a Directory

Scan an entire folder for a specific extension and convert them all.

# Convert all .avi files in the current folder to .mp4
convert dir ./my_videos --from avi --to mp4

# Convert all .wav files to .mp3
convert dir ./music --from wav --to mp3

⌨️ Command Reference

Command Argument Option Description
file INPUT_PATH --to, -t Target extension (default: mp4)
file INPUT_PATH --out, -o Custom output filename
dir PATH --from, -f Source extension to look for
dir PATH --to, -t Target extension to convert to

🛠 Development

To run the project locally for development:

  1. Clone the repo:
git clone [https://github.com/your-username/universal-converter.git](https://github.com/your-username/universal-converter.git)
cd universal-converter
  1. Install in editable mode:
pip install -e .
  1. Run the tool:
convert --help

📜 License

Distributed under the MIT License.

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

convertr-0.1.2.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

convertr-0.1.2-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file convertr-0.1.2.tar.gz.

File metadata

  • Download URL: convertr-0.1.2.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for convertr-0.1.2.tar.gz
Algorithm Hash digest
SHA256 25c99998c1edcf4d24957d5f78ef50d3d8259455990e9468fd1c584331339f05
MD5 26544ed2d2cf5c30b9ae930a87f9d7b4
BLAKE2b-256 c515f5dbba2bce71ec83a5340944ceafd3f361da7db60cfb2acf7c6e589785e7

See more details on using hashes here.

File details

Details for the file convertr-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: convertr-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for convertr-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e6fa3a35a20d6a71b1fffbd42035ff4e44f3cf3f1766630a253b180d18f75200
MD5 a90023d128532bc87e491d5c10a3b0cd
BLAKE2b-256 d0f7aed18562addbb1cc282b19d72e0b81410d5e9b4cd5b2c9c1bd230cc92df2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page