{"id":28919691,"url":"https://github.com/eswar-7116/python-ffmpeg-docker","last_synced_at":"2026-04-30T07:37:24.151Z","repository":{"id":296361601,"uuid":"993064725","full_name":"eswar-7116/python-ffmpeg-docker","owner":"eswar-7116","description":"A Docker image combining Python 3.13 + FFmpeg for seamless video/audio processing automation.","archived":false,"fork":false,"pushed_at":"2025-12-14T16:17:08.000Z","size":11,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-30T07:37:06.788Z","etag":null,"topics":["docker","docker-image","dockerfile","ffmpeg","ffmpeg-python","multimedia","multimedia-systems","multimedia-tools","python","python-3","python-3-13","python-ffmpeg","python3","python313"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/eswardudi/python-ffmpeg","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eswar-7116.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-30T06:44:46.000Z","updated_at":"2026-04-28T03:19:12.000Z","dependencies_parsed_at":"2025-05-30T10:46:11.401Z","dependency_job_id":"58f4fc6f-94d0-481a-87da-04655aebd10b","html_url":"https://github.com/eswar-7116/python-ffmpeg-docker","commit_stats":null,"previous_names":["eswar-7116/python-ffmpeg-docker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eswar-7116/python-ffmpeg-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eswar-7116%2Fpython-ffmpeg-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eswar-7116%2Fpython-ffmpeg-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eswar-7116%2Fpython-ffmpeg-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eswar-7116%2Fpython-ffmpeg-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eswar-7116","download_url":"https://codeload.github.com/eswar-7116/python-ffmpeg-docker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eswar-7116%2Fpython-ffmpeg-docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32458237,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"online","status_checked_at":"2026-04-30T02:00:05.929Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-image","dockerfile","ffmpeg","ffmpeg-python","multimedia","multimedia-systems","multimedia-tools","python","python-3","python-3-13","python-ffmpeg","python3","python313"],"created_at":"2025-06-22T04:00:38.060Z","updated_at":"2026-04-30T07:37:24.145Z","avatar_url":"https://github.com/eswar-7116.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python + FFmpeg Docker Image\n\n[![Docker Hub](https://img.shields.io/docker/v/eswardudi/python-ffmpeg?label=Docker%20Hub\u0026logo=docker)](https://hub.docker.com/r/eswardudi/python-ffmpeg)\n[![Docker Image Size](https://img.shields.io/docker/image-size/eswardudi/python-ffmpeg/latest?logo=docker)](https://hub.docker.com/r/eswardudi/python-ffmpeg)\n[![Docker Pulls](https://img.shields.io/docker/pulls/eswardudi/python-ffmpeg?logo=docker)](https://hub.docker.com/r/eswardudi/python-ffmpeg)\n[![License](https://img.shields.io/github/license/eswar-7116/python-ffmpeg-docker)](LICENSE)\n\nA production-ready Docker image that combines **Python 3.13.3** with **FFmpeg**, providing a seamless environment for video and audio processing automation.\n\n## 🎯 What is this?\n\n`python-ffmpeg` is a Docker image built on `python:3.13-slim` with FFmpeg and Git pre-installed and configured. It is the standard Python slim image, but with multimedia processing capabilities built right in.\n\n## 🚀 Why use this image?\n\nSetting up FFmpeg alongside Python applications can be time-consuming and error-prone, especially across different environments. This image eliminates the need to:\n\n- ❌ Manually install FFmpeg dependencies\n- ❌ Deal with platform-specific FFmpeg compilation issues\n- ❌ Write complex Dockerfiles just to add FFmpeg support\n- ❌ Troubleshoot missing codecs or libraries\n\n## 🎬 Perfect for\n\n- **Video processing and transcoding**\n- **Audio manipulation and conversion**\n- **Media automation pipelines**\n- **Content management systems**\n- **Streaming applications**\n- **Data analysis involving multimedia files**\n- **Git integration for version control**\n\n## 📦 Quick Start\n\n### Basic Usage\n\n```bash\n# Run interactive Python shell with FFmpeg available\ndocker run -it eswardudi/python-ffmpeg python\n\n# Run a Python script that uses FFmpeg\ndocker run --rm -v $(pwd):/app -w /app eswardudi/python-ffmpeg python your_script.py\n\n# Execute FFmpeg directly\ndocker run --rm -v $(pwd):/media eswardudi/python-ffmpeg ffmpeg -i input.mp4 output.mp3\n```\n\n### Using as Base Image\n\n```dockerfile\nFROM eswardudi/python-ffmpeg:latest\n\nWORKDIR /app\nCOPY requirements.txt .\nRUN pip install -r requirements.txt\n\nCOPY . .\nCMD [\"python\", \"main.py\"]\n```\n\n### Docker Compose Example\n\n```yaml\nversion: \"3.8\"\nservices:\n  video-processor:\n    image: eswardudi/python-ffmpeg:latest\n    volumes:\n      - ./media:/app/media\n      - ./scripts:/app\n    working_dir: /app\n    command: python process_videos.py\n```\n\n## 💻 Usage Examples\n\n### Using subprocess for FFmpeg Commands\n\n```python\nimport subprocess\nimport os\n\ndef convert_video(input_path, output_path):\n    \"\"\"Convert video with H.264 encoding\"\"\"\n    cmd = [\n        'ffmpeg', '-i', input_path,\n        '-c:v', 'libx264',\n        '-c:a', 'aac',\n        '-preset', 'medium',\n        '-crf', '23',\n        '-y', output_path\n    ]\n    subprocess.run(cmd, check=True)\n\ndef batch_convert(input_dir, output_dir):\n    \"\"\"Batch convert all MP4 files in directory\"\"\"\n    for filename in os.listdir(input_dir):\n        if filename.endswith('.mp4'):\n            input_path = os.path.join(input_dir, filename)\n            output_path = os.path.join(output_dir, filename.replace('.mp4', '.avi'))\n            convert_video(input_path, output_path)\n            print(f\"Converted {filename}\")\n```\n\n## 🏷️ Available Tags\n\n| Tag      | Description                    | Size   |\n| -------- | ------------------------------ | ------ |\n| `latest` | Latest stable version          | ~200MB |\n| `3.13`   | Python 3.13 with latest FFmpeg | ~200MB |\n\n## 🛠️ Image Details\n\n- **Base Image**: `python:3.13-slim`\n- **FFmpeg Version**: Latest stable from Debian repositories\n- **Python Version**: 3.13.3\n- **OS**: Debian Bookworm\n\n## 📋 Best Practices\n\n### Performance Optimization\n\n```bash\n# Mount volumes for better I/O performance\ndocker run --rm -v $(pwd)/input:/input -v $(pwd)/output:/output \\\n  eswardudi/python-ffmpeg python process.py\n\n# Use tmpfs for temporary files\ndocker run --rm --tmpfs /tmp:rw,noexec,nosuid,size=1g \\\n  -v $(pwd):/app eswardudi/python-ffmpeg python script.py\n```\n\n### Resource Management\n\n```bash\n# Set memory limits for large video processing\ndocker run --rm -m 2g --cpus=\"2.0\" \\\n  -v $(pwd):/app eswardudi/python-ffmpeg python heavy_processing.py\n```\n\n### Security Considerations\n\n```bash\n# Run as non-root user\ndocker run --rm --user $(id -u):$(id -g) \\\n  -v $(pwd):/app eswardudi/python-ffmpeg python script.py\n```\n\n## 🔧 Building Locally\n\n```bash\n# Clone the repository\ngit clone https://github.com/eswar-7116/python-ffmpeg-docker.git\ncd python-ffmpeg-docker\n\n# Build the image\ndocker build -t python-ffmpeg .\n\n# Test the build\ndocker run --rm python-ffmpeg python -c \"import subprocess; print(subprocess.run(['ffmpeg', '-version'], capture_output=True, text=True).stdout)\"\n```\n\n## 🧪 Testing\n\n```bash\n# Run the test suite\ndocker run --rm -v $(pwd)/tests:/tests python-ffmpeg python -m pytest /tests\n\n# Quick verification\ndocker run --rm python-ffmpeg python -c \"\nimport subprocess\nimport sys\ntry:\n    result = subprocess.run(['ffmpeg', '-version'], capture_output=True, text=True, check=True)\n    print('✅ FFmpeg is working!')\n    print(f'Version: {result.stdout.split()[2]}')\nexcept Exception as e:\n    print('❌ FFmpeg test failed:', e)\n    sys.exit(1)\n\"\n```\n\n## 📝 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🙏 Acknowledgments\n\n- Built on the excellent [official Python Docker images](https://hub.docker.com/_/python)\n- FFmpeg for providing the powerful multimedia framework\n- Git for VCS support\n\n## 📞 Support\n\n- **Issues**: [GitHub Issues](https://github.com/eswar-7116/python-ffmpeg-docker/issues)\n- **Docker Hub**: [eswardudi/python-ffmpeg](https://hub.docker.com/r/eswardudi/python-ffmpeg)\n\n---\n\n\u003cdiv align=\"center\"\u003e\u003cb\u003eIf you found this image helpful, please consider giving it a star 🌟! It helps others find the project and encourages ongoing improvements\u003c/b\u003e\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feswar-7116%2Fpython-ffmpeg-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feswar-7116%2Fpython-ffmpeg-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feswar-7116%2Fpython-ffmpeg-docker/lists"}