<pre>
███╗ ███╗███████╗██████╗ ██╗ █████╗ ██╗ ██╗ ███╗ ███╗
████╗ ████║██╔════╝██╔══██╗██║██╔══██╗██║ ██║ ████╗ ████║
██╔████╔██║█████╗ ██║ ██║██║███████║██║ ██║ ██╔████╔██║
██║╚██╔╝██║██╔══╝ ██║ ██║██║██╔══██║██║ ██║ ██║╚██╔╝██║
██║ ╚═╝ ██║███████╗██████╔╝██║██║ ██║███████╗███████╗██║ ╚═╝ ██║
╚═╝ ╚═╝╚══════╝╚═════╝ ╚═╝╚═╝ ╚═╝╚══════╝╚══════╝╚═╝ ╚═╝
</pre>
<div align="center">
**Natural language to FFmpeg, instantly and privately**
[](https://pypi.org/project/mediallm/)
[](https://www.python.org/downloads/)
[](https://opensource.org/licenses/MIT)
**[Full Documentation](https://mediallm.arunbrahma.com/)**
</div>
---
## Quick Start
**Install MediaLLM:**
```bash
pip install mediallm
```
**Setup prerequisites:**
```bash
# 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
```bash
# 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
```python
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
```python
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
```python
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:
```bash
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](../../CONTRIBUTING.md) for:
- Development setup
- Testing guidelines
- Code style requirements
- How to submit pull requests
---
<div align="center">
[Report Bug](https://github.com/iamarunbrahma/mediallm/issues) • [Request Feature](https://github.com/iamarunbrahma/mediallm/issues) • [Discussions](https://github.com/iamarunbrahma/mediallm/discussions)
</div>
Raw data
{
"_id": null,
"home_page": null,
"name": "mediallm",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "Arun Brahma <mithubrahma94@gmail.com>",
"keywords": "ai, audio, automation, cli, conversion, ffmpeg, llm, local-ai, media-processing, natural-language, ollama, privacy, video",
"author": null,
"author_email": "Arun Brahma <mithubrahma94@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/7c/ce/1969ebf21bff43f5350c35249ae928cce25cf247f551eccaedbfc7ae1984/mediallm-0.0.2.tar.gz",
"platform": null,
"description": "<pre>\n\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2557\n\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255d\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2551\n\u2588\u2588\u2554\u2588\u2588\u2588\u2588\u2554\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2554\u2588\u2588\u2588\u2588\u2554\u2588\u2588\u2551\n\u2588\u2588\u2551\u255a\u2588\u2588\u2554\u255d\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u255d \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u255a\u2588\u2588\u2554\u255d\u2588\u2588\u2551\n\u2588\u2588\u2551 \u255a\u2550\u255d \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255d\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2551 \u255a\u2550\u255d \u2588\u2588\u2551\n\u255a\u2550\u255d \u255a\u2550\u255d\u255a\u2550\u2550\u2550\u2550\u2550\u2550\u255d\u255a\u2550\u2550\u2550\u2550\u2550\u255d \u255a\u2550\u255d\u255a\u2550\u255d \u255a\u2550\u255d\u255a\u2550\u2550\u2550\u2550\u2550\u2550\u255d\u255a\u2550\u2550\u2550\u2550\u2550\u2550\u255d\u255a\u2550\u255d \u255a\u2550\u255d\n</pre>\n\n<div align=\"center\">\n\n**Natural language to FFmpeg, instantly and privately**\n\n[](https://pypi.org/project/mediallm/)\n[](https://www.python.org/downloads/)\n[](https://opensource.org/licenses/MIT)\n\n**[Full Documentation](https://mediallm.arunbrahma.com/)**\n\n</div>\n\n---\n\n## Quick Start\n\n**Install MediaLLM:**\n```bash\npip install mediallm\n```\n\n**Setup prerequisites:**\n```bash\n# Install Ollama (local LLM)\ncurl -fsSL https://ollama.com/install.sh | sh\nollama serve\nollama pull llama3.1:latest\n\n# Install FFmpeg\nbrew install ffmpeg # macOS\n# sudo apt install ffmpeg # Linux\n```\n\n---\n\n## CLI Usage\n\n```bash\n# Convert video to audio\nmediallm \"convert video.mp4 to MP3 audio\"\n\n# Resize and compress\nmediallm \"compress large_video.mp4 to 720p\"\n\n# Create GIF from video\nmediallm \"create 10-second GIF from video.mp4 starting at 1 minute\"\n\n# Preview command (dry-run)\nmediallm --dry-run \"extract audio from movie.avi\"\n```\n\n---\n\n## Python API Usage\n\n### Basic Usage\n```python\nimport mediallm\n\n# Initialize MediaLLM\nml = mediallm.MediaLLM()\n\n# Generate FFmpeg commands from natural language\ncommands = ml.generate_command(\"convert video.mp4 to high-quality MP3\")\nprint(\"Generated commands:\", commands)\n\n# Scan workspace for media files\nworkspace = ml.scan_workspace()\nprint(f\"Found {len(workspace.get('videos', []))} videos\")\n```\n\n### Advanced Usage\n```python\nimport mediallm\n\n# Scan directory for media files\nworkspace = mediallm.discover_media()\nprint(f\"Found {len(workspace.get('videos', []))} videos\")\n\n# Initialize with custom settings\nml = mediallm.MediaLLM(\n workspace=workspace,\n model_name=\"llama3.1:latest\", \n ollama_host=\"http://localhost:11434\",\n timeout=120\n)\n\n# Generate commands from natural language\ncommands = ml.generate_command(\"compress large_video.mp4 to 720p\")\nprint(\"Commands:\", commands)\n```\n\n### Using Data Models\n```python\nimport mediallm\nfrom pathlib import Path\n\n# Create MediaIntent objects directly\nintent = mediallm.MediaIntent(\n action=mediallm.Action.convert,\n inputs=[Path(\"input.mp4\")],\n video_codec=\"libx264\",\n audio_codec=\"aac\"\n)\n\n# Available actions\nfor action in mediallm.Action:\n print(f\"- {action.value}\")\n```\n\n---\n\n## Configuration\n\nCreate a `.env` file or set environment variables:\n\n```bash\nMEDIALLM_MODEL=llama3.1:latest\nMEDIALLM_OLLAMA_HOST=http://localhost:11434\nMEDIALLM_OUTPUT_DIR=./outputs\nMEDIALLM_DRY_RUN=false\n```\n\n---\n\n## Contributing\n\nWe welcome contributions! See our [contributing guide](../../CONTRIBUTING.md) for:\n- Development setup\n- Testing guidelines \n- Code style requirements\n- How to submit pull requests\n\n---\n\n\n<div align=\"center\">\n\n[Report Bug](https://github.com/iamarunbrahma/mediallm/issues) \u2022 [Request Feature](https://github.com/iamarunbrahma/mediallm/issues) \u2022 [Discussions](https://github.com/iamarunbrahma/mediallm/discussions)\n\n</div>",
"bugtrack_url": null,
"license": null,
"summary": "Natural language to FFmpeg, instantly and privately",
"version": "0.0.2",
"project_urls": {
"Bug Tracker": "https://github.com/iamarunbrahma/mediallm/issues",
"Changelog": "https://github.com/iamarunbrahma/mediallm/releases",
"Documentation": "https://github.com/iamarunbrahma/mediallm/blob/main/README.md",
"Homepage": "https://github.com/iamarunbrahma/mediallm",
"Repository": "https://github.com/iamarunbrahma/mediallm.git"
},
"split_keywords": [
"ai",
" audio",
" automation",
" cli",
" conversion",
" ffmpeg",
" llm",
" local-ai",
" media-processing",
" natural-language",
" ollama",
" privacy",
" video"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "e5999810ff6d62aa09523a0abf05270b0d0636d0f16660004211dd045ef48816",
"md5": "8e30592f0cf3dbec6cc38c17987ecba1",
"sha256": "4635f2d95cc296da8e340ed740974517891181e1981ad9263850602c4f04826b"
},
"downloads": -1,
"filename": "mediallm-0.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8e30592f0cf3dbec6cc38c17987ecba1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 110072,
"upload_time": "2025-08-31T17:54:02",
"upload_time_iso_8601": "2025-08-31T17:54:02.520812Z",
"url": "https://files.pythonhosted.org/packages/e5/99/9810ff6d62aa09523a0abf05270b0d0636d0f16660004211dd045ef48816/mediallm-0.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "7cce1969ebf21bff43f5350c35249ae928cce25cf247f551eccaedbfc7ae1984",
"md5": "28030ff6e1f8a1a02f4cf67ae5533f44",
"sha256": "6d3d64ecbd6c070467e4731a41f3d28faac04a63947c0fd62d402c53b150699a"
},
"downloads": -1,
"filename": "mediallm-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "28030ff6e1f8a1a02f4cf67ae5533f44",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 162441,
"upload_time": "2025-08-31T17:54:05",
"upload_time_iso_8601": "2025-08-31T17:54:05.932780Z",
"url": "https://files.pythonhosted.org/packages/7c/ce/1969ebf21bff43f5350c35249ae928cce25cf247f551eccaedbfc7ae1984/mediallm-0.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-31 17:54:05",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "iamarunbrahma",
"github_project": "mediallm",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "mediallm"
}