Skip to content
OTRM

Meg

v0.2.0, open source

An FFmpeg assistant for the terminal. Describe the job in plain English and Meg returns a ready-to-run command with a short explanation. Point it at a real file and it reads the source with ffprobe first, so the command matches what you actually have.

$ meg "normalize loudness to -23 LUFS for broadcast"ffmpeg -i input.mov -c:v copy -af loudnorm=I=-23:TP=-1:LRA=7 -c:a pcm_s24le output.mov
• loudnorm targets EBU R128: -23 LUFS integrated, -1 dBTP true peak• video is stream-copied, so the picture is untouched• audio is written as 24-bit PCM
[r]un  [e]dit  [s]ave preset  [q]uit

An example session. Meg works with Claude or OpenAI models.

Install

You need Python 3.11 or later and an Anthropic or OpenAI API key. ffmpeg and ffprobe are optional, and only needed if you want Meg to inspect files and run commands for you.

pip install git+https://github.com/seller1105/meg.git
meg --help

A PyPI release is on the way. Until then, install from GitHub as above.

What you can ask

Transcode to H.264 with AAC audio
meg "convert mkv to h264 mp4 with aac"
Broadcast loudness, with a longer explanation
meg --verbose "normalize loudness to -23 LUFS"
Remux without re-encoding
meg "remux mkv to mp4, copy all streams"
Work from a real file on disk
meg "scale D:\clips\shot.mov to 1920x1080"
Explain a command you already have
meg --explain "ffmpeg -i in.mp4 -vf scale=1920:1080 out.mp4"
Open an interactive session
meg

Safe with your source files

Approval for every run
Meg shows the full command and waits for a yes before it runs anything. Each revised command needs a fresh approval.
No shell
Commands run as an argument list, limited to ffmpeg and ffprobe, so nothing else can sneak in.
Your input stays put
Meg refuses to write over its own input and asks before overwriting any existing output.
Fixes when a run fails
If an encode fails, Meg can send the error to the model for a diagnosis and a corrected command. It only calls the API if you choose this.

Presets

Save a command once and Meg turns its file paths into placeholders, so you can rerun the same encode settings on any source.

meg preset save proxy-1080 "ffmpeg -i input.mov -vf scale=-2:1080 -c:v libx264 -crf 20 -c:a aac out.mp4"
meg preset run proxy-1080 "D:\renders\new shot.mov"
meg preset list

Source

Meg is open source under the MIT license. Issues and pull requests are welcome.

seller1105/meg on GitHub