To protect the information security of live streaming, push authentication is enabled for CSS push domain names by default. You can use the push address generator on the push address details page to generate a push URL. Then, you can use the URL to push the stream (upload the live streaming video) to the CSS platform.
- CSS provides a test domain name
xxxx.livepush.myqcloud.com. You can use it for push testing, but we do not recommend using it as the push domain name for your real business.
- CSS can only generate push URLs in RTMP format.
- The generated push URL is valid before the set expiration time. You can generate a new URL after the old one expires.
You have signed up for a Tencent Cloud account and completed identity verification. Unverified users cannot purchase CSS instances in the Chinese mainland.
- Go to Domain Management, click the target push domain name or click Manage to enter the domain details page.
- Click Push Configuration, view the Authentication Configuration section, and click Edit on the right.
- On the Authentication Configuration page, toggle to enable or disable push configuration.
- Enter the primary key and backup key, and click Save.
Primary key is required and backup key is optional. Entering both allows you to switch keys when one key is disclosed.
Push Address Generator
- Go to Domain Management, click the target domain name or click Manage on its right to enter its details page.
- Select Push Configuration > Push Address Generator and configure as follows:
- Select an expiration time, such as
- Enter a custom
StreamName, such as
- Click Generate Push Address to generate an RTMP push URL containing the
- You can test, disable, or delete a stream in Stream Management after live push.
- After the push URL is generated, you can use it to initiate live push. To view live streaming, you should use a playback URL. For more information, please see Playback Configuration.
Notes on Push URL
RTMP push URL format:
domain: push domain name
AppName: live streaming application name, which is
live by default and customizable
StreamName: custom stream name used to identify a live stream
txSecret: authentication string generated after push authentication is enabled
txTime: expiration timestamp set for a push URL configured in the console
- If you have enabled authentication for the domain name, the actual URL expiration time will be
txTime plus the
key validity period.
Sample Code of Push URL
Sample code for generating a push URL in PHP and Java is provided for your reference, which can be viewed by performing the following steps:
- Log in to the CSS console and click Domain Management.
- Select a push domain name or click Manage on the right to enter its details page.
- Select Push Configuration and scroll down to find Push Address Sample Code.
- Click the tab to view the PHP/Java sample code accordingly.