user guide - support.huaweicloud.com · perform operations on the configuration management page of...

26
Video Ingestion Service User Guide Issue 01 Date 2019-06-07 HUAWEI TECHNOLOGIES CO., LTD.

Upload: others

Post on 24-Mar-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: User Guide - support.huaweicloud.com · Perform operations on the configuration management page of the device (IP cameras or NVR devices). 3.Creating a Video Invitation After the

Video Ingestion Service

User Guide

Issue 01

Date 2019-06-07

HUAWEI TECHNOLOGIES CO., LTD.

Page 2: User Guide - support.huaweicloud.com · Perform operations on the configuration management page of the device (IP cameras or NVR devices). 3.Creating a Video Invitation After the

Copyright © Huawei Technologies Co., Ltd. 2019. All rights reserved.No part of this document may be reproduced or transmitted in any form or by any means without prior writtenconsent of Huawei Technologies Co., Ltd. Trademarks and Permissions

and other Huawei trademarks are trademarks of Huawei Technologies Co., Ltd.All other trademarks and trade names mentioned in this document are the property of their respectiveholders. NoticeThe purchased products, services and features are stipulated by the contract made between Huawei and thecustomer. All or part of the products, services and features described in this document may not be within thepurchase scope or the usage scope. Unless otherwise specified in the contract, all statements, information,and recommendations in this document are provided "AS IS" without warranties, guarantees orrepresentations of any kind, either express or implied.

The information in this document is subject to change without notice. Every effort has been made in thepreparation of this document to ensure accuracy of the contents, but all statements, information, andrecommendations in this document do not constitute a warranty of any kind, express or implied.

Issue 01 (2019-06-07) Copyright © Huawei Technologies Co., Ltd. i

Page 3: User Guide - support.huaweicloud.com · Perform operations on the configuration management page of the device (IP cameras or NVR devices). 3.Creating a Video Invitation After the

Contents

1 How to Use VIS..............................................................................................................................1

2 Ingesting a GB28181 Device to VIS........................................................................................... 42.1 Creating a GB28181 Password.......................................................................................................................................42.2 Registering the GB28181 Device with VIS................................................................................................................... 52.3 Creating a Video Invitation.............................................................................................................................................92.4 Video Retention............................................................................................................................................................ 102.5 (Optional) Configuring Scheduled Ingestion................................................................................................................11

3 Ingesting the HTTP-FLV Video Stream to VIS..................................................................... 133.1 Creating an HTTP-FLV Video Stream......................................................................................................................... 133.2 Video Retention............................................................................................................................................................ 15

4 Ingesting the RTMP Video Stream to VIS............................................................................. 174.1 (Optional) Creating an Access Key.............................................................................................................................. 174.2 Creating an RTMP Video Stream................................................................................................................................. 194.3 Video Retention............................................................................................................................................................ 21

A Change History........................................................................................................................... 23

Video Ingestion ServiceUser Guide Contents

Issue 01 (2019-06-07) Copyright © Huawei Technologies Co., Ltd. ii

Page 4: User Guide - support.huaweicloud.com · Perform operations on the configuration management page of the device (IP cameras or NVR devices). 3.Creating a Video Invitation After the

1 How to Use VIS

Video Ingestion Service (VIS) ingests massive volumes of video data in real time. With itsimpressive data collection, quick real-time transmission, and powerful data dumpingcapabilities, you can easily build intelligent analysis applications through integration withHUAWEI CLOUD VAS.

Figure 1-1 How VIS works

You can use Video Ingestion Service (VIS) on the management console, as shown in Figure1-2.

Figure 1-2 Video Ingestion Service management console

Video Ingestion ServiceUser Guide 1 How to Use VIS

Issue 01 (2019-06-07) Copyright © Huawei Technologies Co., Ltd. 1

Page 5: User Guide - support.huaweicloud.com · Perform operations on the configuration management page of the device (IP cameras or NVR devices). 3.Creating a Video Invitation After the

NOTE

During an open beta test (OBT), you need to apply for VIS. The service is available only after yourapplication is approved. After VIS is put into commercial use, it is provisioned automatically.

This document describes how to use VIS on the console based on the ingestion type.Currently, the following video ingestion modes are supported:

l GB28181 device: Network cameras (IP Camera, IPC for short) and a Network VideoRecorder (NVR) that comply with the national GB/T28181-2011 and GB/T28181-2016protocol standards. An H.264 or H.265 video encoding format is supported in GB28181devices.

