Skip to content

lucidsleeping/mpegtic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mpegtic

Friendly FFmpeg wrapper CLI for Linux and macOS.

Requires system FFmpeg (ffmpeg + ffprobe on your PATH).

Install

Homebrew (macOS / Linuxbrew)

brew install lucidsleeping/mpegtic/mpegtic

This installs mpegtic and pulls in ffmpeg automatically.

Upgrade later with:

brew update
brew upgrade mpegtic

pip / pipx / uv

pip install mpegtic
# or
pipx install mpegtic
# or
uv tool install mpegtic

With pip/pipx/uv you still need system FFmpeg on your PATH (brew install ffmpeg, or your distro package).

Pin a version (pip)

pip install mpegtic==0.1.1

Quick start

mpegtic info video.mkv
mpegtic remux video.mp4 -o video.mkv
mpegtic convert song.wav -f mp3
mpegtic streams remove video.mkv --subs all -o clean.mkv
mpegtic subtitle burn video.mkv --track 0
mpegtic compress video.mp4 --crf 28
mpegtic gif clip.mp4 --start 5 --duration 3

Dry-run any command:

mpegtic --dry-run --explain remux in.mp4 -o out.mkv

Raw FFmpeg escape hatch:

mpegtic -- -i in.mp4 -c copy out.mkv
mpegtic ffmpeg -- -i in.mp4 -vf scale=1280:-1 out.mp4

Defaults & profiles

mpegtic config init
mpegtic config show
mpegtic config set crf 20
mpegtic --profile web convert video.mov -f mp4

Config lives at ~/.config/mpegtic/config.toml (via platformdirs).

Commands

Area Commands
Inspect info
Containers remux, convert, streams keep|remove|default
Subtitles subtitle burn|extract|add|convert
Audio audio extract|replace|volume|normalize
Video trim, merge, split, resize, crop, rotate, speed, fps, compress, thumbnail, watermark, fade
GIF gif
Config config init|show|set|path
Escape mpegtic -- …, mpegtic ffmpeg -- …

Development

pip install -e ".[dev]"
pytest

Release checklist

  1. Bump version in pyproject.toml and src/mpegtic/__init__.py
  2. python -m build and test pip install dist/*.whl
  3. Tag vX.Y.Z (GitHub Actions publishes to PyPI)
  4. Update Formula/mpegtic.rb URL + sha256 from the PyPI sdist
  5. Push formula to the Homebrew tap

Notes

Hard-burning (subtitle burn) needs an FFmpeg build with libass (subtitles filter). Soft mux/extract/remove work without it.

License

MIT

About

FFmpeg wrapper CLI

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors