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 convertr

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: convertr-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 52760753ab6e267c7c6698b1c18ea105eee0854e87797cd9351e89912486dfd1
MD5 146fb20aea8b166ce37216645b35a92e
BLAKE2b-256 bedd286fc256a9214d4ab08705ab5b239d95a5f5ecc5c61a17ae839105eb7a33

See more details on using hashes here.

File details

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

File metadata

  • Download URL: convertr-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 62d845b68f3a66c2ed5ded0d8a73fc16fd745e782bc5911b048d22b8cb129890
MD5 2368188adfb1e7fda963e6d845292c2d
BLAKE2b-256 24eeb4d1b25a6525bb8c78cc056fc402a0f640ecec163a1a28347f4040f6eca9

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