███╗ ███╗███████╗██████╗ ██╗ █████╗ ██╗ ██╗ ███╗ ███╗ ████╗ ████║██╔════╝██╔══██╗██║██╔══██╗██║ ██║ ████╗ ████║ ██╔████╔██║█████╗ ██║ ██║██║███████║██║ ██║ ██╔████╔██║ ██║╚██╔╝██║██╔══╝ ██║ ██║██║██╔══██║██║ ██║ ██║╚██╔╝██║ ██║ ╚═╝ ██║███████╗██████╔╝██║██║ ██║███████╗███████╗██║ ╚═╝ ██║ ╚═╝ ╚═╝╚══════╝╚═════╝ ╚═╝╚═╝ ╚═╝╚══════╝╚══════╝╚═╝ ╚═╝
Quick Start
Install MediaLLM:
pip install mediallm
Setup prerequisites:
# Install Ollama (local LLM)
curl -fsSL https://ollama.com/install.sh | sh
ollama serve
ollama pull llama3.1:latest
# Install FFmpeg
brew install ffmpeg # macOS
# sudo apt install ffmpeg # Linux
CLI Usage
# Convert video to audio
mediallm "convert video.mp4 to MP3 audio"
# Resize and compress
mediallm "compress large_video.mp4 to 720p"
# Create GIF from video
mediallm "create 10-second GIF from video.mp4 starting at 1 minute"
# Preview command (dry-run)
mediallm --dry-run "extract audio from movie.avi"
Python API Usage
Basic Usage
import mediallm
# Initialize MediaLLM
ml = mediallm.MediaLLM()
# Generate FFmpeg commands from natural language
commands = ml.generate_command("convert video.mp4 to high-quality MP3")
print("Generated commands:", commands)
# Scan workspace for media files
workspace = ml.scan_workspace()
print(f"Found {len(workspace.get('videos', []))} videos")
Advanced Usage
import mediallm
# Scan directory for media files
workspace = mediallm.discover_media()
print(f"Found {len(workspace.get('videos', []))} videos")
# Initialize with custom settings
ml = mediallm.MediaLLM(
workspace=workspace,
model_name="llama3.1:latest",
ollama_host="http://localhost:11434",
timeout=120
)
# Generate commands from natural language
commands = ml.generate_command("compress large_video.mp4 to 720p")
print("Commands:", commands)
Using Data Models
import mediallm
from pathlib import Path
# Create MediaIntent objects directly
intent = mediallm.MediaIntent(
action=mediallm.Action.convert,
inputs=[Path("input.mp4")],
video_codec="libx264",
audio_codec="aac"
)
# Available actions
for action in mediallm.Action:
print(f"- {action.value}")
Configuration
Create a .env file or set environment variables:
MEDIALLM_MODEL=llama3.1:latest
MEDIALLM_OLLAMA_HOST=http://localhost:11434
MEDIALLM_OUTPUT_DIR=./outputs
MEDIALLM_DRY_RUN=false
Contributing
We welcome contributions! See our contributing guide for:
- Development setup
- Testing guidelines
- Code style requirements
- How to submit pull requests
Metadata
Release files for mediallm 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mediallm-0.0.4.tar.gz | 111.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mediallm-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 232.2 kB
Release files / mediallm-0.0.4.tar.gz
| Download URL | mediallm-0.0.4.tar.gz |
|---|---|
| Size | 111.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ae803fdcdf1f2a158137728d4f1cd777da551fccca1f1ced67a262f55a3a0240
|
|
BLAKE2b-256 checksum How to use checksums |
9b4e5dba4338eaba4c52c96b6ca19854c3e2cfdb98b9867bbaec8185793f1f58
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 2, 2026.
Transparency logRelease files / mediallm-0.0.4-py3-none-any.whl
| Download URL | mediallm-0.0.4-py3-none-any.whl |
|---|---|
| Size | 121.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4400e79ad3d3028c7151376e6c16284c7ca5d38757004c2f884568e6474dd699
|
|
BLAKE2b-256 checksum How to use checksums |
81f742bba1d2a0e9d1b190356592c074a59980bae2388b6246b8d96267465525
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 2, 2026.
Transparency log