Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to troubleshoot and analyze how the screen gets stuck after C++ compiled WebRTC video is played for a few seconds

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces "how to troubleshoot and analyze how the picture gets stuck after C++ compiled WebRTC video is played for a few seconds". In daily operation, it is believed that many people have doubts about how to troubleshoot and analyze problems after C++ compiled WebRTC video is played for a few seconds. The editor consulted all kinds of materials and sorted out a simple and useful method of operation. Hope to answer the "C++ compiled WebRTC video playback a few seconds after the screen jammed how to troubleshoot the analysis" of the doubt to help! Next, please follow the editor to study!

In the process of compiling WebRTC, we solved the problem that C++ failed to compile WEBRTC video playback project to obtain sdp session description. After solving this problem, after re-establishing the SDP session description, the video was added successfully, but the screen will be stuck during actual playback.

When testing C++ WebRTC playback, after playing for about 4'6s, the screen will stop playing and remain stuck in the last frame. The error is as follows: (video_receive_stream.cc:659): No decodable frame in 3000 ms, requesting keyframe.

The error means that the picture is played for a period of time and there is no decodable frame within 3000 milliseconds, so the request for a key frame fails.

We need to check in the code whether all of the following printed files exist:

You can see that the printed information file is basically found.

The reason for the problem is that the sps and pps information cannot be obtained by H264 decoding, which makes it impossible to decode. Generally speaking, the keyframe of the camera hair H264 will have an I frame every 1s, which will prevent the picture from being discontinuous. But if you use camera connection request in WebRTC, you will not take the initiative to get the Keyframe. Instead, you need to request the Keyframe through the code implementation and let the WebRTC know.

Therefore, the key to repair here is to clear the cached data (RemovePacketsUntilKeyFrame function) before requesting keyframes (RequestKeyFrame function) when WebRTC requests keyframes.

At this point, on the "C++ compiled WebRTC video playback a few seconds after the screen jammed how to troubleshoot analysis" study, I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report