Detailed Description
Calling
iv_avt_send_stream to send audio and video data returns an error. The causes for different error codes are different.Cause Analysis
Several common error codes have the following causes:
When the error code is -303, it indicates that the internal cache is full at this point, and data sending fails. Generally, this is due to network reasons, which cause the network speed to be lower than the data sending speed at this point.
When the error code is -305, it indicates that at least one of the three parameters
visitor, channel, video_res_type has a difference in parameter values from the value notified by iv_avt_start_real_play_cb.When the error code is -306, it indicates that the first video frame pushed into when starting push stream at the current bitrate is not an IDR frame.
When the error code is -308, it indicates that the input audio/video format is inconsistent with the format set by
iv_avt_get_av_enc_info_cb, or there is a problem with the format of the input data frame itself, resulting in the failure of streaming media protocol encapsulation.Solution
When error code -303 occurs, generally there will be a water level alarm before this error. It is required to reduce the bitrate. For the bitrate control method, please refer to Documentation Description.
When error code -305 occurs, users are advised to check whether there is an issue with their own code parameter configuration.
When error code -306 occurs, the first video frame pushed by the user needs to be an IDR frame. It can also be ignored. Wait for the encoder to normally generate an IDR frame. The SDK will discard the data frame that returned the error code.
When error code -308 occurs, firstly users are advised to detect whether the format set in the
iv_avt_get_av_enc_info_cb callback matches the actual data frame. If the error still occurs after matching, users need to save the saved data and analyze whether the format of the data is correct.