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.1.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.1-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: convertr-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 7ec3dfa3b6e8eba086754d3a36a9059fd4b4d5268b4274d60eeaa19276ade747
MD5 eaf4166d8d264f598b3126ff9275950a
BLAKE2b-256 9713e56352c7740fa740998d42f9840ba2dc0eae8f306012d4cf773c72635fb8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: convertr-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7a58567c3857b24b9f65948ef1e59e0967f5c63711a38ebe859902a3af92afaf
MD5 b84a2f413508ad17ab2a2c3665d20d65
BLAKE2b-256 1ec17aceb8aa2e741ca5d9dbb62ea7dbfb4e58a751700c918683c11937cae3ca

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