Skip to content

Commit 51c5cc8

Browse files
committed
Add blog for OCR.
1 parent a493212 commit 51c5cc8

12 files changed

+189
-1
lines changed
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
---
2+
slug: ocr-video-streams
3+
title: Oryx - Leveraging OpenAI for OCR and Object Recognition in Video Streams
4+
authors: []
5+
tags: [ocr, ai, gpt, srs, oryx]
6+
custom_edit_url: null
7+
---
8+
9+
# Leveraging OpenAI for OCR and Object Recognition in Video Streams using Oryx
10+
11+
## Introduction
12+
13+
In today's digital world, videos are everywhere. From social media clips to live broadcasts, we consume a
14+
vast amount of video content daily. But have you ever wondered how we can make sense of all the information
15+
in these videos? This is where AI comes in. With the help of artificial intelligence, we can now recognize
16+
text, identify objects, and even describe scenes in video streams.
17+
18+
<!--truncate-->
19+
20+
One powerful tool that makes this process easy is Oryx. In this blog, we'll explore how Oryx can help you
21+
perform OCR (Optical Character Recognition) on video streams, allowing you to extract valuable information
22+
in real-time.
23+
24+
## Step 1: Create Oryx by One Click
25+
26+
Creating an Oryx is simple and can be done with just one click if you use Digital Ocean droplet.
27+
Please see [How to Setup a Video Streaming Service by 1-Click](./2022-04-09-Oryx-Tutorial.md) for detail.
28+
29+
You can also use Docker to create an Oryx with a single command line:
30+
31+
```bash
32+
docker run --restart always -d -it --name oryx -v $HOME/data:/data \
33+
-p 80:2022 -p 443:2443 -p 1935:1935 -p 8000:8000/udp -p 10080:10080/udp \
34+
ossrs/oryx:5
35+
```
36+
37+
After creating the Oryx, you can access it through `http://your-server-ip/mgmt` via a browser.
38+
39+
## Step 2: Publish a Live Stream to Oryx
40+
41+
You can use OBS or FFmpeg to publish a live stream to Oryx. You can also set up HTTPS and publish via WebRTC.
42+
43+
![](/img/blog-2024-05-20-01.png)
44+
45+
Once the stream is published, you can preview it using an H5 player or VLC.
46+
Please see [How to Setup a Video Streaming Service by 1-Click](./2022-04-09-Oryx-Tutorial.md) for detail.
47+
48+
## Step 3: Setup OpenAI Secret Key for OCR
49+
50+
To use OCR, you must obtain a secret key from OpenAI. Please open the [API keys](https://platform.openai.com/api-keys)
51+
page in your browser and click the `Create new secret key` button. Once the key is created, copy it and set it in Oryx.
52+
Then, click the `Test OpenAI Service` button, as shown in the picture below.
53+
54+
![](/img/blog-2024-05-20-02.png)
55+
56+
If the test is successful, you can click the `Start OCR` button to start the OCR process.
57+
58+
## Step 4: Setup AI Instructions for OCR
59+
60+
Once you've configured your GPT AI assistant, you can update the bellow prompt at the setting webpage
61+
`Service Settings > AI Instructions > Instructions`.
62+
63+
![](/img/blog-2024-05-20-03.png)
64+
65+
To recognize text in video streams, you can use the following instructions:
66+
67+
```text
68+
Recognize the text in the image. Output the identified text directly.
69+
```
70+
71+
## Step 5: View OCR Results by Callback
72+
73+
Once the OCR process is complete, you can view the results by setting up a callback URL in Oryx.
74+
75+
![](/img/blog-2024-05-20-04.png)
76+
77+
You can also view the last OCR result in the dashboard.
78+
79+
![](/img/blog-2024-05-20-05.png)
80+
81+
## Cloud Service
82+
83+
At SRS, our goal is to establish a non-profit, open-source community dedicated to creating an all-in-one,
84+
out-of-the-box, open-source video solution for live streaming and WebRTC online services.
85+
86+
Additionally, we offer a [Cloud](../cloud) service for those who prefer to use cloud service instead of building from
87+
scratch. Our cloud service features global network acceleration, enhanced congestion control algorithms,
88+
client SDKs for all platforms, and some free quota.
89+
90+
To learn more about our cloud service, click [here](../cloud).
91+
92+
## Conclusion
93+
94+
In conclusion, using AI to recognize text and objects in video streams is a game-changer. It helps us quickly
95+
and accurately extract valuable information from videos. Tools like Oryx make this process simple and efficient,
96+
allowing you to publish live streams and get real-time OCR results with ease. Whether you're looking to identify
97+
people, read text, or describe scenes, AI-powered OCR can transform how you interact with video content. By
98+
leveraging these technologies, you can unlock new possibilities and insights from the videos you encounter
99+
every day.
100+
101+
## Contact
102+
103+
Welcome for more discussion at [discord](https://discord.gg/bQUPDRqy79).
104+
105+
![](https://ossrs.io/gif/v1/sls.gif?site=ossrs.io&path=/lts/blog-en/24-05-20-OCR-Video-Streams)

i18n/zh-cn/docusaurus-plugin-content-blog/2024-02-21-Dubbing-Translating.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
slug: dubbing-translating
3-
title: Oryx - 视频多语言翻译和配音
3+
title: Oryx - 基于AI的视频多语言翻译和配音
44
authors: []
55
tags: [dubbing, translating, ai, gpt, voice, srs, oryx, multilingual]
66
custom_edit_url: null
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
---
2+
slug: ocr-video-streams
3+
title: Oryx - 基于AI的视频流的OCR和对象识别
4+
authors: []
5+
tags: [ocr, ai, gpt, srs, oryx]
6+
custom_edit_url: null
7+
---
8+
9+
# Leveraging OpenAI for OCR and Object Recognition in Video Streams using Oryx
10+
11+
## Introduction
12+
13+
在当今的数字世界中,视频无处不在。从社交媒体片段到直播,我们每天都在大量消费视频内容。但你是否想过我们如何理解这些视频中的所有信息?
14+
这就是人工智能的作用。有了人工智能的帮助,我们现在可以识别文字、识别物体,甚至描述视频流中的场景。
15+
16+
<!--truncate-->
17+
18+
一个强大的工具使这个过程变得简单,那就是Oryx。在这篇博客中,我们将探讨Oryx如何帮助你在视频流上执行OCR(光学字符识别),
19+
让你能够实时提取有价值的信息。
20+
21+
## Step 1: Create Oryx by One Click
22+
23+
创建 Oryx 很简单,只需点击一下,如果您使用 Digital Ocean droplet,就可以完成。
24+
请参阅[如何通过 1-Click 设置视频流服务](./2022-04-09-Oryx-Tutorial.md)了解详细信息。
25+
26+
您还可以使用 Docker 通过单个命令行创建 Oryx:
27+
28+
```bash
29+
docker run --restart always -d -it --name oryx -v $HOME/data:/data \
30+
-p 80:2022 -p 443:2443 -p 1935:1935 -p 8000:8000/udp -p 10080:10080/udp \
31+
registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:5
32+
```
33+
34+
创建 Oryx 后,您可以通过 `http://your-server-ip/mgmt` 访问它。
35+
36+
## Step 2: Publish a Live Stream to Oryx
37+
38+
您可以使用 OBS 或 FFmpeg 将直播流发布到 Oryx。您还可以设置 HTTPS 并通过 WebRTC 发布。
39+
40+
![](/img/blog-2024-05-20-11.png)
41+
42+
发布流后,您可以使用 H5 播放器或 VLC 预览它。
43+
请参阅[如何通过 1-Click 设置视频流服务](./2022-04-09-Oryx-Tutorial.md)了解详细信息。
44+
45+
## Step 3: Setup OpenAI Secret Key for OCR
46+
47+
要使用 Whisper ASR,您必须从 OpenAI 获取一个密钥。请在您的浏览器中打开 [API 密钥](https://platform.openai.com/api-keys)
48+
页面,然后点击 `创建新的密钥` 按钮。密钥创建后,复制它并在 Oryx 中设置。然后,如下图所示,点击 `测试OpenAI服务可用性`
49+
按钮。
50+
51+
![](/img/blog-2024-05-20-12.png)
52+
53+
如果测试成功,你可以点击 `开始OCR` 按钮来启动OCR过程。
54+
55+
## Step 4: Setup AI Instructions for OCR
56+
57+
配置好你的GPT AI助手后,你可以在设置网页上更新以下提示`服务设置 > AI模型配置 > 提示词`
58+
59+
![](/img/blog-2024-05-20-13.png)
60+
61+
要在视频流中识别文本,你可以使用以下指令:
62+
63+
```text
64+
Recognize the text in the image. Output the identified text directly.
65+
```
66+
67+
## Step 5: View OCR Results by Callback
68+
69+
一旦OCR过程完成,你可以通过在Oryx中设置回调URL来查看结果。
70+
71+
![](/img/blog-2024-05-20-14.png)
72+
73+
你也可以在仪表板中查看最新的OCR结果。
74+
75+
![](/img/blog-2024-05-20-15.png)
76+
77+
## Conclusion
78+
79+
总之,使用AI识别视频流中的文本和物体是一个改变游戏规则的技术。它帮助我们快速准确地从视频中提取有价值的信息。
80+
像Oryx这样的工具使这个过程变得简单高效,让你能够轻松发布直播并获得实时OCR结果。无论你是想识别人、读取文本还是描述场景,
81+
AI驱动的OCR都可以改变你与视频内容的互动方式。通过利用这些技术,你可以从每天接触到的视频中解锁新的可能性和见解。
82+
83+
![](https://ossrs.net/gif/v1/sls.gif?site=ossrs.net&path=/lts/blog-zh/24-05-20-OCR-Video-Streams)

static/img/blog-2024-05-20-01.png

87.5 KB
Loading

static/img/blog-2024-05-20-02.png

97.9 KB
Loading

static/img/blog-2024-05-20-03.png

94.4 KB
Loading

static/img/blog-2024-05-20-04.png

51 KB
Loading

static/img/blog-2024-05-20-05.png

117 KB
Loading

static/img/blog-2024-05-20-12.png

108 KB
Loading

static/img/blog-2024-05-20-13.png

101 KB
Loading

static/img/blog-2024-05-20-14.png

56.8 KB
Loading

static/img/blog-2024-05-20-15.png

117 KB
Loading

0 commit comments

Comments
 (0)