l HTTP-FLV video stream ingestion: Video stream that uses the HTTP-FLV protocol totransmit data. The encoding format is H.264.

l RTMP video stream ingestion: Video stream that uses the RTMP protocol to transmitdata. The encoding format is H.264.

Table 1-1 Ingestion process

Ingestion Type Ingestion Process Description

GB28181 camera 1.Creating aGB28181 Password

You need a username and a password forauthentication when registering a GB28181device in VIS. Therefore, beforeregistration, you need to create a GB28181password on the VIS management console.

2.Registering theGB28181 Devicewith VIS

To register the GB28181 device with VIS,perform the following steps:1. Adding a Device on VIS: Perform

operations on the VIS managementconsole.

2. Registering a Device with VIS:Perform operations on the configurationmanagement page of the device (IPcameras or NVR devices).

3.Creating a VideoInvitation

After the GB28181 device is registeredsuccessfully, you need to create a videoinvitation for the registered device channel.Once the invitation is created, the video ofthe device is continuously ingested to VISuntil you disconnect the video.

4.Video Retention The video retention function is used to savethe real-time video stream data forsubsequent analysis or viewing.

5.(Optional)ConfiguringScheduledIngestion

This operation is optional. VIS allows youto set scheduled ingestion policies foractivated GB28181 cameras. A user can setthe camera to ingest video streamsrandomly or continuously within a specifiedperiod of a day.

Video Ingestion ServiceUser Guide 1 How to Use VIS

Issue 01 (2019-06-07) Copyright © Huawei Technologies Co., Ltd. 2

Page 6: User Guide - support.huaweicloud.com · Perform operations on the configuration management page of the device (IP cameras or NVR devices). 3.Creating a Video Invitation After the

Ingestion Type Ingestion Process Description

HTTP-FLV videostream

1.Creating anHTTP-FLV VideoStream

VIS supports HTTP-FLV video streamingestion. You only need to obtain thestream pull URL of the HTTP-FLV videostream and create video streams on the VISconsole.

2.Video Retention The video retention function is used to savethe real-time video stream data forsubsequent analysis or viewing.

RTMP video stream 1.(Optional)Creating an AccessKey

The access key created here is used only forRTMP stream push authentication. Fordetails, see Stream Push AuthenticationRule. If the stream push authentication isnot required, skip this step.

2.Creating anRTMP VideoStream

VIS supports RTMP video stream ingestion.You need to create RTMP video streams onthe VIS console.

3.Video Retention The video retention function is used to savethe real-time video stream data forsubsequent analysis or viewing.

Video Ingestion ServiceUser Guide 1 How to Use VIS

Issue 01 (2019-06-07) Copyright © Huawei Technologies Co., Ltd. 3

Page 7: User Guide - support.huaweicloud.com · Perform operations on the configuration management page of the device (IP cameras or NVR devices). 3.Creating a Video Invitation After the

2 Ingesting a GB28181 Device to VIS

2.1 Creating a GB28181 PasswordYou need a username and a password for authentication when registering a GB28181 devicein VIS. Therefore, before registration, you need to create a GB28181 password on the VISmanagement console.

The user name and password configured in the following Registering a Device with VISoperation are the GB28181 username and password created here.

Procedure1. Log in to the VIS management console.

2. Select Credential Management > GB28181 Password > Add GB28181 Password.

Figure 2-1 GB28181 password management

Video Ingestion ServiceUser Guide 2 Ingesting a GB28181 Device to VIS

Issue 01 (2019-06-07) Copyright © Huawei Technologies Co., Ltd. 4

Page 8: User Guide - support.huaweicloud.com · Perform operations on the configuration management page of the device (IP cameras or NVR devices). 3.Creating a Video Invitation After the

3. Configure the username and password for GB28181 authentication. The username mustbe globally unique. Remember the password configured here. You need to enter thepassword later in Registering a Device with VIS.

You can set the GB28181 password to Anonymous or Non-anonymous based ondifferent device types.

– Anonymous: The system randomly generates a username. The device ID is used asthe SIP Authentication ID in Registering a Device with VIS.

– Non-anonymous: You need to set the username and use it as the SIPAuthentication ID in Registering a Device with VIS.

Figure 2-2 Configure the GB28181 password

