Name | stenocaptioner JSON |
Version |
0.3.2
JSON |
| download |
home_page | |
Summary | |
upload_time | 2023-12-23 06:40:15 |
maintainer | |
docs_url | None |
author | nekanat |
requires_python | >=3.9,<4.0 |
license | MIT |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# stenocaptioner

[](https://pepy.tech/project/stenocaptioner)
Automatic subtitling tool using whisper.
## Dependencies
* [whisper](https://github.com/openai/whisper)
* [moviepy](https://github.com/Zulko/moviepy)
* [youtube_dl](https://github.com/ytdl-org/youtube-dl)
## Installation
### Ubuntu
```sh
sudo apt-get -y install imagemagick fonts-vlgothic
```
You will also need to modify the ImageMagick configuration file to comment out the following policy.
```
sudo vi /etc/ImageMagick-6/policy.xml
<!--
<policy domain="path" pattern="@*" rights="none">
-->
```
Install with pip.
```sh
pip install stenocaptioner
```
## Usage
You can give the url of youtube video as an argument.
```sh
stenocaptioner https://www.youtube.com/watch?v=ldybnuFxdiQ --language ja
```
### Options
```sh
stenocaptioner --help
usage: stenocaptioner [-h] [--language LANGUAGE] [--model-type {tiny,base,small,medium,large}] [--text-color TEXT_COLOR] [--background-color BACKGROUND_COLOR]
[--contour-color CONTOUR_COLOR] [--contour-width CONTOUR_WIDTH] [--font FONT] [--fontsize FONTSIZE] [--fadein-duration FADEIN_DURATION]
[--fadeout-duration FADEOUT_DURATION] [--save-text] [--load-text LOAD_TEXT] [--letter-effect {none,typing,arrive,cascade}] [--side-margin SIDE_MARGIN]
[--bottom-margin BOTTOM_MARGIN]
url
positional arguments:
url URL of the video.
options:
-h, --help show this help message and exit
--language LANGUAGE Language of the text.
--model-type {tiny,base,small,medium,large}
Whisper model type.
--text-color TEXT_COLOR
Color of the text.
--background-color BACKGROUND_COLOR
Color of the background.
--contour-color CONTOUR_COLOR
Color of the contour.
--contour-width CONTOUR_WIDTH
Width of the contour.
--font FONT Font name.
--fontsize FONTSIZE Font size.
--fadein-duration FADEIN_DURATION
Duration of the fade-in effect.
--fadeout-duration FADEOUT_DURATION
Duration of the fade-out effect.
--save-text Save the transcribed text.
--load-text LOAD_TEXT
Load the transcribed text.
--letter-effect {none,typing,arrive,cascade}
Effect of the letters.
--side-margin SIDE_MARGIN
Margin of the text from the side of the video. It is expressed as a ratio of the width of the image.
--bottom-margin BOTTOM_MARGIN
Margin of the text from the bottom of the video. It is expressed as a ratio of the height of the image.
```
### Original video

### Basic Result

### Background color
```sh
stenocaptioner https://www.youtube.com/watch?v=ldybnuFxdiQ --language ja --background-color blue
```

### Contour
```sh
stenocaptioner https://www.youtube.com/watch?v=ldybnuFxdiQ --language ja --contour-color black
```

### Font
Download https://fontfree.me/3132.
```sh
stenocaptioner https://www.youtube.com/watch?v=ldybnuFxdiQ --language ja --font ./gomarice_mukasi_mukasi.ttf
```

### Effect (typing)
```sh
stenocaptioner https://www.youtube.com/watch?v=ldybnuFxdiQ --language ja --letter-effect typing
```

### Effect (arrive)
```sh
stenocaptioner https://www.youtube.com/watch?v=ldybnuFxdiQ --language ja --letter-effect arrive
```

### Effect (cascade)
```sh
stenocaptioner https://www.youtube.com/watch?v=ldybnuFxdiQ --language ja --letter-effect cascade
```

Raw data
{
"_id": null,
"home_page": "",
"name": "stenocaptioner",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9,<4.0",
"maintainer_email": "",
"keywords": "",
"author": "nekanat",
"author_email": "nekanat.stock@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/7f/12/403b04c1ec32d182c9ff13b25a6370f0e4328b8686eea4b5355317e7db1d/stenocaptioner-0.3.2.tar.gz",
"platform": null,
"description": "# stenocaptioner\n\n\n[](https://pepy.tech/project/stenocaptioner)\n\nAutomatic subtitling tool using whisper.\n\n## Dependencies\n\n* [whisper](https://github.com/openai/whisper)\n* [moviepy](https://github.com/Zulko/moviepy)\n* [youtube_dl](https://github.com/ytdl-org/youtube-dl)\n\n## Installation\n\n### Ubuntu\n\n```sh\nsudo apt-get -y install imagemagick fonts-vlgothic\n```\n\nYou will also need to modify the ImageMagick configuration file to comment out the following policy.\n\n```\nsudo vi /etc/ImageMagick-6/policy.xml\n <!--\n <policy domain=\"path\" pattern=\"@*\" rights=\"none\">\n -->\n```\n\nInstall with pip.\n\n```sh\npip install stenocaptioner\n```\n\n## Usage\n\nYou can give the url of youtube video as an argument.\n\n```sh\nstenocaptioner https://www.youtube.com/watch?v=ldybnuFxdiQ --language ja\n```\n\n### Options\n\n```sh\nstenocaptioner --help\nusage: stenocaptioner [-h] [--language LANGUAGE] [--model-type {tiny,base,small,medium,large}] [--text-color TEXT_COLOR] [--background-color BACKGROUND_COLOR]\n [--contour-color CONTOUR_COLOR] [--contour-width CONTOUR_WIDTH] [--font FONT] [--fontsize FONTSIZE] [--fadein-duration FADEIN_DURATION]\n [--fadeout-duration FADEOUT_DURATION] [--save-text] [--load-text LOAD_TEXT] [--letter-effect {none,typing,arrive,cascade}] [--side-margin SIDE_MARGIN]\n [--bottom-margin BOTTOM_MARGIN]\n url\n\npositional arguments:\n url URL of the video.\n\noptions:\n -h, --help show this help message and exit\n --language LANGUAGE Language of the text.\n --model-type {tiny,base,small,medium,large}\n Whisper model type.\n --text-color TEXT_COLOR\n Color of the text.\n --background-color BACKGROUND_COLOR\n Color of the background.\n --contour-color CONTOUR_COLOR\n Color of the contour.\n --contour-width CONTOUR_WIDTH\n Width of the contour.\n --font FONT Font name.\n --fontsize FONTSIZE Font size.\n --fadein-duration FADEIN_DURATION\n Duration of the fade-in effect.\n --fadeout-duration FADEOUT_DURATION\n Duration of the fade-out effect.\n --save-text Save the transcribed text.\n --load-text LOAD_TEXT\n Load the transcribed text.\n --letter-effect {none,typing,arrive,cascade}\n Effect of the letters.\n --side-margin SIDE_MARGIN\n Margin of the text from the side of the video. It is expressed as a ratio of the width of the image.\n --bottom-margin BOTTOM_MARGIN\n Margin of the text from the bottom of the video. It is expressed as a ratio of the height of the image.\n\n```\n\n### Original video\n\n\n\n### Basic Result\n\n\n\n### Background color\n\n```sh\nstenocaptioner https://www.youtube.com/watch?v=ldybnuFxdiQ --language ja --background-color blue\n```\n\n\n\n### Contour\n\n```sh\nstenocaptioner https://www.youtube.com/watch?v=ldybnuFxdiQ --language ja --contour-color black\n```\n\n\n\n### Font\n\nDownload https://fontfree.me/3132.\n\n```sh\nstenocaptioner https://www.youtube.com/watch?v=ldybnuFxdiQ --language ja --font ./gomarice_mukasi_mukasi.ttf\n```\n\n\n\n### Effect (typing)\n\n```sh\nstenocaptioner https://www.youtube.com/watch?v=ldybnuFxdiQ --language ja --letter-effect typing\n```\n\n\n\n### Effect (arrive)\n\n```sh\nstenocaptioner https://www.youtube.com/watch?v=ldybnuFxdiQ --language ja --letter-effect arrive\n```\n\n\n\n### Effect (cascade)\n\n```sh\nstenocaptioner https://www.youtube.com/watch?v=ldybnuFxdiQ --language ja --letter-effect cascade\n```\n\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "",
"version": "0.3.2",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "7f12403b04c1ec32d182c9ff13b25a6370f0e4328b8686eea4b5355317e7db1d",
"md5": "415423ffc172bd8f4d4fc195d34bef67",
"sha256": "c8de7477211616531f924a4d41e7e08b65611fc50515cf76e5f85cda62dcc845"
},
"downloads": -1,
"filename": "stenocaptioner-0.3.2.tar.gz",
"has_sig": false,
"md5_digest": "415423ffc172bd8f4d4fc195d34bef67",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9,<4.0",
"size": 6237,
"upload_time": "2023-12-23T06:40:15",
"upload_time_iso_8601": "2023-12-23T06:40:15.540687Z",
"url": "https://files.pythonhosted.org/packages/7f/12/403b04c1ec32d182c9ff13b25a6370f0e4328b8686eea4b5355317e7db1d/stenocaptioner-0.3.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-12-23 06:40:15",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "stenocaptioner"
}