You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 11, 2024. It is now read-only.
*[Start nginx web service](#start-nginx-web-service)
25
-
*[Start live transcode service](#start-live-transcode-service)
26
-
*[Playback](#playback-1)
27
-
*[Web browser playback](#web-browser-playback-1)
28
-
*[VLC playback](#vlc-playback-1)
29
15
30
16
31
-
This document describes how to run the CDN Transcode Sample step by step. Please refer to [reference architecture](CDN_Transcode_Sample_RA.md) to understand the sample reference architecture design and how the sample works.
17
+
This document describes how to run the CDN Transcode Sample step by step.
18
+
19
+
The sample provides two kinds of services - `live streaming` and `VOD`, and this guide shows how to use the services in a simplest and typical way which can be scaled out to more complex environment. E.g.: in this guide, the docker images for transcoder server and cdn edge server are hosted on the same physical server. In real case, they can be hosted on different servers located in different places in the CDN network.
20
+
21
+
# Architecture
22
+
The sample implements a reference server-side transcode system over CDN infrastructure, which features `live streaming` and `VOD`.
- The live transcode service receives the video stream locally or over rtmp, decapsulate and demux the flv video, transcode to other codecs/bitrate/resolution, in 1:N manner, which means one input and N output. E.g.: one channel HEVC 4k@60fps, transcoded into one channle AVC 720p@30fps, one channel HEVC 1080p@30fps and one channel HEVC 4k@60fps. The transcoded video streams are then be encapsulated in flv over rtmp, be distributed to the CDN service.
29
+
- The CDN service receives the video streams from the Live transcode Service, and will translate the video streams into HLS/DASH format.
30
+
- The client starts playback the video.
31
+
32
+
The workflow of VOD is as follows:
33
+
- The client starts playback of a video by requesting the video manifest file.
34
+
- The CDN service checks if the video has been transcoded. If the DASH/HLS segments exist, the CDN service simply returns the manifest (and any subsequent video segments.) Otherwise, the CDN service schedules transcoding of the video in Kafka, a message system shared between the CDN service and the VOD trancode service.
35
+
- The VOD trancode service receives the request and starts transcoding of the video clip.
36
+
- The CDN service returns the resulting DASH/HLS manifest and segments to the client.
32
37
33
-
The sample provides two kinds of services - `live streaming` and `VOD`, and this guide just shows how to use the services in a simplest and typical way which can be scaled out to more complex environment. E.g.: in this guide, the docker images for transcoder server and cdn edge server are hosted on the same physical server. In real case, they can be hosted on different servers located in different places in the CDN network.
34
38
35
39
# Prerequisites
36
40
In this document, we'll use the simplest example to show how to build up the pipeline for different user scenarios. To simply the setup, we'll host docker nodes on the same physical server (named as "CDN-Transcode Server" in this document). One Streaming Server will be used as well to RTMP stream the source video content to CDN-Transcode Server, however you can omit Streaming Server if you want to just use local video content on CDN-Transcode Server. A client system is also needed to playback the transcoded video streams.
@@ -47,21 +51,11 @@ Below is the basic block diagram for the sample setup:
47
51
**Note**: for `live streaming` and `VOD` in this document, it refers the interaction between `CDN-Transcode Server` and `Client`, not refers interaction between `Streaming Server` and `CDN-Transcode Server`.
48
52
## Setup CDN-Transcode Server
49
53
- Install Ubuntu 18.04/CentOS 7.6 on CDN-Transcode Server, and configure the IP address & proxy properlly.
- Install the third-party dependency Libraries and tools.
54
55
```
55
-
- Install [kompose](https://github.com/kubernetes/kompose/blob/master/docs/installation.md) by referencing kubernetes kompose setup guide. Version 1.16+ is required.
The sample supports both auto deployment and manual deployment. The auto deployment will help users to have quick try to use this sample while the manual deployment give more flexibility for customerization.
107
101
## Auto deployment
108
-
The auto deploy supports both docker swarm and docker compose. You're recommended to use docker compose in this sample. The auto deploy will deploy the live streaming and VOD services automatically using a default video stream "big buck bunny" as an example. To simply the setup, the original source video content are local content but not streamed from the RTMP streaming server.
109
-
110
-
**Note**: If you want to use other video clips to try the auto deployment, you can simply copy the clips into <CDN-Transcode-Sample>/volume/video/archive folder, then run below command to generate video clip thumbnails. The transcode service will perform 1:N transcoding for these video clips. It's recommended to use .mp4 video clip files.
Run below steps on CDN-Transcode server to stop/start docker swarm service.
116
-
117
-
- Initialize docker swarm if you have not
118
-
```bash
119
-
sudo docker swarm init
120
-
```
121
-
- start/stop docker swarm services
122
-
```bash
123
-
make start_docker_swarm
124
-
make stop_docker_swarm
125
-
```
126
-
- start/stop docker-compose service
127
-
```bash
128
-
make start_docker_compose
129
-
make stop_docker_compose
130
-
```
131
-
### Playback
132
-
#### Web browser playback
133
-
Visit https://\<CDN-Transcode Server IP address\>/ using any web browser, you will see the playlist and then click any of the streams in the playlist to playback.
134
-
#### VLC playback
135
-
You can also use Windows VLC player to playback the HTTPs streams provided by the sample service. A sample [VLC playback script](client/vlc_playback.bat) is provided for this purpose. You may need to change this script to set the IP address and the VLC path in this script.
102
+
The auto deploy supports both docker swarm and kubernetes. The auto deploy will deploy the live streaming and VOD services automatically using a default video stream "big buck bunny" as an example. To simply the setup, the original source video content are local content but not streamed from the RTMP streaming server.
103
+
104
+
**Note**: If you want to use other video clips to try the auto deployment, you can simply visit https://\<CDN-Transcode Server IP address\>/ using web browser, click the guest button at the top right-hand corner and then choose upload option. It's recommended to use .mp4 video clip files.
105
+
106
+
### Auto deployment using docker swarm
107
+
For details, please refer to [Deploy on Xeon E5 using docker swarm](https://github.com/OpenVisualCloud/CDN-Transcode-Sample/wiki/Deploy-on-Xeon-E5-using-docker-swarm).
108
+
### Auto deployment using Kubernetes
109
+
1. Setup kubernetes environment
110
+
For details, please refer to [Setup Kubernetes environment](https://github.com/OpenVisualCloud/CDN-Transcode-Sample/wiki/Setup-Kubernetes-environment).
111
+
**Note**: If you have setup kubernetes environment, please skip this step.
112
+
2. Auto deployment on your own platform
113
+
* Auto deployment using kubernetes on E3
114
+
For details, please refer to [Deploy on Xeon E3 with Gen GFX server using Kubernetes](https://github.com/OpenVisualCloud/CDN-Transcode-Sample/wiki/Deploy-on-Xeon-E3-with-Gen-GFX-using-Kubernetes).
115
+
* Auto deployment using kubernetes on E5
116
+
For details, please refer to [Deploy on Xeon E5 server using Kubernetes](https://github.com/OpenVisualCloud/CDN-Transcode-Sample/wiki/Deploy-on-Xeon-E5-server-using-Kubernetes).
117
+
* Auto deployment using kubernetes on VCA2
118
+
For details, please refer to [Deploy on VCA2 using Kubernetes](https://github.com/OpenVisualCloud/CDN-Transcode-Sample/wiki/Deploy-on-VCA2-using-Kubernetes).
136
119
137
120
## Manual deployment
138
-
The manual deployment give an example to users who want to use this sample as a base to build up more complicated CDN transcode solution.
139
-
140
-
### Setup network topology
141
-
In this guide we use a very simple topology diagram to showcase the interconnection between each nodes. Below is an example:
Add below Nginx configuration section into nginx.conf (may be /etc/nginx/nginx.conf) on streaming server, then copy video clips to the path defined in the configuration and start nginx service. E.g: /var/www/clips is used in this sample.
Run below commands on live transcode docker instance to show one 1:4 channels of live transcode. It supports 1 channel of H264 decode, 2 channels of SVT-HEVC encode and 2 channels of x264 encode. **Note**: If there is a Streaming Server, you need to replace the IP address below with the actual Streaming Server IP address in your setup. If not, please replace the inputRTMP stream with local stream "/var/www/archive/bbb_sunflower_1080p_30fps_normal.mp4"
**Note**: for live ABR (using ffmpeg to trancode in 3 variants, and nginx produce one manifest, there are only 3 different resolutions and bit rates supported in live ABR).
234
-
Run below commands on live transcode docker instance, the suffix "hi" corresponds to the maximum resolution or bit rate, the suffix "mid" corresponds to the medium resolution or bit rate and the suffix "low" corresponds to the minimum resolution or bit rate.
Configure below parameters on cdn docker instance, the "max" flag which indicate which representation should have max witdh and height and so use it to create the variant manifest on DASH.
Visit https://\<CDN-Transcode Server IP address\>/ using any web browser, you will see the playlist and then click any of the streams in the playlist to playback.
274
-
275
-
#### VLC playback
276
-
Same as auto deployment, you can use VLC client as well following instructions in the above section.
277
-
**Note**: for adaptative streaming, please run below commands.
278
-
```
279
-
vlc https://<CDN-Transcode Server IP address>/dash/big_buck_bunny.mpd
280
-
```
121
+
The manual deployment give an example to users who want to use this sample as a base to build up more complicated CDN transcode solution. For details, please refer to [Manual Deploy](https://github.com/OpenVisualCloud/CDN-Transcode-Sample/wiki/Manual-Deploy).
0 commit comments