4. After the GB28181 password is created, you can delete or change it on the CredentialManagement page. However, the username cannot be changed.

NOTE

l If a password has been used by a GB28181 device (the password is selected in Adding aDevice on VIS ), the GB28181 password cannot be deleted.

l If the password has been used by a GB28181 device and you have changed the password, youneed to enter the changed password on the device configuration management page (that is, theregistration page of the device). For details, see Registering a Device with VIS.

2.2 Registering the GB28181 Device with VISTo register the GB28181 device with VIS, perform the following steps:

Video Ingestion ServiceUser Guide 2 Ingesting a GB28181 Device to VIS

Issue 01 (2019-06-07) Copyright © Huawei Technologies Co., Ltd. 5

Page 9: User Guide - support.huaweicloud.com · Perform operations on the configuration management page of the device (IP cameras or NVR devices). 3.Creating a Video Invitation After the

1. Adding a Device on VIS: Perform operations on the VIS management console.2. Registering a Device with VIS: Perform operations on the configuration management

page of the device (IP cameras or NVR devices).

The process of registering an IP camera is the same as that of registering an NVR device. Thefollowing example is the registration process of IP cameras.

Adding a Device on VIS1. Log in to the VIS management console.2. Choose Device Management > IP Camera Management > Add Device, as shown in

Figure 2-3.

Figure 2-3 Add a new device

Table 2-1 describes the parameters.

Table 2-1 Parameters for adding a device

Parameter Description ExampleValue

DeviceQuantity

Number of IP cameras that are created in batches. 2

GB28181Password

If you have already created passwords, as described inCreating a GB28181 Password, select one from thedrop-down list box.

username

Video Ingestion ServiceUser Guide 2 Ingesting a GB28181 Device to VIS

Issue 01 (2019-06-07) Copyright © Huawei Technologies Co., Ltd. 6

Page 10: User Guide - support.huaweicloud.com · Perform operations on the configuration management page of the device (IP cameras or NVR devices). 3.Creating a Video Invitation After the

Parameter Description ExampleValue

Stream NameSuffix

Suffix of the video stream associated with the devicechannel. After a device is registered, VIS automaticallycreates a video stream associated with the device. Youcan set the configured stream name suffix as the namesuffix to the video stream name, helping you betterdistinguish different video streams.The suffix must contain 0 to 30 characters (0 indicatesthat the suffix is not set). Only letters, digits, hyphens(-), and underscores (_) are allowed.

suffix

Description Device description. The value can contain a maximumof 500 characters.

-

3. Click OK. The Device Management page is displayed. The device is in theUnregistered status. To register the device, you need to record the followinginformation:

– Device ID: automatically generated by the system. It is used as the username of thedevice when you register the device in Registering a Device with VIS.

– SIP server: IP address and port number of the SIP server. It is needed for deviceregistration in Registering a Device with VIS

Figure 2-4 Device ID and SIP server address

Registering a Device with VIS

To register a device with VIS, you need to configure the device on the device configurationmanagement page. The management page addresses, configuration entries, and parameters ofcameras from different vendors may be different. For details, see the device documentation ofthe corresponding vendor.

This section uses IP cameras as an example to describe the registration process.

1. Access the Hikvision camera configuration page using a web browser, and clickConfiguration > Network > Advanced Settings > Platform Access.

NOTE

The procedure for registering an NVR device is the same as that for registering an IP camera. Fordetails, see Platform Access in the corresponding document.

2. Check Enable and set the following parameters. For details, see Table 2-2.

Video Ingestion ServiceUser Guide 2 Ingesting a GB28181 Device to VIS

Issue 01 (2019-06-07) Copyright © Huawei Technologies Co., Ltd. 7

Page 11: User Guide - support.huaweicloud.com · Perform operations on the configuration management page of the device (IP cameras or NVR devices). 3.Creating a Video Invitation After the

Table 2-2 Registration parameters

Parameter Description ExampleValue

Platform AccessMode

VIS supports GB28181 device registration. Select28181.

28181

Protocol Version Select GB/T28181-2011. GB/T28181-2011

Local SIP Port You can enter the default port value 5060. 5060

SIP Server ID This parameter is not used currently. You can enterthe same value as the SIP username.

34020000001320000003

SIP Server Domain First 10 digits of the SIP server ID. 3402000000

SIP Server Address Device registration address provided by VIS.Follow Step 3 in Adding a Device on VIS toobtain the address.

