Assembling a Streaming URL
After domain names are configured, you can assemble a streaming URL and play the video through the URL. You can also use the tool to quickly generate a signed URL of the streaming domain name.
Prerequisites
- The ingest domain name and streaming domain name have been added and associated.
- You have configured CNAME records at your domain names' DNS provider.
- To secure live resources, Live provides URL validation to encrypt and sign the streaming URL. If necessary, configure URL validation and stream the video through the signed URL. For details about how to configure URL validation, see URL Validation.
- You can transcode livestreams into video streams with different resolutions and bitrates to meet a broad range of requirements. If necessary, configure a transcoding template, and then use the streaming URL to play live video.
Procedure
- Log in to the Live console.
- In the navigation pane, choose Domains.
- Click Manage in the Operation column of the desired streaming domain name. On the displayed page, you can view streaming information.
Figure 1 Viewing the streaming URL
- You need to customize StreamName to generate a streaming URL. For details, see Original Streaming URL.
- If the original streaming URL is used and referer validation is configured, generate a signed streaming URL for the original one by referring to URL Validation.
- If the URL of the transcoded stream is used for livestreaming, you need to add _transcoding template ID to the end of StreamName in the original streaming URL to generate a new StreamName, and generate new authentication parameters by referring to URL Validation. Then you can assemble the streaming URL of the transcoded stream.
Original Streaming URL
Assembling rules
- Cloud Stream Live
You can play FLV, M3U8, and RTMP streams.
RTMP format: rtmp://Streaming domain name/AppName/StreamName FLV format: http://Streaming domain name/AppName/StreamName.flv M3U8 format: http://Streaming domain name/AppName/StreamName.m3u8
- LLL
You can only play WebRTC streams.
webrtc://Streaming domain name/AppName/StreamName
Parameters in the example:
- Streaming domain name is the one you added on the Live console.
- AppName: application name. The default value is live. You can customize the application name. Only letters, digits, underscores (_), and hyphens (-) are allowed.
- StreamName: livestream name. Multiple livestreams can be created for each application. You can customize the stream name.
Examples
- Cloud Stream Live
If the added streaming domain name is test-play.example.com, AppName is livetest, and StreamName is huawei1, the assembled streaming URL is:
RTMP format: rtmp://test-play.example.com/livetest/huawei1 FLV format: http://test-play.example.com/livetest/huawei1.flv M3U8 format: http://test-play.example.com/livetest/huawei1.m3u8
- LLL
If the added streaming domain name is test-play.example.com, AppName is livetest, and StreamName is huawei1, the assembled streaming URL is:
webrtc://test-play.example.com/livetest/huawei1
Signed Streaming URL
If URL validation is enabled, you must generate a signed streaming URL based on obtained authentication information and stream your content through the signed URL. For details, see URL Validation.
Transcoded Streaming URL
If you have configured transcoding, you must assemble a transcoded streaming URL. The URL needs to be set differently when URL validation is enabled or disabled.
Assembling rules
Add _Transcoding template ID to the end of the StreamName field in the original streaming URL and signed streaming URL.
- Cloud Stream Live
RTMP format: rtmp://Streaming domain name/AppName/StreamName_Transcoding template ID FLV format: http://Streaming domain name/AppName/StreamName_Transcoding template ID.flv M3U8 format: http://Streaming domain name/AppName/StreamName_Transcoding template ID.m3u8
- LLL
webrtc://Streaming domain name/AppName/StreamName_Transcoding template ID
Transcoding template ID: ID of the template used for live transcoding. The ID of a custom transcoding template can be customized. Log in to the Live console and choose Domains in the navigation pane. On the page displayed, click Manage in the Operation column of the desired ingest domain name. Then choose Templates > Transcoding in the navigation pane.
Examples
- The transcoded streaming URL is as follows when URL validation is disabled:
- Cloud Stream Live
http://test-play.example.com/livetest/huawei1_110.flv
- LLL
webrtc://test-play.example.com/livetest/huawei1_110
- Cloud Stream Live
- The transcoded streaming URL is as follows when URL validation is enabled:
- Cloud Stream Live
http://test-play.example.com/livetest/huawei1_110.flv?auth_info=z6uwSWUceM2%2FZeDpc2LqjhEFhhXpjQ5IQJhrLoIARQ2%2Bn%2BJV4DrzGRqXxWxMLQBU.44393135353831414132454633374139
- LLL
webrtc://test-play.example.com/livetest/huawei1_110?auth_info=z6uwSWUceM2%2FZeDpc2LqjhEFhhXpjQ5IQJhrLoIARQ2%2Bn%2BJV4DrzGRqXxWxMLQBU.44393135353831414132454633374139
For details about how to generate authentication information, see Signed Streaming URL.
- Cloud Stream Live
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot