当前位置:网站首页>Summary of common problems of real-time audio and video TRTC - quality
Summary of common problems of real-time audio and video TRTC - quality
2022-06-24 03:20:00 【Tencent video cloud Zachary】
Tencent real time audio and video (Tencent Real-Time Communication,TRTC) Tencent cloud is based on QQ Over the past decade, he has accumulated experience in audio and video communication technology , Combined with Tencent browsing service TBS WebRTC Ability and Tencent real-time audio and video SDK , Provide customers with multi platform interoperability, high-quality and customizable services ** Real time audio and video interworking service ** Solution .
In order to facilitate developers' technology selection 、 Development integration , The following is a summary of different problem scenarios TRTC FAQ summary , It will be updated continuously in the future , Welcome to feedback .
- Consulting questions
- Integrated access
- WebRTC piece
- Small program
- Electron piece
- Flutter piece
- Record mixed flow problems
- Quality
- Billing
Quality
1. Play the remote audience picture with a black edge
As shown in the following code , Play the picture rendering mode selection of the remote audience TRTC_VIDEO_RENDER_MODE_FIT Pattern , When rendering controls View When the aspect ratio of is inconsistent with that of the video , There are black edges .
- Android Sample code
mTRTCCloud.setRemoteViewFillMode(userId, TRTCCloudDef.TRTC_VIDEO_RENDER_MODE_FIT); mTRTCCloud.startRemoteView(userId, renderView);
- iOS Sample code
[_trtc startRemoteView:userId view:remoteView]; [_trtc setRemoteViewFillMode:userId mode:TRTCVideoFillMode_Fit];
Solution :
1. Make sure that the rendering controls View The width and height are consistent with the video width and height
2. Rendering mode selection TRTC_VIDEO_RENDER_MODE_FIT, But the picture may be stretched and cropped .
2. Play the remote audience picture and Caton appears
1. Check the network , It is recommended to replace the network
2. find roomid、userid , Then go to the console Monitoring instrument cluster , Independently query the user's stuck status .
3. Failed to turn on the camera
- Confirm whether the camera permission is granted
- If the device is a TV 、 Boxes, etc , The camera used is externally connected . at present TRTCSDK It supports the identification of external cameras . therefore , It is necessary to confirm whether the camera connector and the equipment are in good contact .
4. preview / The playback screen will rotate
Use TRTCSDK Camera acquisition
- Proposed update SDK Version to the latest version .
- In case of special equipment , You can use the local preview screen to render the angle interface
setLocalViewRotation, Rendering angle interface of remote video picturesetRemoteViewRotation, Set the image rendering angle interface output by the encodersetVideoEncoderRotationAdjustment . For the specific interface description file, see Video rotation
Use custom video capture
- Proposed update SDK Version to the latest version .
- Confirm that the angle of the video picture to be collected is correct .
- Fill video data into TRTCSDK, To check whether or not to give
TRTCCloudDef.TRTCVideoFrameSet the rotation angle - In case of special equipment , You can use the local preview screen to render the angle interface
setLocalViewRotation, Rendering angle interface of remote video picturesetRemoteViewRotation, Set the image rendering angle interface output by the encodersetVideoEncoderRotationAdjustment . For the specific interface description file, see Video rotation
5. Video mirroring problem
Use the front camera for video calls , There will be a mirror effect , So the local preview and remote audience picture are upside down . If the developer wants to make the two images consistent , You can refer to the documentation Use the front camera for video calls , The local preview and remote viewer images are reversed ?
6. How to push the flow across the screen
Developers may use a TV device or push streaming across the screen due to the needs of the scene , Specific implementation can refer to Android TRTC Realize horizontal video call file .
7. Kill process , How to confirm whether the anchor is in the live broadcast ?
This scenario applies to iOS/Mac、Android 、Windows platform .
stay TRTC There are upstream users in the room , When an application process is killed or actively disconnected from the network , exceed 30 Seconds later , The anchor has not resumed streaming .TRTC Other users in the room will receive the anchor ( There are users who push upstream ) Exit the callback of the room .
8. A black screen appears in the live broadcast 、 Blurred screen 、 Green screen , What's the reason ?
The reason for the black screen :
1) Playback failed or decoding failed , See how to handle playback failure .
2) Metadata problem , such as metadata There is only audio stream information in , But the actual data includes both audio and video
video ; Or the initial data is only audio , But after playing for a period of time, video information is added . such
It is generally recommended to modify the source stream metadata Information .
3) There is no picture information in the video coding data , Just like SEI And so on , There is no picture for decoding , since
However, the screen went blank , This kind of video data is usually customized .
Blurred screen 、 The reason for the green screen :
1) It is usually lost I Frames cause , because P The frame and B The decoding of frames depends on I frame , If I The frame is lost ,
P The frame and B All frames will fail to decode , So the picture will spend the screen 、 Tardy shadow 、 Green screen, etc , Use different first The player is like ffplay、VLC、Potplayer Play the same stream at the same time , If the player has flowers screen 、 The green screen , Usually there is a problem with the audio and video source stream , You need to check the source stream .
2) Metadata change , Most players usually parse only once before decoding metadata Set decoding parameters , When the picture changes , For example, the resolution has changed , But the player decodes The number has not been reconfigured , It may lead to flower screen 、 Green screen , In this case , The best way is to push the stream end The coding parameters will not be changed during the live broadcast , So it won't cause metadata Modification of information .
3) Hardware codec compatibility problem , This kind of situation usually occurs in Android On the device , some Android The hardware codec of the device is not well implemented , Poor compatibility . This situation , The best way , Change soft weave soft Solution comparison .
4) The color format of the streaming end and the playback end is inconsistent, resulting in , For example, the streaming end uses NV12, The player supports I420, When decoding, it will be displayed as a flower screen because the color format is inconsistent 、 Green screen, etc . this Under different circumstances , Unify the color format at both ends of the push-pull stream .
9. TRTC What are the technical statistical indicators ?
This scenario applies to iOS/Mac、Android 、Windows platform .
SDK Provide callback methods onStatistics(TRTCStatistics statics), Every time 2 Technical indicators are returned once every second . Including current appCpu(App Of CPU Usage rate )、systemCpu( Of the current system CPU Usage rate )、rtt( Delay )、upLoss( Uplink packet loss rate )、downLoss( Downlink packet loss rate ) And audio and video statistics of local members and remote members , For specific parameters, please refer to TRTCStatistics Type description document .
Technical support
Dear Developer , If you encounter any problems in using the product , Welcome to cloud + Community and GitHub Ask or inquire about historical problems and solutions .
- ** cloud + Queries and questions on the Q & A pages of various products in the community :**
Real time audio and video :https://cloud.tencent.com/developer/tag/10373?entry=ask
Instant messaging :https://cloud.tencent.com/developer/tag/126?entry=ask
Live Mobile :https://cloud.tencent.com/developer/tag/10374?entry=ask
Short video :https://cloud.tencent.com/developer/tag/10375?entry=ask
Super player :https://cloud.tencent.com/developer/tag/10855?entry=ask
Interactive live broadcast :https://cloud.tencent.com/developer/tag/10379?entry=ask
- **GitHub Of issue page :**
Live Mobile :https://github.com/tencentyun/MLVBSDK/issues
Real time audio and video :https://github.com/tencentyun/TRTCSDK/issues
player :https://github.com/tencentyun/SuperPlayer\_Android/issues、https://github.com/tencentyun/SuperPlayer\_iOS/issues
Instant messaging IM:https://github.com/tencentyun/TIMSDK/issues
边栏推荐
- Sorting out of key vulnerabilities identified by CMS in the peripheral management of red team (I)
- How to select a server with appropriate configuration when planning to build a live broadcast platform
- How to build a shopping website? What problems should be paid attention to in the construction of shopping websites?
- Is the cloud game edge computing server highly required? What problems will occur during the use of cloud game edge computing server?
- RI Geng series: write a simple shell script, but it seems to have technical content
- What are the security guarantees for cloud desktop servers? What are the cloud desktop server platforms?
- What does elastic public IP mean? The advantages of elastic public IP
- [51nod] 2102 or minus and
- Community pycharm installation visual database
- Supply chain system platform: two management areas
猜你喜欢