10.13.103.97

SIP Server Port Device registration port provided by VIS. FollowStep 3 in Adding a Device on VIS to obtain theport.

5080

SIP Username Device ID generated in Adding a Device on VIS.Follow Step 3 in Adding a Device on VIS toobtain the username.Set this parameter based on the configuration ruleof GB28181 device ID. Ensure that the usernameis unique.

34020000001320000003

SIP UserAuthentication ID

l If the parameter is set to Anonymous whenCreating a GB28181 Password, the SIP UserAuthentication ID is set to the device ID,which is the same as the configuration of theSIP Username.

l If the parameter is set to Non-anonymouswhen Creating a GB28181 Password, the SIPUser Authentication ID is set to the usernamecreated in Creating a GB28181 Password.

0100

Password GB28181 password created in Creating aGB28181 Password.

-

Confirm Password - -

RegistrationValidity (s)

Set this parameter to 3,600 seconds. 3600

Heartbeat Interval(s)

Set this parameter to 60 seconds. 60

Video Ingestion ServiceUser Guide 2 Ingesting a GB28181 Device to VIS

Issue 01 (2019-06-07) Copyright © Huawei Technologies Co., Ltd. 8

Page 12: User Guide - support.huaweicloud.com · Perform operations on the configuration management page of the device (IP cameras or NVR devices). 3.Creating a Video Invitation After the

Parameter Description ExampleValue

Registration Status l Online: Indicates that the device has beenregistered with the SIP server.

l Offline: Indicates that the device is notregistered with the SIP server or is offline.

-

Max TimeoutCounts

Set this parameter to 3. 3

28181 Bit StreamIndex

Configure the main stream and sub streams in theVideo/Audio, and then select one from the Sub-stream and the Main stream.

Sub-stream

NOTE

In addition to the preceding parameters, you need to configure video channels by referring torelated documents of the NVR devices.

3. After the configuration is saved, refresh the page to query the device status.

Released indicates that the registration is successful.

4. After successful registration, refresh the Device Management page on the VISmanagement console to check the device registration status.

If the status is Released, VIS automatically creates associated video streams forregistered devices. You can view the video streams on the Video Stream Managementpage.

Figure 2-5 Registered device

NOTE

After the NVR device is successfully registered, log in to the VIS management console and clickDevice Management > NVR Management > Refresh Channel to view the video channel andassociated video streams.

2.3 Creating a Video InvitationAfter the GB28181 device is registered successfully, you need to create a video invitation forthe registered device channel. Once the invitation is created, the video of the device iscontinuously ingested to VIS until you disconnect the video.

1. On the Device Management page, click Create Video Invitation in the Operationcolumn.

Video Ingestion ServiceUser Guide 2 Ingesting a GB28181 Device to VIS

Issue 01 (2019-06-07) Copyright © Huawei Technologies Co., Ltd. 9

Page 13: User Guide - support.huaweicloud.com · Perform operations on the configuration management page of the device (IP cameras or NVR devices). 3.Creating a Video Invitation After the

Figure 2-6 Registered device

2. After the invitation is successful, you can view the activated associated video streams onthe Video Stream Management page. In this case, the device can push video streams toVIS.You can click a video stream name to view the Stream Capture URL. For the GB28181device, you only need to pay attention to the Stream Capture URL.

NOTE

l For the associated video streams automatically created by VIS for the GB28181 device, youcan only perform the retention function on the Video Stream Management page. They cannotbe activated, disabled, modified, or deleted.

l If you want to disable the video stream, click Disconnect Video in the Operation column ofthe Device Management page to cancel the video invitation.

l Stream Capture URL: Used for the user client to capture video streams.

2.4 Video RetentionThe video retention function is used to save the real-time video stream data for subsequentanalysis or viewing.

By default, newly created video streams are not retained. Video streams can be retained onlywhen they are in the Active state. Currently, video streams in VIS can be retained to OBS.

Retention Process1. Log in to the VIS management console.

1. In the navigation pane on the left, click Video Stream Management, locate theactivated video streams that you want to retain, and click Start Retention in theOperation column.– If the video stream is retained for the first time, the system prompts you to grant the

permission to operate OBS on VIS, that is, OBS authorization. Perform operationsas prompted.

– During OBS authorization, if the system shows that the number of agencies reachesthe upper limit, log in to the Identity and Access Management (IAM) serviceconsole to delete or create agencies.

