Name | media-manipulator-lib JSON |
Version |
0.1.4
JSON |
| download |
home_page | None |
Summary | A composable FFmpeg-based video editing library |
upload_time | 2025-08-08 09:37:34 |
maintainer | None |
docs_url | None |
author | Aditya Sharma |
requires_python | >=3.8 |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# ๐ฌ Media Manipulator Library
A modular, pluggable video editing library built with Python and FFmpeg.
Supports programmatic video transformations like text (watermark) overlay and audio merging using strategy and interpreter design patterns.
---
## ๐ Features
- Add watermark (text overlay) to videos
- Overlay audio tracks onto videos
- Process nested JSON editing instructions
- In-memory and tempfile-based FFmpeg pipelines
- Clean, extendable strategy-based architecture
- Custom command interpreter for complex video editing workflows
- Developer-friendly logging using `colorlog`
---
## ๐ฆ Installation
### From PyPI (coming soon)
```bash
pip install media-manipulator-lib==0.1.3
```
https://pypi.org/project/media-manipulator-lib/0.1.3/
### From source
```bash
git clone https://github.com/angel-one/media-manipulator-library
cd media-manipulator-library
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
```
---
## ๐งช Testing
```bash
pytest # all tests
pytest tests/unit # only unit tests
pytest tests/integration # only integration tests
```
---
## ๐ง Usage Example
```python
from video_editor import process_json_command
command = {
"operation": "overlay",
"left": {
"operation": "overlay",
"left": {
"type": "video",
"value": base64.b64encode(open("video.mp4", "rb").read())
},
"right": {
"type": "text",
"value": "Aditya Sharma",
"style": {
"position_x":380,
"position_y":380,
"size": 52,
"style": ""
}
}
},
"right": {
"type": "audio",
"value": base64.b64encode(open("audio.mp3", "rb").read())
}
}
result = process_json_command(command)
with open("output.mp4", "wb") as f:
f.write(result["bytes"].getvalue())
```
---
## ๐ Project Structure
```
media-manipulator-lib/
โโโ media_manipulator/ # Main package
โ โโโ __init__.py
โ โโโ cli.py # CLI entry point (if used)
โ โโโ core/
โ โ โโโ __init__.py
โ โ โโโ interpreter.py # JSON โ command parser
โ โ โโโ processor.py # Operation executor
โ โ โโโ strategy_registry.py # Registers available strategies
โ โ โโโ strategies/ # Strategy pattern implementations
โ โ โโโ __init__.py
โ โ โโโ add.py
โ โ โโโ base.py
โ โ โโโ clip.py
โ โ โโโ concat.py
โ โ โโโ overlay.py
โ โโโ utils/
โ โ โโโ __init__.py
โ โ โโโ audio.py # Audio processing helpers
โ โ โโโ helpers.py # Generic utilities
โ โ โโโ logger.py # Logger setup
โ โ โโโ video.py # Video processing helpers
โโโ tests/ # Unit and integration tests
โโโ .gitignore
โโโ LICENSE
โโโ MANIFEST.in
โโโ pyproject.toml
โโโ README.md
โโโ requirements.txt # Optional (for dev setup)
โโโ setup.py
```
---
## ๐ ๏ธ Built With
- **Python 3.11+**
- **FFmpeg + ffmpeg-python**
- **pytest** for testing
- **colorlog** for colored logging
---
## ๐ License
MIT License ยฉ 2025 Aditya Sharma / AngelOne
---
## ๐โโ๏ธ Contributing
Contributions welcome! Please submit issues or pull requests for improvements or new features.
---
## ๐ซ Contact
For questions or support, open a GitHub issue or reach out to aditya.3sharma@angelone.in
Raw data
{
"_id": null,
"home_page": null,
"name": "media-manipulator-lib",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": null,
"author": "Aditya Sharma",
"author_email": "aditya.3sharma@angelone.in",
"download_url": "https://files.pythonhosted.org/packages/d8/fc/4864da3948ad11fe7e12367501aed19dc0b8d9fe5339aab9cfcb247de174/media_manipulator_lib-0.1.4.tar.gz",
"platform": null,
"description": "# \ud83c\udfac Media Manipulator Library\n\nA modular, pluggable video editing library built with Python and FFmpeg. \nSupports programmatic video transformations like text (watermark) overlay and audio merging using strategy and interpreter design patterns.\n\n---\n\n## \ud83d\ude80 Features\n\n- Add watermark (text overlay) to videos\n- Overlay audio tracks onto videos\n- Process nested JSON editing instructions\n- In-memory and tempfile-based FFmpeg pipelines\n- Clean, extendable strategy-based architecture\n- Custom command interpreter for complex video editing workflows\n- Developer-friendly logging using `colorlog`\n\n---\n\n## \ud83d\udce6 Installation\n\n### From PyPI (coming soon)\n```bash\npip install media-manipulator-lib==0.1.3\n```\nhttps://pypi.org/project/media-manipulator-lib/0.1.3/\n\n### From source\n```bash\ngit clone https://github.com/angel-one/media-manipulator-library\ncd media-manipulator-library\npython3 -m venv .venv\nsource .venv/bin/activate\npip install -e .\n```\n\n---\n\n## \ud83e\uddea Testing\n\n```bash\npytest # all tests\npytest tests/unit # only unit tests\npytest tests/integration # only integration tests\n```\n\n---\n\n## \ud83d\udd27 Usage Example\n\n```python\nfrom video_editor import process_json_command\n\ncommand = {\n \"operation\": \"overlay\",\n \"left\": {\n \"operation\": \"overlay\",\n \"left\": {\n \"type\": \"video\",\n \"value\": base64.b64encode(open(\"video.mp4\", \"rb\").read())\n },\n \"right\": {\n \"type\": \"text\",\n \"value\": \"Aditya Sharma\",\n \"style\": {\n \"position_x\":380,\n \"position_y\":380,\n \"size\": 52,\n \"style\": \"\"\n }\n }\n },\n \"right\": {\n \"type\": \"audio\",\n \"value\": base64.b64encode(open(\"audio.mp3\", \"rb\").read())\n }\n}\n\nresult = process_json_command(command)\n\nwith open(\"output.mp4\", \"wb\") as f:\n f.write(result[\"bytes\"].getvalue())\n```\n\n---\n\n## \ud83d\udcc2 Project Structure\n\n```\nmedia-manipulator-lib/\n\u251c\u2500\u2500 media_manipulator/ # Main package\n\u2502 \u251c\u2500\u2500 __init__.py\n\u2502 \u251c\u2500\u2500 cli.py # CLI entry point (if used)\n\u2502 \u251c\u2500\u2500 core/\n\u2502 \u2502 \u251c\u2500\u2500 __init__.py\n\u2502 \u2502 \u251c\u2500\u2500 interpreter.py # JSON \u2192 command parser\n\u2502 \u2502 \u251c\u2500\u2500 processor.py # Operation executor\n\u2502 \u2502 \u251c\u2500\u2500 strategy_registry.py # Registers available strategies\n\u2502 \u2502 \u2514\u2500\u2500 strategies/ # Strategy pattern implementations\n\u2502 \u2502 \u251c\u2500\u2500 __init__.py\n\u2502 \u2502 \u251c\u2500\u2500 add.py\n\u2502 \u2502 \u251c\u2500\u2500 base.py\n\u2502 \u2502 \u251c\u2500\u2500 clip.py\n\u2502 \u2502 \u251c\u2500\u2500 concat.py\n\u2502 \u2502 \u251c\u2500\u2500 overlay.py\n\u2502 \u251c\u2500\u2500 utils/\n\u2502 \u2502 \u251c\u2500\u2500 __init__.py\n\u2502 \u2502 \u251c\u2500\u2500 audio.py # Audio processing helpers\n\u2502 \u2502 \u251c\u2500\u2500 helpers.py # Generic utilities\n\u2502 \u2502 \u251c\u2500\u2500 logger.py # Logger setup\n\u2502 \u2502 \u2514\u2500\u2500 video.py # Video processing helpers\n\u251c\u2500\u2500 tests/ # Unit and integration tests\n\u251c\u2500\u2500 .gitignore\n\u251c\u2500\u2500 LICENSE\n\u251c\u2500\u2500 MANIFEST.in\n\u251c\u2500\u2500 pyproject.toml\n\u251c\u2500\u2500 README.md\n\u251c\u2500\u2500 requirements.txt # Optional (for dev setup)\n\u2514\u2500\u2500 setup.py\n```\n\n---\n\n## \ud83d\udee0\ufe0f Built With\n\n- **Python 3.11+**\n- **FFmpeg + ffmpeg-python**\n- **pytest** for testing\n- **colorlog** for colored logging\n\n---\n\n## \ud83d\udcdc License\n\nMIT License \u00a9 2025 Aditya Sharma / AngelOne\n\n---\n\n## \ud83d\ude4b\u200d\u2642\ufe0f Contributing\n\nContributions welcome! Please submit issues or pull requests for improvements or new features.\n\n---\n\n## \ud83d\udceb Contact\n\nFor questions or support, open a GitHub issue or reach out to aditya.3sharma@angelone.in\n",
"bugtrack_url": null,
"license": null,
"summary": "A composable FFmpeg-based video editing library",
"version": "0.1.4",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "16dea553bf5eed0d91aa7af1c4ac28e0e4443d021e8839dd9a7664f82f468783",
"md5": "52d828012b50f3db6715fc9cef61a698",
"sha256": "679315585dbe16acfd7419ef22befe537a34287a9b5252135dba4048869ef64c"
},
"downloads": -1,
"filename": "media_manipulator_lib-0.1.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "52d828012b50f3db6715fc9cef61a698",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 15806,
"upload_time": "2025-08-08T09:37:33",
"upload_time_iso_8601": "2025-08-08T09:37:33.124380Z",
"url": "https://files.pythonhosted.org/packages/16/de/a553bf5eed0d91aa7af1c4ac28e0e4443d021e8839dd9a7664f82f468783/media_manipulator_lib-0.1.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "d8fc4864da3948ad11fe7e12367501aed19dc0b8d9fe5339aab9cfcb247de174",
"md5": "2c152ab4c9b8c17501f4809914070b88",
"sha256": "604c1a6d1676d36eab55afb62fc096bfa25c0d3c4035ef86d7ebe149d0744628"
},
"downloads": -1,
"filename": "media_manipulator_lib-0.1.4.tar.gz",
"has_sig": false,
"md5_digest": "2c152ab4c9b8c17501f4809914070b88",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 12315,
"upload_time": "2025-08-08T09:37:34",
"upload_time_iso_8601": "2025-08-08T09:37:34.392709Z",
"url": "https://files.pythonhosted.org/packages/d8/fc/4864da3948ad11fe7e12367501aed19dc0b8d9fe5339aab9cfcb247de174/media_manipulator_lib-0.1.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-08 09:37:34",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "media-manipulator-lib"
}