|
| 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 | + |
| 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 | + |
| 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 | + |
| 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 | + |
| 76 | + |
| 77 | +You can also view the last OCR result in the dashboard. |
| 78 | + |
| 79 | + |
| 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 | + |
0 commit comments