– You only need to perform the operation once.2. After the OBS authorization is successful, set the Retention Period (h), Fragment

Length (m), and Retention OBS Path for video retention.If you select Save Permanently, you only need to select the Retention OBS Path.

Video Ingestion ServiceUser Guide 2 Ingesting a GB28181 Device to VIS

Issue 01 (2019-06-07) Copyright © Huawei Technologies Co., Ltd. 10

Page 14: User Guide - support.huaweicloud.com · Perform operations on the configuration management page of the device (IP cameras or NVR devices). 3.Creating a Video Invitation After the

Figure 2-7 Retention details

3. In the OBS bucket, the video path is named in the following format: OBS path/Videostream name/Year/Month/Day/Hour/startmin.sec_endmin.sec.flv.For example, according to Figure 2-8, a video file named 0255_3254.flv means that theretention duration is about 30 minutes and the video fragment is from 01:02:55 to01:32:54 on February 19, 2019.During video fragment generation, the length of each video fragment may have an errorof 1 to 2 seconds due to different relative positions of key frames.

Figure 2-8 Video retention path

2.5 (Optional) Configuring Scheduled IngestionThis operation is optional. VIS allows you to set scheduled ingestion policies for activatedGB28181 cameras. A user can set the camera to ingest video streams randomly orcontinuously within a specified period of a day.

1. Log in to the VIS management console.2. In the Device Management page, choose More > Configure Scheduled Ingestion in

the Operation column.

Video Ingestion ServiceUser Guide 2 Ingesting a GB28181 Device to VIS

Issue 01 (2019-06-07) Copyright © Huawei Technologies Co., Ltd. 11

Page 15: User Guide - support.huaweicloud.com · Perform operations on the configuration management page of the device (IP cameras or NVR devices). 3.Creating a Video Invitation After the

Figure 2-9 Configure scheduled ingestion

Table 2-3 describes the parameters.

Table 2-3 Scheduled ingestion

Parameter Description ExampleValue

Ingestion Type l Random Ingestion: You need to specify the TotalIngestion Duration (m), Start Time, and EndTime in a day. Then, VIS randomly divides thetotal ingestion duration into several fragments. Amaximum of 6 fragments is allowed, the minimumduration of each fragment is 10 minutes, and themaximum duration cannot exceed the TotalIngestion Duration (m). VIS automatically ingeststhe video data of the activated device within thetime fragments.

l Continuous Ingestion: You need to specify theStart Time and Total Ingestion Duration (m) in aday. VIS automatically ingests video data of theactivated device from the start time.

ContinuousIngestion

IngestionPeriod

l Periodic: Indicates that the ingestion is performedbased on the configured policy every day.

l Once: Indicates that the ingestion is performed onlyonce after the policy is set.

Periodic

Total IngestionDuration (m)

Indicates the total ingestion duration, the unit is inminutes.

240

Start Time Indicates the time when the ingestion starts. 08:40

End Time Indicates the time when the ingestion is stopped. 20:30

Video Ingestion ServiceUser Guide 2 Ingesting a GB28181 Device to VIS

Issue 01 (2019-06-07) Copyright © Huawei Technologies Co., Ltd. 12

Page 16: User Guide - support.huaweicloud.com · Perform operations on the configuration management page of the device (IP cameras or NVR devices). 3.Creating a Video Invitation After the

3 Ingesting the HTTP-FLV Video Stream to

VIS

3.1 Creating an HTTP-FLV Video StreamVIS supports HTTP-FLV video stream ingestion. You only need to obtain the stream pullURL of the HTTP-FLV video stream and create video streams on the VIS console.

Procedure1. Log in to the VIS management console.

1. Click Video Stream Management > Add Video Stream, as shown in Figure 3-1.

Video Ingestion ServiceUser Guide 3 Ingesting the HTTP-FLV Video Stream to VIS

Issue 01 (2019-06-07) Copyright © Huawei Technologies Co., Ltd. 13

Page 17: User Guide - support.huaweicloud.com · Perform operations on the configuration management page of the device (IP cameras or NVR devices). 3.Creating a Video Invitation After the

Figure 3-1 Add an HTTP-FLV video stream

2. Configure video stream parameters. For details, see Table 3-1.

Table 3-1 HTTP-FLV video stream parameters

