com.ant-automation.antcity.video.streaming.client
Version:
Multiple streaming protocol support based on CameraReceiverServer.
76 lines (50 loc) • 3.3 kB
Markdown
# SteramingReceiverServer Unity client #
Receive rtsp and mjpg video stremaing protocols in unity Texture2D.
# USE #
## Client ##
1. Add UI RawImage gameobject to scene
2. Create empty gameobject
3. Add CameraReceiverMemory Component to empty gameobject
4. Set Cameras Size to number of received streaming cameras (example 1)
5. Set Cameras Elements
5.1. Set RawImage created in (2) to Camera Source
5.2. Set streaming camera size (example X:640 Y:480)
## CameraReceiverServer ##
1. Clone [streaming.receiver.server](https://bitbucket.org/ant-automation/streaming.receiver.server/src/master/) Console C# project.
2. Edit ```cameraConfig.json``` to receive streaming. Example:
```
{
"MemoryFile": "CameraReceiveStream",
"CameraIP": [
"127.0.0.1",
],
"CameraPort": [ 10000],
"Protocol": [ "rtsp"]
}
```
Protocol: "rtsp" or " http".
3. Run project
## rtsp Emitting Application ##
Create an Unity Scene and follow the instruction at [rtsp.h264.streaming.server](https://bitbucket.org/ant-automation/rtsp.h264.streaming.server/src/master/)
## ReplicANT Emitting Application ##
You can combine rtsp and ReplicANT Camera Server streaming.
To receive a ReplicaANT Camera Server stremings:
1. set ```"Protocol": [ "http"]``` in ```cameraConfig.json``` file
2. Set the proper streaming camera size in client application
3. Run ReplicANT with CameraServer plugin
4. Run the ReplicANT Unity application with security cameras.
You can download [ReplicANT here](https://replicant.ant-automation.com/)
## Execution ##
```
(3.) Client (2.) CameraReceiverServer (1.) rtsp Emitting App
Unity App Memory File Console App ╔══════════╗
╔════════════════════╗Camera[0]┌─────────────────────┐ ╔═════════════════════════╗ Streaming[0]┌╢ Server ║
║ GameObject With ╟─────────┤ ├─╢ ╟ ─ ─ ─ ─ ─ ─ ┘╚══════════╝
║CameraReceiverMemory║ │"CameraReceiveStream"│ ║streaming.Receiver.server║ (1.) ReplicANT Unity
║ Component ╟─────────┤ ├─╢ ╟ ─ ─ ─ ─ ─ ─ ┐╔════════════╗ ┌─┐ ╔════════════╗
╚════════════════════╝Camera[n]└─────────────────────┘ ╚═════════════════════════╝ Streaming[n]└╢CameraServer╟─┤ ├─╢Emitting App║
╚════════════╝ └─┘ ╚════════════╝
```
1. Run Emitting Application (and ReplicANT if it is necesary)
2. Run CameraReceiverServer
3. Run Client Application