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.4.tar.gz (4.2 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.4-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: convertr-0.1.4.tar.gz
  • Upload date:
  • Size: 4.2 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.4.tar.gz
Algorithm Hash digest
SHA256 2de7e21cb568944e24b6447151d4f3b12b8c24dc8f57cdce1f5280429ebe8f1c
MD5 16bee422de52757b6fbfdb8428abc750
BLAKE2b-256 4eddefe8c6dd261d14b9d080190615f0b1435c311e64094ece9362addae398ea

See more details on using hashes here.

File details

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

File metadata

  • Download URL: convertr-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 4.8 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3c8c7c1b42cf67a6cafbef66c704a99934e1a4023e72ad107622b04dd07a316b
MD5 90c51a7e932df688dcfeba37892ee7e3
BLAKE2b-256 98d1cb0d8465be14615da9d7d812d6cd9fc148bc5ccfa4d5ba739f158da3027c

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