Stream ingest issues

最終更新日:2022-10-25 19:21:35

Table of Contents


Stream ingest refers to pushing your streams to CDNetworks’ ingest points through a third-party streaming tool (OBS Studio, etc.) or a push stream SDK. This article lists some possible causes that may lead to a stream ingest failure.

DNS Resolution Fails

After CDNetworks live streaming service is enabled, adding a domain name in the console, you will get a CNAME domain name allocated by CDNetworks. For example,the CNAME domain name is in the form of *.*gccdn.net. You need to add a CNAME record to your DNS resolution service provider to point your live streaming domain name to *.*gccdn.nset. Or you may ask your dedicated customer service for more details.

  1. You can check whether the CNAME configuration has taken effect on the self-service configuration page of the live streaming console. If “Enabled” is displayed in the Status column, then the configuration takes effect.

  2. You can also directly ping the live streaming domain name you just added. If it is redirected to *.*gccdn.net, it means that the CNAME configuration has taken effect, and the live video push stream domain name and pull stream domain name have also taken effect. If it prompts “Name or service not known”, it means that the resolution has not been successful. You can ask your dedicated customer service for more details.

Improper Encoder Settings

  1. Please check whether you have filled in the correct Server address(URL) and Stream Key to your encoder, where “Server” includes the push stream domain and App Names, Stream Key includes StreamName and QueryString parameters.

Notes:

  • The settings of OBS tool is taken here as an example, please refer to the description of the encoder you are actually using for the more details.
  • The Stream Key consists of StreamName and QueryString parameters. If any authentication is enabled, the authentication parameters should be included in the Stream Key as well. For example, with timestamp anti-hotlinking, you should also fill parameters wsTime in the Stream Key.
  1. It’s recommended using other encoders for a comparative testing to locate the incorrect settings when you have stream pushing problems.

Improper Audio/Video Formats

Make sure you are using a correct encoding format, H.264 for video and ACC for audio are common used encoding formats for live streaming. You can check the stream encoding format through ffmpeg, see the command below:

ffmpeg -i rtmp://[$Your_Domain]/[$App_Name]/[$Stream_Name]

Notes:

  • [$Your_Domain]: The domain name of the push stream.
  • [$App_Name]: application name, the AppName in the push stream address.
  • [$Stream_Name]: Stream name, StreamName in the push stream address.

Please make sure that your stream encoding format meets the above requirements. You can ask your customer service for help when you have questions of encoding formats.

Invalid Stream Name

In general, an unique stream name is required for each stream under an application name and it’s not allowed to push different streams with same stream name under one application name. When Server error: Failed to publish occurs, you should substitute your stream name with a valid one and then try to re-push the stream.

Notes:

Here we give an example of testing via ffmpeg.

Authentication Fails

After authentication features is enabled, related parameters are required for URLs of both stream ingestion and pulling . For example, parameters wsTime and wsSecret should be carried in the URL for timestamp anti-hotlinking. Any expired or invalid parameter will cause stream pushing failure and bring up the I/O error.
Here we give an example of authentication failure and show you how to test via ffmpeg.

A Banned Push Stream Address

CDNetworks live streaming service provides the function of prohibiting the push of a channel or the live stream corresponding to the host’s IP, that is, Prompt stream forbidding. If the push stream address is added to the blacklist, the next actions will not be successful. Please refer to the a

Table of Contents


Stream ingest refers to pushing your streams to CDNetworks’ ingest points through a third-party streaming tool (OBS Studio, etc.) or a push stream SDK. This article lists some possible causes that may lead to a stream ingest failure.

DNS Resolution Fails

After CDNetworks live streaming service is enabled, adding a domain name in the console, you will get a CNAME domain name allocated by CDNetworks. For example,the CNAME domain name is in the form of *.*gccdn.net. You need to add a CNAME record to your DNS resolution service provider to point your live streaming domain name to *.*gccdn.nset. Or you may ask your dedicated customer service for more details.

  1. You can check whether the CNAME configuration has taken effect on the self-service configuration page of the live streaming console. If “Enabled” is displayed in the Status column, then the configuration takes effect.

  2. You can also directly ping the live streaming domain name you just added. If it is redirected to *.*gccdn.net, it means that the CNAME configuration has taken effect, and the live video push stream domain name and pull stream domain name have also taken effect. If it prompts “Name or service not known”, it means that the resolution has not been successful. You can ask your dedicated customer service for more details.