Community pycharm installation visual database
![[summary of interview questions] zj6 redis](/img/4b/eadf66ca8d834f049f3546d348fa32.jpg)
[summary of interview questions] zj6 redis

The cost of on-site development of software talent outsourcing is higher than that of software project outsourcing. Why
![[51nod] 2653 section XOR](/img/2d/cb4bf4e14939ce432cac6d35b6a41b.jpg)
[51nod] 2653 section XOR

UI automation based on Selenium

On Sunday, I rolled up the uni app "uview excellent UI framework"

2022-2028 global aircraft wireless intercom system industry research and trend analysis report

2022-2028 global aircraft front wheel steering system industry research and trend analysis report

2022-2028 global high tibial osteotomy plate industry research and trend analysis report
![[51nod] 3216 Awards](/img/94/fdb32434d1343040d711c76568b281.jpg)
[51nod] 3216 Awards
随机推荐
How to install the cloud desktop security server certificate? What can cloud desktops do?
How much is a fortress machine? Why do you need a fortress machine?
Applicationclientprotocol of yarn source code
Grp: how to gracefully shutdown a process?
11111dasfada and I grew the problem hot hot I hot vasser shares
Simple and beautiful weather code
What does elastic scaling of cloud computing mean? What are the application scenarios for elastic scaling of cloud computing?
What protocol does FTP belong to in Fortress machine and how to use FTP in Fortress machine
2022-2028 global third-party data platform industry research and trend analysis report
How to build glasses website what are the functions of glasses website construction
EIP maximum EIP EIP remote desktop access
Chapter 6: UART echo case of PS bare metal and FreeRTOS case development
How does the fortress machine connect to the server? Which is easy to use, fortress machine or firewall?
Grpc: how do I start multiple ports?
What aspects does the intelligent identification system include? Is the technology of intelligent identification system mature now?
What is the edge calculator force? What about the edge calculator?
Highlights of future cloud native CIF Forum
UI automation based on Selenium
Grpc: how to reasonably manage log configuration?
Clickhouse optimize table comprehensive analysis