tencent cloud

14天试用边缘安全加速平台 EO 限时免费

Feedback

Tencent Cloud AI Digital Human

Creating a New Live Stream Session

Last updated: 2025-01-17 16:23:25
It is used to create a new video stream and obtain the playback URL for the digital human video.

Calling Protocol

HTTPS + JSON
POST /v2/ivh/sessionmanager/sessionmanagerservice/createsession
Header Content-Type: application/json;charset=utf-8

Request Parameters

Parameter Name
Type
Required
Description
ReqId
String
Yes
Unique identifier for each request, a 32-character UUID.
SessionId
String
No
A unique identifier for the session. The SaaS environment does not allow input from the cloud; the Private Environment allows input.
VirtualmanProjectId
String
Yes
The ID for the digital human project. (It is the same as the previous VirtualmanKey.)
UserId
String
Yes
The unique identifier for the user, maintained by the caller. Creating a new stream with the same UserIdentifier will cause the previous stream with that UserIdentifier to close.
Protocol
String
Yes
Currently supported parameters: rtmp, trtc and webrtc
DriverType
int
Yes
The driving method for the digital human.
1: text-only driving;
3: audio driving (original voice), which supports both audio and text driving modes in this setting;
ProtocolOption
No
Custom parameters for the protocol; ignore trtc if it is not used.

ProtocolOption

Name
Type
Required
Description
TrtcUseExternalApp
boolean
No
It indicates whether to use an external trtc. If you do not use it, the unified trtc appid of the digital human platform will be used.
Notes:
When the unified trtc appid of the digital human platform is used, it is limited to the debugging stage and cannot be used in the production stage.
TrtcAppId
string
No
The trtc appid (required when using an external trtc appid).
TrtcRoomId
int
No
The trtc room ID (The room ID will be assigned by the cloud if it is not specified.).
TrtcUserSig
string
No
The trtc AI Digital Human user signature (required when using an external trtc appid).
TrtcPrivateMapKey
string
No
The trtc AI Digital Human user permission key (required when using an external trtc appid).
CssCustomPushUrl
string
Yes
Custom Cloud Streaming Services (CSS) streaming URL. The streaming protocol is fixed to use rtmp. By using rtmp to push the stream to CSS, various pull protocols supported by CSS can be used for playback. The required format for the streaming URL is:
rtmp://xyz.com/cssAppName/streamid?txSecret={0}&txTime={1} For the calculation method of txSecret and txTime, see https://cloud.tencent.com/document/product/267/32720

ExtraInfo

Name
Type
Required
Description
AlphaChannelEnable
bool
No
Enable original video concatenation alpha to output video stream.
Notes:
Assuming the original output width is iW, the actual video stream width is: iW + pW + iW.
pW is the middle padding width: (16 - iW%16) % 16
alpha video width starting point: iW + pW
alpha video width: iW



Response Parameter

Name
Type
Required
Description
ReqId
String
Yes
Unique identifier for a single request.
SessionId
String
Yes
Unique identifier for the session
SessionStatus
int
Yes
Status:
1: In progress (ready), the cache hit directly provides the playback URL.
3: Preparing (not ready), the cache missed requires waiting for model to load. Use the Querying the Session Status API to poll the session status until the stream status changes to 1. This usually takes no more than 2 minutes.
PlayStreamAddr
String
No
The playback URL, in the format: rtmp://liveplay.ivh.qq.com/live/m789
This field will not be returned if a custom CSS streaming URL is specified through the CssCustomPushUrl parameter.

Request Sample

{ "Header": { }, "Payload": { "ReqId": "f2612aa810014e8997f95bda97917268", "VirtualmanProjectId": "1b2c9f1c268a4edfbf6c6274da31bc5d", "UserId": "f2612aa810014e8997f95bda97917268", "Protocol": "rtmp", "DriverType": 1 } }

Response Sample

{
"Header": {
"Code": 0,
"Message": "",
"RequestID": "123",
},
"Payload": {
"ReqId": "d7aa08da33dd4a662ad5be508c5b77cf",
"SessionId": "m789",
"SessionStatus": 1,
"PlayStreamAddr": "rtmp://live.qq.com/live/m789"
}
}


Catalog

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support
中国香港
+852 800 906 020 (免费)
美国
+1 844 606 0804 (免费)
英国
+44 808 196 4551 (免费)
加拿大
+1 888 605 7930 (免费)
澳大利亚
+61 1300 986 386 (免费)
EdgeOne 热线
+852 300 80699
更多本地服务热线陆续新增中