Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jihuun/youtube_capture
Screen CapTure YouTube Videos
https://github.com/jihuun/youtube_capture
Last synced: 10 days ago
JSON representation
Screen CapTure YouTube Videos
- Host: GitHub
- URL: https://github.com/jihuun/youtube_capture
- Owner: jihuun
- Created: 2019-02-10T23:02:34.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T07:37:47.000Z (almost 2 years ago)
- Last Synced: 2023-02-26T03:51:30.039Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 848 MB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CapTube
A tool which can capture a Youtube video into images that you can read the video fastly.
## Usage
```
./run.py -u -n -l
```
The result files would be placed in the ./results//*
If the result path is already exist, but you want do it again. try again with --retry or -r option.
Only -u option is mandatory.
```
./run.py -u -n -l --retry
```
For more information, please see the option --help
```
./run.py -h
```
## Example
```
./run.py -u 'https://youtu.be/MMmOLN5zBLY' -n multi_lang -l ko
```
The result would be generate like below. The captured images are in the imsg/.
```
$ ls ./results/multi_lang/
imgs/ multi_lang.json multi_lang.mp4 multi_lang.srt
```
## Usage of APIs
Just call these functions.
```
from capture import capture_by_subs
from run import make_youtube_info
video_info = make_youtube_info(url, name, lang, retry, fontsize)
video_info.save_json()
capture_by_subs(video_info)
```
1. generate video information with dictionary type.
```
video_info = make_youtube_info(url, name, lang, retry, fontsize)
```
> argument
> url : the youtube url
> name : result diretory name
> lang : language code (en, ko, ru...)
> retry : True/False (default False)
> fontsize : default 30
2. save the information to json file (if you want)
```
video_info.save_json()
```
> It will save name.json
3. capture the video by subtitle time stamps
```
capture_by_subs(video_info)
```
> the results are generated in directory imgs/## Unit Test
```
./unit_test.py
```