Improper Encoder Settings

  1. Please check whether you have filled in the correct Server address(URL) and Stream Key to your encoder, where “Server” includes the push stream domain and App Names, Stream Key includes StreamName and QueryString parameters.

Notes:

  • The settings of OBS tool is taken here as an example, please refer to the description of the encoder you are actually using for the more details.
  • The Stream Key consists of StreamName and QueryString parameters. If any authentication is enabled, the authentication parameters should be included in the Stream Key as well. For example, with timestamp anti-hotlinking, you should also fill parameters wsTime in the Stream Key.
  1. It’s recommended using other encoders for a comparative testing to locate the incorrect settings when you have stream pushing problems.

Improper Audio/Video Formats

Make sure you are using a correct encoding format, H.264 for video and ACC for audio are common used encoding formats for live streaming. You can check the stream encoding format through ffmpeg, see the command below:

ffmpeg -i rtmp://[$Your_Domain]/[$App_Name]/[$Stream_Name]

Notes:

  • [$Your_Domain]: The domain name of the push stream.
  • [$App_Name]: application name, the AppName in the push stream address.
  • [$Stream_Name]: Stream name, StreamName in the push stream address.

Please make sure that your stream encoding format meets the above requirements. You can ask your customer service for help when you have questions of encoding formats.

Invalid Stream Name

In general, an unique stream name is required for each stream under an application name and it’s not allowed to push different streams with same stream name under one application name. When Server error: Failed to publish occurs, you should substitute your stream name with a valid one and then try to re-push the stream.

Notes:

Go and have a test with ffmpeg, as in the example below.

Authentication Fails

After authentication features is enabled, related parameters are required for URLs of both stream ingestion and pulling . For example, parameters wsTime and wsSecret should be carried in the URL for timestamp anti-hotlinking. Any expired or invalid parameter will cause stream pushing failure and bring up the I/O error.
Go and have a test with ffmpeg, as in the example below.

A Banned Push Stream Address

CDNetworks live streaming service provides the function of prohibiting the push of a channel or the live stream corresponding to the host’s IP, that is, Prompt stream forbidding. If the push stream address is added to the blacklist, the next actions will not be successful. Please refer to the following method to check whether the push stream address is in the blacklist:

CDNetworks provides Prompt Stream Forbidding to ban or resume target streams. The stream pushing will not work if your stream pushing URL is blocked over Prompt Stream Forbidding. Pleas check on console, through Prompt Stream Forbidding - Query Tasks, to check whether your stream pushing URL is in the blacklist.

To resume the streams, through Prompt stream forbidding - task creation(Create Task)page.

Bad Network Condition

In most cases, users fail to push a stream over the bad network conditions. Thus, we recommend having a self-check through the ways below:

  • Ping the stream ingest domain and see if there is any package lost in result.

  • Telnet to stream ingest domain at port 1935. If the connection fails, it may indicate a bad network condition. following method to check whether the push stream address is in the blacklist:

CDNetworks provides Prompt Stream Forbidding to ban or resume target streams. The stream pushing will not work if your stream pushing URL is blocked over Prompt Stream Forbidding. Pleas check on console, through Prompt Stream Forbidding - Query Tasks, to check whether your stream pushing URL is in the blacklist.

To resume the streams, through Prompt stream forbidding - task creation(Create Task)page.

Poor Network Condition

In most cases, users fail to push a stream over the bad network conditions. Thus, we recommend having a self-check through the ways below:

  • Ping the stream ingest domain and see if there is any package lost in result.

  • Telnet to stream ingest domain at port 1935. If the connection fails, it may indicate a bad network condition.