Name | beautiful-captions JSON |
Version |
0.1.27
JSON |
| download |
home_page | None |
Summary | A fast and elegant Python library for adding beautiful captions to videos |
upload_time | 2025-02-25 10:59:24 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | MIT License
Copyright (c) 2024 AayushGupta16
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
|
keywords |
video
captions
subtitles
transcription
|
VCS |
 |
bugtrack_url |
|
requirements |
pysrt
assemblyai
deepgram-sdk
openai
python-dotenv
aiohttp
ffmpeg-python
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Beautiful Captions 🎬
A fast and elegant Python library for adding beautiful captions to videos. Combines the speed of FFmpeg with the beauty of custom styling.
## Features
- ⚡ Lightning-fast caption rendering
- 🎨 Beautiful default styling with customization options
- 💃 Engaging bounce animation for captions
- 🤖 Built-in support for AssemblyAI
- 📝 Support for SRT files
- 🛠️ Simple, intuitive API
## Installation
```bash
pip install beautiful-captions
```
## Quick Start
Beautiful Captions provides two API styles to suit your needs:
### Functional API
```python
from beautiful_captions import add_captions, transcribe, process_video
# Using an existing SRT file
add_captions("input.mp4", "subtitles.srt", style="default")
# Transcribe and caption
transcribe("video.mp4", service="assemblyai", api_key="YOUR_KEY")
add_captions("video.mp4", "generated.srt", style="default")
# All-in-one process
process_video("input.mp4",
transcribe_with="assemblyai",
api_key="YOUR_KEY",
style="default"
)
```
### Object-Oriented API
```python
from beautiful_captions import Video
# Using an existing SRT file
video = Video("input.mp4")
video.add_captions("subtitles.srt", style="default")
video.save("output.mp4")
# Transcribe and caption
video = Video("input.mp4")
video.transcribe(service="assemblyai", api_key="YOUR_KEY")
video.add_captions(style="default", animation="bounce")
video.save("output.mp4")
```
## Styling Options
Customize your captions with these options:
```python
from beautiful_captions import Style
style = Style(
font="Arial", # Font family
color="white", # Text color
outline_color="black", # Outline color
outline_width=2, # Outline thickness
position="bottom", # Vertical position
animation="bounce" # Animation type
)
add_captions("input.mp4", "subtitles.srt", style=style)
```
## Transcription Services
Beautiful Captions supports multiple transcription services out of the box:
```python
# Using AssemblyAI
video.transcribe(service="assemblyai", api_key="YOUR_ASSEMBLYAI_KEY")
```
## Performance
Beautiful Captions is optimized for speed while maintaining high-quality output. Here's how it compares to MoviePy:
| Operation | Beautiful Captions | MoviePy |
|-----------|-------------------|---------|
| Caption Rendering | [Benchmark] | [Benchmark] |
| Memory Usage | [Benchmark] | [Benchmark] |
*Benchmarks coming soon*
## Contributing
We welcome contributions of all sizes! Beautiful Captions is designed to be modular and easy to extend. Here are some ways you can contribute:
### Areas for Contribution
1. **Transcription Services**: Add support for new transcription services by implementing the transcription interface
2. **Caption Styles**: Create new preset styles that others can use
3. **Animations**: Develop new caption animation types
4. **Performance Improvements**: Help optimize the caption rendering pipeline
5. **Documentation**: Improve docs, add examples, or fix typos
6. **Bug Reports**: Submit detailed bug reports and feature requests
### Getting Started
1. Check our [Contributing Guide](CONTRIBUTING.md) for detailed instructions
2. Look for issues labeled `good-first-issue` or `help-wanted`
3. Join discussions in GitHub Discussions to share ideas
4. Read our [Code of Conduct](CODE_OF_CONDUCT.md)
See [CONTRIBUTING.md](CONTRIBUTING.md) for full details on our development process.
### Development Setup
1. Clone the repository:
```bash
git clone https://github.com/aayushgupta16/beautiful-captions.git
cd beautiful-captions
```
2. Create a virtual environment:
```bash
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
```
3. Install development dependencies:
```bash
pip install -e ".[dev]"
```
## Future Features
Vote on upcoming features in our [GitHub Discussions](https://github.com/yourusername/beautiful-captions/discussions/categories/ideas):
- Additional preset styles (TikTok-style, Hormozi-style, etc.)
- Support for VTT format
- More animation types
- Additional transcription services
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Support
- 📫 For bug reports and feature requests, use [GitHub Issues](https://github.com/aayushgupta16/beautiful-captions/issues)
- 💬 For questions and discussions, join our [GitHub Discussions](https://github.com/aayushgupta16/beautiful-captions/discussions)
- 🗳️ Vote on new features in our [Ideas section](https://github.com/aayushgupta16/beautiful-captions/discussions/categories/ideas)
Raw data
{
"_id": null,
"home_page": null,
"name": "beautiful-captions",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "video, captions, subtitles, transcription",
"author": null,
"author_email": "Aayush <aayugupta04@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/e5/44/128164e322a2a77487fc427aef803a9fd3dfaff3b758ea75587745d69140/beautiful_captions-0.1.27.tar.gz",
"platform": null,
"description": "# Beautiful Captions \ud83c\udfac\n\nA fast and elegant Python library for adding beautiful captions to videos. Combines the speed of FFmpeg with the beauty of custom styling.\n\n## Features\n\n- \u26a1 Lightning-fast caption rendering\n- \ud83c\udfa8 Beautiful default styling with customization options\n- \ud83d\udc83 Engaging bounce animation for captions\n- \ud83e\udd16 Built-in support for AssemblyAI\n- \ud83d\udcdd Support for SRT files\n- \ud83d\udee0\ufe0f Simple, intuitive API\n\n## Installation\n\n```bash\npip install beautiful-captions\n```\n\n## Quick Start\n\nBeautiful Captions provides two API styles to suit your needs:\n\n### Functional API\n\n```python\nfrom beautiful_captions import add_captions, transcribe, process_video\n\n# Using an existing SRT file\nadd_captions(\"input.mp4\", \"subtitles.srt\", style=\"default\")\n\n# Transcribe and caption\ntranscribe(\"video.mp4\", service=\"assemblyai\", api_key=\"YOUR_KEY\")\nadd_captions(\"video.mp4\", \"generated.srt\", style=\"default\")\n\n# All-in-one process\nprocess_video(\"input.mp4\", \n transcribe_with=\"assemblyai\",\n api_key=\"YOUR_KEY\",\n style=\"default\"\n)\n```\n\n### Object-Oriented API\n\n```python\nfrom beautiful_captions import Video\n\n# Using an existing SRT file\nvideo = Video(\"input.mp4\")\nvideo.add_captions(\"subtitles.srt\", style=\"default\")\nvideo.save(\"output.mp4\")\n\n# Transcribe and caption\nvideo = Video(\"input.mp4\")\nvideo.transcribe(service=\"assemblyai\", api_key=\"YOUR_KEY\")\nvideo.add_captions(style=\"default\", animation=\"bounce\")\nvideo.save(\"output.mp4\")\n```\n\n## Styling Options\n\nCustomize your captions with these options:\n\n```python\nfrom beautiful_captions import Style\n\nstyle = Style(\n font=\"Arial\", # Font family\n color=\"white\", # Text color\n outline_color=\"black\", # Outline color\n outline_width=2, # Outline thickness\n position=\"bottom\", # Vertical position\n animation=\"bounce\" # Animation type\n)\n\nadd_captions(\"input.mp4\", \"subtitles.srt\", style=style)\n```\n\n## Transcription Services\n\nBeautiful Captions supports multiple transcription services out of the box:\n\n```python\n# Using AssemblyAI\nvideo.transcribe(service=\"assemblyai\", api_key=\"YOUR_ASSEMBLYAI_KEY\")\n```\n\n## Performance\n\nBeautiful Captions is optimized for speed while maintaining high-quality output. Here's how it compares to MoviePy:\n\n| Operation | Beautiful Captions | MoviePy |\n|-----------|-------------------|---------|\n| Caption Rendering | [Benchmark] | [Benchmark] |\n| Memory Usage | [Benchmark] | [Benchmark] |\n\n*Benchmarks coming soon*\n\n## Contributing\n\nWe welcome contributions of all sizes! Beautiful Captions is designed to be modular and easy to extend. Here are some ways you can contribute:\n\n### Areas for Contribution\n\n1. **Transcription Services**: Add support for new transcription services by implementing the transcription interface\n2. **Caption Styles**: Create new preset styles that others can use\n3. **Animations**: Develop new caption animation types\n4. **Performance Improvements**: Help optimize the caption rendering pipeline\n5. **Documentation**: Improve docs, add examples, or fix typos\n6. **Bug Reports**: Submit detailed bug reports and feature requests\n\n### Getting Started\n\n1. Check our [Contributing Guide](CONTRIBUTING.md) for detailed instructions\n2. Look for issues labeled `good-first-issue` or `help-wanted`\n3. Join discussions in GitHub Discussions to share ideas\n4. Read our [Code of Conduct](CODE_OF_CONDUCT.md)\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for full details on our development process.\n\n### Development Setup\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/aayushgupta16/beautiful-captions.git\ncd beautiful-captions\n```\n\n2. Create a virtual environment:\n```bash\npython -m venv venv\nsource venv/bin/activate # On Windows: venv\\Scripts\\activate\n```\n\n3. Install development dependencies:\n```bash\npip install -e \".[dev]\"\n```\n\n## Future Features\n\nVote on upcoming features in our [GitHub Discussions](https://github.com/yourusername/beautiful-captions/discussions/categories/ideas):\n\n- Additional preset styles (TikTok-style, Hormozi-style, etc.)\n- Support for VTT format\n- More animation types\n- Additional transcription services\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Support\n\n- \ud83d\udceb For bug reports and feature requests, use [GitHub Issues](https://github.com/aayushgupta16/beautiful-captions/issues)\n- \ud83d\udcac For questions and discussions, join our [GitHub Discussions](https://github.com/aayushgupta16/beautiful-captions/discussions)\n- \ud83d\uddf3\ufe0f Vote on new features in our [Ideas section](https://github.com/aayushgupta16/beautiful-captions/discussions/categories/ideas)\n",
"bugtrack_url": null,
"license": "MIT License\n \n Copyright (c) 2024 AayushGupta16\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n ",
"summary": "A fast and elegant Python library for adding beautiful captions to videos",
"version": "0.1.27",
"project_urls": {
"Bug Tracker": "https://github.com/aayushgupta16/beautiful-captions/issues",
"Documentation": "https://beautiful-captions.readthedocs.io/",
"Homepage": "https://github.com/aayushgupta16/beautiful-captions",
"Repository": "https://github.com/aayushgupta16/beautiful-captions.git"
},
"split_keywords": [
"video",
" captions",
" subtitles",
" transcription"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "c95129eb78739a5782f82ad06efac923e214f9bc530fb826e28cda85e707202e",
"md5": "3e69bbaeacd207b0ab5cb148b22be9d2",
"sha256": "85dd4d3cd58f634023a32ac539ed172f9eaa2d3c72c6177285800ddfee8b7de2"
},
"downloads": -1,
"filename": "beautiful_captions-0.1.27-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3e69bbaeacd207b0ab5cb148b22be9d2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 594563,
"upload_time": "2025-02-25T10:59:20",
"upload_time_iso_8601": "2025-02-25T10:59:20.418904Z",
"url": "https://files.pythonhosted.org/packages/c9/51/29eb78739a5782f82ad06efac923e214f9bc530fb826e28cda85e707202e/beautiful_captions-0.1.27-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "e544128164e322a2a77487fc427aef803a9fd3dfaff3b758ea75587745d69140",
"md5": "b1e1a14be7b45c69c0e90ae3f93bee4c",
"sha256": "f88d1aa0aa2d9f319e819352d3efcd625ddf95cf8f35f80a4742d58ad9558233"
},
"downloads": -1,
"filename": "beautiful_captions-0.1.27.tar.gz",
"has_sig": false,
"md5_digest": "b1e1a14be7b45c69c0e90ae3f93bee4c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 569592,
"upload_time": "2025-02-25T10:59:24",
"upload_time_iso_8601": "2025-02-25T10:59:24.549620Z",
"url": "https://files.pythonhosted.org/packages/e5/44/128164e322a2a77487fc427aef803a9fd3dfaff3b758ea75587745d69140/beautiful_captions-0.1.27.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-25 10:59:24",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "aayushgupta16",
"github_project": "beautiful-captions",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "pysrt",
"specs": [
[
"==",
"1.1.2"
]
]
},
{
"name": "assemblyai",
"specs": [
[
"==",
"0.37.0"
]
]
},
{
"name": "deepgram-sdk",
"specs": [
[
"==",
"3.10.0"
]
]
},
{
"name": "openai",
"specs": [
[
">=",
"1.64.0"
]
]
},
{
"name": "python-dotenv",
"specs": [
[
">=",
"0.19.0"
]
]
},
{
"name": "aiohttp",
"specs": [
[
"==",
"3.11.13"
]
]
},
{
"name": "ffmpeg-python",
"specs": [
[
">=",
"0.2.0"
]
]
}
],
"lcname": "beautiful-captions"
}