Parameter Description Example Value

Name Name of a video stream. The name ofeach video stream must be unique.Stream push and pull are identified byvideo stream names.

stream1

Encoding Format Specifies the encoding format of thevideo stream.

H264

Video IngestionType

Specifies the video ingestion type. Setthis parameter to HTTP-FLV.

HTTP-FLV

Stream Pull URL This parameter is available only when theVideo Ingestion Type is set to HTTP-FLV. VIS uses this URL to capture videostreams.

https://live.push.com/live/huawei01

Video Ingestion ServiceUser Guide 3 Ingesting the HTTP-FLV Video Stream to VIS

Issue 01 (2019-06-07) Copyright © Huawei Technologies Co., Ltd. 14

Page 18: User Guide - support.huaweicloud.com · Perform operations on the configuration management page of the device (IP cameras or NVR devices). 3.Creating a Video Invitation After the

Parameter Description Example Value

Sharing Status l If a video stream is shared, other userscan obtain the video stream withoutauthentication.

l If a video stream is not shared, theuser is authenticated when pulling thevideo. Add X-Auth-Token to theservice request header and set thevalue of X-Auth-Token to the tokenof the user who creates the videostream.

Yes

Tag Identifies a video stream. A maximum of10 tags can be added to a video stream.

group=group#1

Description Video stream description. -

3. After a video stream is created, it can be pulled only after being activated. On the Video

Stream Management page, click Activate in the Operation column of the HTTP-FLVvideo stream.

4. After a video stream is activated, you can click the video stream name to view detailedinformation, including the real-time streams, stream pull URL, and stream capture URL.For a video stream of the HTTP-FLV type, you only need to focus on the stream captureURL.If the video stream is not activated, it cannot be viewed.

NOTE

Stream Capture URL: Used for the user client to capture video streams.

3.2 Video RetentionThe video retention function is used to save the real-time video stream data for subsequentanalysis or viewing.

By default, newly created video streams are not retained. Video streams can be retained onlywhen they are in the Active state. Currently, video streams in VIS can be retained to OBS.

Retention Process1. Log in to the VIS management console.

1. In the navigation pane on the left, click Video Stream Management, locate theactivated video streams that you want to retain, and click Start Retention in theOperation column.– If the video stream is retained for the first time, the system prompts you to grant the

permission to operate OBS on VIS, that is, OBS authorization. Perform operationsas prompted.

– During OBS authorization, if the system shows that the number of agencies reachesthe upper limit, log in to the Identity and Access Management (IAM) serviceconsole to delete or create agencies.

Video Ingestion ServiceUser Guide 3 Ingesting the HTTP-FLV Video Stream to VIS

Issue 01 (2019-06-07) Copyright © Huawei Technologies Co., Ltd. 15

Page 19: User Guide - support.huaweicloud.com · Perform operations on the configuration management page of the device (IP cameras or NVR devices). 3.Creating a Video Invitation After the

– You only need to perform the operation once.2. After the OBS authorization is successful, set the Retention Period (h), Fragment

Length (m), and Retention OBS Path for video retention.If you select Save Permanently, you only need to select the Retention OBS Path.

Figure 3-2 Retention details

3. In the OBS bucket, the video path is named in the following format: OBS path/Videostream name/Year/Month/Day/Hour/startmin.sec_endmin.sec.flv.For example, according to Figure 3-3, a video file named 0255_3254.flv means that theretention duration is about 30 minutes and the video fragment is from 01:02:55 to01:32:54 on February 19, 2019.During video fragment generation, the length of each video fragment may have an errorof 1 to 2 seconds due to different relative positions of key frames.

Figure 3-3 Video retention path

Video Ingestion ServiceUser Guide 3 Ingesting the HTTP-FLV Video Stream to VIS

Issue 01 (2019-06-07) Copyright © Huawei Technologies Co., Ltd. 16

Page 20: User Guide - support.huaweicloud.com · Perform operations on the configuration management page of the device (IP cameras or NVR devices). 3.Creating a Video Invitation After the

4 Ingesting the RTMP Video Stream to VIS

4.1 (Optional) Creating an Access KeyThe access key created here is used only for RTMP stream push authentication. For details,see Stream Push Authentication Rule. If the stream push authentication is not required, skipthis step.

Procedure1. Log in to the VIS management console.

1. In the navigation pane on the left, click Credential Management > Access Key > AddAccess Key to add an access key.

