tencent cloud

Feedback

Push and Playback

Last updated: 2023-10-09 16:04:31

    Is there an upper limit on the number of concurrent viewers?

    By default, CSS does not limit the number of online viewers for a live stream as long as the network and other conditions permit. However, if you have configured a bandwidth limit, new viewers cannot watch the live stream if there are so many existing viewers that the bandwidth limit is exceeded. In this case, the number of online viewers is limited.

    How do I use the live transcoding feature?

    You can go to Live Transcoding to configure transcoding templates with different bitrates and resolutions for different network conditions. For more information on transcoding, see Live Remuxing and Transcoding.

    Original definition, HD, and SD

    The three commonly used playback bitrates for original, HD, and SD streams are as follows:
    For original, the playback bitrate is the same as the bitrate used for push.
    For HD, the recommended playback bitrate and resolution are 2,000 Kbps and 1080p.
    For SD, the recommended bitrate and resolution are 1,000 Kbps and 720p.

    How do I use time shifting?

    You can use the time shifting feature to rewind and play a video stream from earlier time points. The feature currently only supports the HLS protocol. For more information on time shifting and how to activate it, see Time Shifting.

    How can I use HTTPS for playback?

    To make your playback domain support HTTPS, make sure you have a valid certificate and private key, go to Domain Management, find the target playback domain, click Manage, and select Advanced Configuration > HTTPS Configuration to add an HTTPS configuration. The configuration takes effect in about 2 hours.

    How can I use a cache node outside the Chinese mainland for playback?

    CSS provides stable CDN nodes across the Chinese mainland and around the world. If your end users are located outside the Chinese mainland, you can select Global or Outside Chinese mainland for Acceleration region when adding domains in Domain Management.
    To prevent potential losses caused by unauthorized users using your URLs for playback and stealing your Tencent Cloud traffic, we strongly recommend you enable hotlink protection for your playback URLs. Hotlink protection is determined by four parameters: txTime, key (hash key), txSecret, and the validity period.
    Hotlink Protection Parameter
    Description
    Remarks
    txTime
    The expiration time of the playback URL.
    It must be a Unix hexadecimal timestamp.
    Playback is allowed only if txTime is later than when a request is sent.
    key
    The MD5 key.
    This parameter is customizable. You can set a primary and a backup key.
    If your primary key is disclosed, you can use the backup key to splice playback URLs while changing the primary key.
    txSecret
    The encryption parameter in the playback URL.
    The value of this parameter is calculated based on key, StreamName, and txTime using the MD5 algorithm.
    txSecret = MD5 (key+StreamName+txTime)
    Validity period
    The authentication validity period.
    It must be greater than 0.
    If you set txTime to the current time and the validity period to 300s, the URL expiration time is the current time plus 300s.
    Three parameters are needed to generate a hotlink protection URL: key (a random string), StreamName (the stream name), and txTime (in hexadecimal format). Assume that you set key to somestring, StreamName to test, txTime to 5c2acacc (2019-01-01 10:05:00), the HD bitrate to 900 Kbps, and the name of the transcoding template to 900. The playback URL of the original stream is:
    txSecret = MD5(somestringtest5c2acacc) = b77e812107e1d8b8f247885a46e1bd34
    http://domain/live/test.flv?txTime=5c2acacc&txSecret=b77e812107e1d8b8f247885a46e1bd34
    http://domain/live/test.m3u8?txTime=5c2acacc&txSecret=b77e812107e1d8b8f247885a46e1bd34
    The playback URL of the HD stream is:
    txSecret = MD5(somestringtest_9005c2acacc) = 4beae959b16c77da6a65c7edda1dfefe
    http://domain/live/test_900.flv?txTime=5c2acacc&txSecret=4beae959b16c77da6a65c7edda1dfefe
    http://domain/live/test_900.m3u8?txTime=5c2acacc&txSecret=4beae959b16c77da6a65c7edda1dfefe
    1. Select Domain Management, and click the target playback domain name or click Manage on the right to enter the domain management page.
    2. Select the Access Control tab. In the Key Authentication area, toggle on Playback Authentication.
    3. Complete the settings in the pop-up window.
    4. Click Save to save the configuration.
    Caution
    It takes 30 minutes for the configuration to take effect.
    HTTP-FLV: Ongoing playback can continue even after txTime, but new playback requests will be rejected.
    HLS: With HLS, a stream is broken into short chunks, and TS segments are requested as playback continues. Therefore, if you set txTime to 10 minutes after the current time, playback will be rejected after 10 minutes. To avoid this, you can update the HLS request URL dynamically on the server or set a longer validity period.

    What are the format requirements for a primary key for playback authentication? Is there any limit on its validity period?

    The primary key can contain only letters and digits, with up to 256 characters. For details, please see Playback Authentication Configuration. We recommend that you set its validity period to the duration of a live streaming session.

    Can I generate a push URL that is valid for a long time? What is the upper limit of the validity period?

    If you set the validity period too long, others may use your URL for push without your authorization. There is no limit on the validity period of a push address. You can have your server automatically splice push URLs to generate URLs with longer validity periods. For detailed directions, see Splicing Live Streaming URLs.
    Note
    We do not recommend you set a very long validity period. It may cause errors and authentication failures.

    Will the Tencent Cloud logo be displayed on the live streaming image?

    No.

    How long is the latency in live streaming?

    Normally, the latency of playing an FLV stream that is pushed over RTMP is around 2-3 seconds. If your playback latency is exceptionally high, please refer to Troubleshooting High Latency to troubleshoot the issue.

    Can I modify the maximum bitrate during live streaming?

    No. You can set it only before pushing a stream. The bitrate depends on your upload speed. Setting it too high may cause dropped frames and stuttering.

    How do I delete a live streaming room which is no longer used?

    Live push and playback are bound with stream IDs, so you do not need to delete rooms. If you are using the IM service and want to delete IM rooms to avoid reaching the maximum number of rooms, see Disbanding a Group. If you are using channel mode, you can call the DeleteLVBChannel API to delete channels (you need to pass in the IDs of the channels you want to delete).
    Caution
    Channel mode is a legacy mode which is no longer updated or maintained.

    When do I use the push enabling/disabling API?

    You can use the API to disable a live stream when pornographic or other inappropriate content is detected. For details, see ForbidLiveStream.

    How do I implement playback in the background?

    Background playback allows the audio of a live stream to continue even when your app runs in the background. This feature depends on the playback device and should be implemented based on your actual business logic.

    What should I do if the "incorrect certificate" error occurs when I modify my HTTPS configuration?

    CSS uses Nginx for encryption, so make sure your certificate type is Nginx.

    Why do my playback URLs stop working after I disable playback authentication?

    An authentication-enabled playback URL will become invalid after authentication is disabled, even if the validity period has not elapsed.

    What are API rate limits?

    CSS sets an upper limit on the total number of requests sent by all SecretId under an account. After the limit is reached, new requests will not be responded to. For example, an upper limit of 200 requests per second indicates that the Tencent Cloud server can receive up to 200 requests sent by all SecretId under your account within one second. It doesn’t matter whether the requests are sent by one or more users, or whether they query one or multiple streams.

    The "RTMP close" error occurs when I push streams, but the log says the push is successful. What should I do?

    The problem may lie in your push URL. You can use our TCToolkit app to test whether the URL works normally. For more solutions, see Troubleshooting Push Failure.

    I failed to push streams after changing the frame rate, had to restart the service multiple times, and was frequently disconnected. What should I do?

    You may have set the frame rate too high. A frame rate higher than 15 fps is enough to ensure smooth playback. Try reducing the frame rate.

    If a stream has no data for a long time, when will it be disconnected?

    A stream may have no data for a long time when there is a push problem, for example, if the app crashes or the phone is turned off. In such cases, if the backend doesn’t receive any data for 70 seconds, it will disconnect the stream.

    How do I configure an API key in the new console?

    API keys are used for the authentication of legacy APIs. We have updated our APIs to v3.0. To use the new APIs, go to Manage API Key to get the SecretId and Secretkey.

    Why can’t I play a H.265-encoded video?

    H.265 is supported by fewer browsers than H.264, and playback may fail if your browser does not support H.265. You can configure a transcoding template to transcode the video to H.264.

    Can the names of M3U8 files contain Chinese characters?

    M3U8 files are named automatically based on stream names. Stream names do not support Chinese characters.

    How do I view the number of online viewers?

    You can get the number of online viewers by calling the DescribeStreamPlayInfoList API, but the result may not be 100% accurate. For example, if three users use the same IP address for playback at the same time, they will be counted as one viewer. Note that the data returned by this API is relevant only if your playback protocol is RTMP or FLV, not if it is HLS.

    Does CSS support backup streams?

    Backup streams are enabled by default with CSS. If you push two streams using the same stream name at the same time, during playback, only the first stream will be visible. If this stream is interrupted, the second stream will become visible.

    Can I add different watermarks for the same push domain?

    No, you can’t. You can bind only one watermark template to each push domain.

    How do I view users’ playback durations?

    You cannot view users’ playback durations currently.
    

    Can users watch my live streams if I don’t transcode the streams?

    Yes. Playback is based on playback URLs and is possible even if you don’t transcode the streams (as long as the URL is valid).
    

    What factors affect the time to the first frame?

    The time to the first frame depends mainly on the number of viewers. The more viewers, the higher the cache hit ratio and the shorter the time to the first frame.

    Can I create a blocklist/allowlist for playback?

    You can configure a custom IP allowlist or blocklist to control access to your live streams based on IP addresses. For detailed directions, see Configuring IP Allowlist/Blocklist.
    IP allowlist: Only IP addresses on the list can access your streaming content.
    IP blocklist: IP addresses on the list cannot access your streaming content.

    How many screenshots are taken for porn detection?

    CSS identifies pornographic content based on screenshots. The number of screenshots taken for porn detection depends on the screenshot interval, which you can set in Live Screencapture & Porn Detection of the CSS console.
    Note
    The default screenshot interval during push is two seconds. Value range: 2-300 (seconds).

    How do I query my billable bandwidth and traffic?

    You can use the DescribeBillBandwidthAndFluxList API to query the data.

    How do I know if push is successful?

    If push is successful, the stream generated will appear in Stream Management > Live Streams of the CSS console.
    You can also call the DescribeLiveStreamState API to query stream status.
    Note
    When push or playback fails, you can use the self-diagnosis tool of the CSS console to troubleshoot the issue. For details, see Self-Diagnosis.

    Can I push audio-only streams?

    CSS supports pushing audio-only streams (streaming software is required). You can also create audio-only transcoding templates.

    How do I query live streaming durations?

    You can call an RESTful API to query the data. For details, see DescribeStreamPlayInfoList.

    How do I query the duration of an active stream?

    CSS does not offer an API to query the duration of an active stream. You can calculate the duration based on the callbacks for push and stream interruption.

    How do I query the viewers of a live stream?

    You can query the viewers of a live stream using either of two methods:
    Go to the CSS console, select Data Center > Stream Data Query on the left sidebar, and click Playback Data to view the number of concurrent connections.
    Note
    The number of concurrent connections equals the number of online viewers only if the playback protocol is RTMP or FLV.
    Call the DescribeStreamPlayInfoList API to get the number of online viewers.

    If I’m disconnected after pushing a stream, will I receive the callback for stream interruption?

    You need to configure the callback for stream interruption first. If a stream is interrupted by a network disconnection, the system will try to resume the stream automatically. If the stream is resumed within 70 seconds, you will not receive the callback for stream interruption. If the system fails to resume the stream within 70 seconds, it will disconnect the stream, and you will receive the stream interruption callback.

    Do I need to use the same protocol for push and playback?

    No. You can use RTMP for push and RTMP, FLV, HLS, or UDP for playback.

    Why can’t I play videos from CDNs when I use a wireless network?

    Check the following:
    Check whether your wireless network has blocked Tencent Cloud’s IP addresses.
    If you use iPhone, make sure you have allowed the app to use Wi-Fi.
    If the above does not solve your problem, please contact Tencent Cloud technical support.

    I configured HTTPS for my playback domain, so why did playback fail?

    Check the following:
    Make sure you have uploaded a certificate.
    Check your certificate upload time. After configuring HTTPS, please wait about two hours before accessing the domain.
    Note
    If the above does not solve your problem, try using the self-diagnosis tool of the CSS console to identify the issue. For detailed directions, see Self-Diagnosis.

    With LEB, how do I change the resolution of hosts during live streaming?

    LEB is a playback solution, while hosts are at the push end. To change the resolution of hosts, you need to create a transcoding template and bind it to your domain before playback.
    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