Skip to content

Commit 24fad59

Browse files
committed
docs: update files
1 parent 0eb031b commit 24fad59

File tree

8 files changed

+88
-69
lines changed

8 files changed

+88
-69
lines changed
File renamed without changes.
File renamed without changes.

docs/tutorial/beginner.en.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
comments: true
3+
hide:
4+
- toc
35
---
46

57
### Introduction

docs/tutorial/beginner.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
comments: true
3+
hide:
4+
- toc
35
---
46

57
### 引言

docs/tutorial/intermediate.en.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,48 @@
11
---
22
comments: true
3+
hide:
4+
- toc
35
---
46

57

68
## Introduction
79

8-
- This article is aimed towards helping beginner Python programmers to quickly start using the RapidVideOCR subtitle extraction tool
9-
- Supported operating systems: `Windows | Mac | Linux`
10+
This article is aimed towards helping beginner Python programmers to quickly start using the RapidVideOCR subtitle extraction tool
11+
12+
Supported operating systems: `Windows | Mac | Linux`
1013

1114
## Environment Configuration
1215

1316
### 1. Install VideoSubFinder (used for extracting subtitle keyframes)
1417

15-
- [[RapidVideOCR extras] VideoSubFinder subtitle keyframe extraction tutorial](https://blog.csdn.net/shiwanghualuo/article/details/129174857?spm=1001.2014.3001.5501)
18+
[[RapidVideOCR extras] VideoSubFinder subtitle keyframe extraction tutorial](https://blog.csdn.net/shiwanghualuo/article/details/129174857?spm=1001.2014.3001.5501)
1619

1720
### 2. Install python(used for running RapidVideOCR)
1821

19-
{{< alert context="info" text="Disclaimer: Some of the following images are from [终极保姆教's tutorial on installing Python_3.10.7](https://www.cnblogs.com/zyc-666/p/16689739.html)" />}}
22+
!!! tip
23+
24+
Disclaimer: Some of the following images are from [终极保姆教's tutorial on installing Python_3.10.7](https://www.cnblogs.com/zyc-666/p/16689739.html)
2025

2126
#### 1. Download the Python installer
2227

23-
Open the official Python website → <https://www.python.org>, and select the installer for your own operating system (VideoSubFinder is currently only available for Windows)>
28+
Open the official Python website → <https://www.python.org>, and select the installer for your own operating system (VideoSubFinder is currently only available for Windows)
29+
2430
<div align="center">
2531
<img src="https://github.com/SWHL/RapidVideOCR/releases/download/v2.0.1/1.png">
2632
</div>
2733

2834
#### 2. Find the version you want
2935

3036
Take Python 3.10.7 for example, if the download speed is too slow you can join the RapidVideOCR QQ group: (706807542) to download the files.
37+
3138
<div align="center">
3239
<img src="https://github.com/SWHL/RapidVideOCR/releases/download/v2.0.1/2.png">
3340
</div>
3441

3542
#### 3. After the download is complete, double-click to open the exe and start the installation
3643

3744
Click Customize installation and select the installation location. Also, remember to check the last item `Add Python 3.10 to PATH`
45+
3846
<div align="center">
3947
<img src="https://github.com/SWHL/RapidVideOCR/releases/download/v2.0.1/3.png" width=80%>
4048
</div>
@@ -71,17 +79,17 @@ Click Customize installation and select the installation location. Also, remembe
7179

7280
#### 9. Add the `Scripts` directory to the environment variables
7381

74-
- Press `Win + q` enter `Edit the system`→ Click **Edit the system environment variables**
82+
1. Press `Win + q` enter `Edit the system`→ Click **Edit the system environment variables**
7583
<div align="center">
7684
<img src="https://github.com/SWHL/RapidVideOCR/releases/download/v2.0.1/9.png" width=80%>
7785
</div>
7886

79-
- Click **Environment Variables****User variables****Path****Edit**
87+
2. Click **Environment Variables****User variables****Path****Edit**
8088
<div align="center">
8189
<img src="https://github.com/SWHL/RapidVideOCR/releases/download/v2.0.1/10.png">
8290
</div>
8391

84-
- Create a new entry for the Script directory under the Python installation directory, as shown in the image below, and remember to click save.
92+
3. Create a new entry for the Script directory under the Python installation directory, as shown in the image below, and remember to click save.
8593

8694
<div align="center">
8795
<img src="https://github.com/SWHL/RapidVideOCR/releases/download/v2.0.1/11.png">

docs/tutorial/intermediate.md

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
comments: true
3+
hide:
4+
- toc
35
---
46

57

@@ -12,29 +14,34 @@ comments: true
1214

1315
### 1. 安装VideoSubFinder软件(用于提取字幕关键帧)
1416

15-
- [[RapidVideOCR周边] VideoSubFinder提取字幕关键帧教程](https://blog.csdn.net/shiwanghualuo/article/details/129174857?spm=1001.2014.3001.5501)
17+
[[RapidVideOCR周边] VideoSubFinder提取字幕关键帧教程](https://blog.csdn.net/shiwanghualuo/article/details/129174857?spm=1001.2014.3001.5501)
1618

1719
### 2. 安装python软件(用于运行RapidVideOCR)
1820

19-
{{< alert context="info" text="声明:以下部分图像来自[终极保姆教程之安装python的教程_3.10.7版本](https://www.cnblogs.com/zyc-666/p/16689739.html)" />}}
21+
!!! tip
22+
23+
声明:以下部分图像来自[终极保姆教程之安装python的教程_3.10.7版本](https://www.cnblogs.com/zyc-666/p/16689739.html)
2024

2125
#### 1. 下载python安装包
2226

23-
打开python官网 → <https://www.python.org>,选择自己系统进入下载界面(VideoSubFinder工具目前只有Windows的)>
27+
打开python官网 → <https://www.python.org>,选择自己系统进入下载界面(VideoSubFinder工具目前只有Windows的)
28+
2429
<div align="center">
2530
<img src="https://github.com/SWHL/RapidVideOCR/releases/download/v2.0.1/1.png">
2631
</div>
2732

2833
#### 2. 找到自己想要的版本
2934

3035
以python 3.10.7 为例。如果网速下载较慢的话,可以加入RapidVideOCR QQ群(706807542),群文件获取。
36+
3137
<div align="center">
3238
<img src="https://github.com/SWHL/RapidVideOCR/releases/download/v2.0.1/2.png">
3339
</div>
3440

3541
#### 3. 下载完成之后,双击打开这个exe,即可开始准备安装
3642

3743
点击自定义安装,选择安装位置。同时,记得勾选最后一项`Add Python 3.10 to PATH`
44+
3845
<div align="center">
3946
<img src="https://github.com/SWHL/RapidVideOCR/releases/download/v2.0.1/3.png" width=80%>
4047
</div>
@@ -71,21 +78,21 @@ comments: true
7178

7279
#### 9. 添加`Scripts`目录到环境变量中
7380

74-
- `Win + q` 输入“编辑” → 点击**编辑系统环境变量**
81+
1. `Win + q` 输入“编辑” → 点击 **编辑系统环境变量**
7582
<div align="center">
7683
<img src="https://github.com/SWHL/RapidVideOCR/releases/download/v2.0.1/9.png" width=80%>
7784
</div>
7885

79-
- 打开**环境变量****用户变量****Path****编辑**
86+
2. 打开 **环境变量****用户变量****Path****编辑**
8087
<div align="center">
8188
<img src="https://github.com/SWHL/RapidVideOCR/releases/download/v2.0.1/10.png">
8289
</div>
8390

84-
- 新建Python安装目录下的Script目录路径,如下图所示,记得点击保存哈。
91+
3. 新建Python安装目录下的Script目录路径,如下图所示,记得点击保存哈。
8592

86-
<div align="center">
87-
<img src="https://github.com/SWHL/RapidVideOCR/releases/download/v2.0.1/11.png">
88-
</div>
93+
<div align="center">
94+
<img src="https://github.com/SWHL/RapidVideOCR/releases/download/v2.0.1/11.png">
95+
</div>
8996

9097
### 3. 安装RapidVideOCR工具
9198

@@ -127,7 +134,7 @@ rapid_videocr -i RGBImages -s result -m concat
127134

128135
#### 5. 脚本使用
129136

130-
1. 在桌面上新建TXT文件,命名为`rapid_videocr.py`,注意后缀名改为`*.py`
137+
1. 在桌面上新建TXT文件,命名为`rapid_videocr.py`,注意后缀名改为`.py`
131138
2. 用记事本打开,将以下代码拷贝到`rapid_videocr.py`里面
132139

133140
```python linenums="1"

docs/tutorial/senior.en.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
comments: true
3+
hide:
4+
- toc
35
---
46

57
### 1. Install and use VideoSubFinder

docs/tutorial/senior.md

Lines changed: 49 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
---
22
comments: true
3+
hide:
4+
- toc
35
---
46

57
### 1. 安装使用VideoSubFinder软件
68

7-
- 下载地址:Windows & Linux ([videosubfinder官网](https://sourceforge.net/projects/videosubfinder/) / QQ群(706807542)共享文件) | [Mac版](https://github.com/eritpchy/videosubfinder-cli)
8-
- 使用教程:[VideoSubFinder提取字幕关键帧教程](https://juejin.cn/post/7203362527082053691)
9-
- 最终生成的`RGBImages``TXTImages`目录一般会在软件安装目录下
10-
- ✧ 推荐用`RGBImages`目录中图像(感谢小伙伴[dyphire](https://github.com/dyphire)[#21](https://github.com/SWHL/RapidVideOCR/issues/21)的反馈)
9+
下载地址:Windows & Linux ([videosubfinder官网](https://sourceforge.net/projects/videosubfinder/) / QQ群(706807542)共享文件) | [Mac版](https://github.com/eritpchy/videosubfinder-cli)
10+
11+
使用教程:[VideoSubFinder提取字幕关键帧教程](https://juejin.cn/post/7203362527082053691)
12+
13+
最终生成的`RGBImages``TXTImages`目录一般会在软件安装目录下
14+
15+
✧ 推荐用`RGBImages`目录中图像(感谢小伙伴[dyphire](https://github.com/dyphire)[#21](https://github.com/SWHL/RapidVideOCR/issues/21)的反馈)
1116

1217
### 2. 安装rapid_videocr
1318

@@ -17,68 +22,59 @@ pip install rapid_videocr
1722

1823
### 3. Python使用
1924

20-
{{< tabs tabTotal="2">}}
21-
{{% tab tabName="Only OCR" %}}
25+
=== "Only OCR"
2226

23-
```python linenums="1"
24-
from rapid_videocr import RapidVideOCR
27+
```python linenums="1"
28+
from rapid_videocr import RapidVideOCR
2529

26-
# RapidVideOCRInput有两个初始化参数
27-
# is_concat_rec: 是否用单张图识别,默认是False,也就是默认用单图识别
28-
# concat_batch: 叠图识别的图像张数,默认10,可自行调节
29-
# out_format: 输出格式选择,[srt, ass, txt, all], 默认是 all
30-
# is_print_console: 是否打印结果,[0, 1], 默认是0,不打印
31-
input_args = RapidVideOCRInput(
32-
is_batch_rec=False, ocr_params={"Global.with_paddle": True}
33-
)
34-
extractor = RapidVideOCR(input_args)
30+
# RapidVideOCRInput有两个初始化参数
31+
# is_concat_rec: 是否用单张图识别,默认是False,也就是默认用单图识别
32+
# concat_batch: 叠图识别的图像张数,默认10,可自行调节
33+
# out_format: 输出格式选择,[srt, ass, txt, all], 默认是 all
34+
# is_print_console: 是否打印结果,[0, 1], 默认是0,不打印
35+
input_args = RapidVideOCRInput(
36+
is_batch_rec=False, ocr_params={"Global.with_paddle": True}
37+
)
38+
extractor = RapidVideOCR(input_args)
3539

36-
rgb_dir = "tests/test_files/RGBImages"
37-
save_dir = "outputs"
38-
save_name = "a"
40+
rgb_dir = "tests/test_files/RGBImages"
41+
save_dir = "outputs"
42+
save_name = "a"
3943

40-
# outputs/a.srt outputs/a.ass outputs/a.t
41-
extractor(rgb_dir, save_dir, save_name=save_name)
42-
```
44+
# outputs/a.srt outputs/a.ass outputs/a.t
45+
extractor(rgb_dir, save_dir, save_name=save_name)
46+
```
4347

44-
{{% /tab %}}
45-
{{% tab tabName="Extract + OCR" %}}
48+
=== "Extract + OCR"
4649

47-
```python linenums="1"
48-
from rapid_videocr import RapidVideoSubFinderOCR
50+
```python linenums="1"
51+
from rapid_videocr import RapidVideoSubFinderOCR
4952

50-
vsf_exe = r"G:\ProgramFiles\VideoSubFinder_6.10_x64\Release_x64\VideoSubFinderWXW.exe"
51-
extractor = RapidVideoSubFinderOCR(vsf_exe_path=vsf_exe, is_concat_rec=True)
53+
vsf_exe = r"G:\ProgramFiles\VideoSubFinder_6.10_x64\Release_x64\VideoSubFinderWXW.exe"
54+
extractor = RapidVideoSubFinderOCR(vsf_exe_path=vsf_exe, is_concat_rec=True)
5255

53-
# video_path can be directory path or video full path.
54-
video_path = 'test_files/tiny/2.mp4'
55-
save_dir = 'outputs'
56-
extractor(video_path, save_dir)
57-
```
58-
59-
{{% /tab %}}
60-
{{< /tabs >}}
56+
# video_path can be directory path or video full path.
57+
video_path = 'test_files/tiny/2.mp4'
58+
save_dir = 'outputs'
59+
extractor(video_path, save_dir)
60+
```
6161

6262
### 4. 命令行使用
6363

64-
{{< tabs tabTotal="2">}}
65-
{{% tab tabName="Only OCR" %}}
64+
=== "Only OCR"
6665

67-
```bash linenums="1"
68-
rapid_videocr -i RGBImages
69-
```
70-
71-
{{% /tab %}}
72-
{{% tab tabName="Extract + OCR" %}}
66+
```bash linenums="1"
67+
rapid_videocr -i RGBImages
68+
```
7369

74-
```bash linenums="1"
75-
rapid_videocr -vsf G:\ProgramFiles\VideoSubFinder_6.10_x64\Release_x64\VideoSubFinderWXW.exe -video_dir G:\ProgramFiles\RapidVideOCR\test_files\tiny
76-
```
70+
=== "Extract + OCR"
7771

78-
{{% /tab %}}
79-
{{< /tabs >}}
72+
```bash linenums="1"
73+
rapid_videocr -vsf G:\ProgramFiles\VideoSubFinder_6.10_x64\Release_x64\VideoSubFinderWXW.exe -video_dir G:\ProgramFiles\RapidVideOCR\test_files\tiny
74+
```
8075

8176
详细参数:
77+
8278
<details>
8379

8480
```bash linenums="1"
@@ -170,4 +166,6 @@ VSFParameters:
170166

171167
前往`save_dir`目录下即可查看结果。
172168

173-
{{< alert context="info" text="如果想要让视频播放软件自动挂载srt文件或ass文件,需要更改srt或ass文件名字为视频文件名字,且放到同一目录下,亦或者手动指定加载。" />}}
169+
!!! info
170+
171+
"如果想要让视频播放软件自动挂载srt文件或ass文件,需要更改srt或ass文件名字为视频文件名字,且放到同一目录下,亦或者手动指定加载。

0 commit comments

Comments
 (0)