Figure 4-1 Credential Management

2. In the dialog box that is displayed, you can customize the key name and description.After you click OK, VIS automatically generates a key and a downloaded file in thename similar to credentials.csv. Keep the file properly for further usage.

3. After the key is created, you can delete or modify the key on the Access Key tab.However, only the key name and description can be modified.

Video Ingestion ServiceUser Guide 4 Ingesting the RTMP Video Stream to VIS

Issue 01 (2019-06-07) Copyright © Huawei Technologies Co., Ltd. 17

Page 21: User Guide - support.huaweicloud.com · Perform operations on the configuration management page of the device (IP cameras or NVR devices). 3.Creating a Video Invitation After the

Stream Push Authentication RuleIf the access key is set when creating an RTMP video stream in Creating an RTMP VideoStream, you need to add the related query parameters (Expires, AccessKeyId, and Token) tothe original stream push URL of the RTMP video stream after the creation is complete. Fordetails about the parameter rules, see Table 4-1.

To view the original stream push URL of the RTMP video stream, perform the followingsteps: On the VIS management console, click Video Stream Management, and click thestream name of the RTMP video you want to query to go to the video preview page. Thestream push URL is displayed, for example, rtmp://10.4.55.180:14201/vis/stream_name.

The following is an example of a stream push URL to be authenticated:

rtmp://xxx.xxx.xxx.xxx:xxxx/vis/stream_name?Expires=1472201595&AccessKeyId=J7UFQDDHDMQ0UWNUMJFCWNNUV5LQK3CN&Token=bjKraZTTyzz9%2FpYoomDx4Wgh%2FlM%3D

Table 4-1 Parameter description

Parameter

Description Example Value

Expires Specifies the time when an RTMPvideo stream expires, which isexpressed in Unix timestamp.

1472201595

AccessKeyId

ID of the access key. J7UFQDDHDMQ0UWNUMJFCWNNUV5LQK3CN

Video Ingestion ServiceUser Guide 4 Ingesting the RTMP Video Stream to VIS

Issue 01 (2019-06-07) Copyright © Huawei Technologies Co., Ltd. 18

Page 22: User Guide - support.huaweicloud.com · Perform operations on the configuration management page of the device (IP cameras or NVR devices). 3.Creating a Video Invitation After the

Parameter

Description Example Value

Token Specifies the calculated token.Calculation rule is as follows:Token=Base64(hmac-sha1(SecretKey, Tcurl + Expires))The rule uses the hmac-sha1encryption algorithm and is encodedby Base64. The parameters aredescribed as follows:l SecretKey: SK value of the access

key, which is used as theencryption algorithm key.

l Tcurl + Expires: Obtained bycombining the character strings ofTcurl and Expires, which is usedas the encryption algorithmmessage data.– Tcurl: The original stream

push URL on the VideoPreview page. For example:rtmp://xxx.xxx.xxx.xxx:xxxx/vis/stream_name

– Expires: The definition and thevalue are the same as the queryparameter Expires.

KH48kBm6Bp0CkrOFcpfXTBz4mPomHR+qRQqCzNgVHipGLfs26Uet+xhDpxIDmZyGvGmIs-sa14h90iQjTcpkI3JtytyTRgOAEnAhKkGSkWq2HuSLep+nrI8pjBN3L47YSaN+eeQmsPRR+cMK5RDpu06hPKejiMPm9aSqF2Vb6rl904rq

4.2 Creating an RTMP Video StreamVIS supports RTMP video stream ingestion. You need to create RTMP video streams on theVIS console.

Procedure1. Log in to the VIS management console.

1. Click Video Stream Management > Add Video Stream, as shown in Figure 4-2.

Video Ingestion ServiceUser Guide 4 Ingesting the RTMP Video Stream to VIS

Issue 01 (2019-06-07) Copyright © Huawei Technologies Co., Ltd. 19

Page 23: User Guide - support.huaweicloud.com · Perform operations on the configuration management page of the device (IP cameras or NVR devices). 3.Creating a Video Invitation After the

Figure 4-2 Add an RTMP video stream

2. Configure video stream parameters. For details, see Table 4-2.

Table 4-2 RTMP video stream parameters

Parameter Description Example Value

Name Name of a video stream. The name ofeach video stream must be unique.Stream push and pull are identified byvideo stream names.

stream2

Encoding Format Specifies the encoding format of thevideo stream.

H264

Video IngestionType

Select RTMP. RTMP

Sharing Status l If a video stream is shared, other userscan obtain the video stream withoutauthentication.

l If a video stream is not shared, theuser is authenticated when pulling thevideo. Add X-Auth-Token to theservice request header and set thevalue of X-Auth-Token to the tokenof the user who creates the videostream.

Yes

Video Ingestion ServiceUser Guide 4 Ingesting the RTMP Video Stream to VIS

Issue 01 (2019-06-07) Copyright © Huawei Technologies Co., Ltd. 20

Page 24: User Guide - support.huaweicloud.com · Perform operations on the configuration management page of the device (IP cameras or NVR devices). 3.Creating a Video Invitation After the

Parameter Description Example Value

Tag Identifies a video stream. A maximum of10 tags can be added to a video stream.

group=group#1

Secret Key If permission control is required forpushing a stream, you can select the keycreated in (Optional) Creating anAccess Key. For details about thefunctions of access key, see Stream PushAuthentication Rule. If no key is set, thestream push authentication is notperformed.

RTMP01

Description Video stream description. -

3. After a video stream is created, it can be pulled only after being activated. On the Video

Stream Management page, click Activate in the Operation column of the RTMP videostream.

4. After a video stream is activated, you can click the video stream name to view detailedinformation, including the real-time streams, stream push URL, and stream capture URL.If the video stream is not activated, it cannot be viewed.

NOTE

l Stream Push URL: Used to push video streams from the client to the VIS console.For example, if the stream push URL is rtmp://10.154.75.3:47/vis/huawei_rtmp, the streampushing command of the open source tool FFmpeg is as follows:ffmpeg -stream_loop -1 -re -i huaweiyun.flv -vcodec copy -acodec aac -ar 44100 -f flvrtmp://10.154.75.3:47/vis/huawei_rtmp

l Stream Capture URL: Used for the user client to capture video streams.

4.3 Video RetentionThe video retention function is used to save the real-time video stream data for subsequentanalysis or viewing.

By default, newly created video streams are not retained. Video streams can be retained onlywhen they are in the Active state. Currently, video streams in VIS can be retained to OBS.

Retention Process1. Log in to the VIS management console.

1. In the navigation pane on the left, click Video Stream Management, locate theactivated video streams that you want to retain, and click Start Retention in theOperation column.– If the video stream is retained for the first time, the system prompts you to grant the

permission to operate OBS on VIS, that is, OBS authorization. Perform operationsas prompted.

– During OBS authorization, if the system shows that the number of agencies reachesthe upper limit, log in to the Identity and Access Management (IAM) serviceconsole to delete or create agencies.

Video Ingestion ServiceUser Guide 4 Ingesting the RTMP Video Stream to VIS

Issue 01 (2019-06-07) Copyright © Huawei Technologies Co., Ltd. 21

Page 25: User Guide - support.huaweicloud.com · Perform operations on the configuration management page of the device (IP cameras or NVR devices). 3.Creating a Video Invitation After the

– You only need to perform the operation once.2. After the OBS authorization is successful, set the Retention Period (h), Fragment

Length (m), and Retention OBS Path for video retention.If you select Save Permanently, you only need to select the Retention OBS Path.

Figure 4-3 Retention details

3. In the OBS bucket, the video path is named in the following format: OBS path/Videostream name/Year/Month/Day/Hour/startmin.sec_endmin.sec.flv.For example, according to Figure 4-4, a video file named 0255_3254.flv means that theretention duration is about 30 minutes and the video fragment is from 01:02:55 to01:32:54 on February 19, 2019.During video fragment generation, the length of each video fragment may have an errorof 1 to 2 seconds due to different relative positions of key frames.

Figure 4-4 Video retention path

Video Ingestion ServiceUser Guide 4 Ingesting the RTMP Video Stream to VIS

Issue 01 (2019-06-07) Copyright © Huawei Technologies Co., Ltd. 22

Page 26: User Guide - support.huaweicloud.com · Perform operations on the configuration management page of the device (IP cameras or NVR devices). 3.Creating a Video Invitation After the

A Change History

Released On Description

2019-06-07 This issue is the first official release.

Video Ingestion ServiceUser Guide A Change History

Issue 01 (2019-06-07) Copyright © Huawei Technologies Co., Ltd. 23