当前位置:网站首页>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
边栏推荐
- What is cloud desktop and how to connect to the server? What does the mainstream architecture of cloud desktop include?
- 2022-2028 global pilot night vision goggle industry research and trend analysis report
- [summary of interview questions] zj5
- Grpc: how to implement distributed log tracing?
- The cost of on-site development of software talent outsourcing is higher than that of software project outsourcing. Why
- Sorting out of key vulnerabilities identified by CMS in the peripheral management of red team (I)
- What is the price of the elastic public network IP bandwidth
- How to check the progress of trademark registration? Where can I find it?
- [see you] on October 24, we met at Tencent Binhai building
- Why can't the fortress machine log in? What are the ways to solve the problem
猜你喜欢

Ar 3D map technology

Simple and beautiful weather code
![[51nod] 3047 displacement operation](/img/cb/9380337adbc09c54a5b984cab7d3b8.jpg)
[51nod] 3047 displacement operation

The cost of on-site development of software talent outsourcing is higher than that of software project outsourcing. Why
![[51nod] 3216 Awards](/img/94/fdb32434d1343040d711c76568b281.jpg)
[51nod] 3216 Awards
![[51nod] 2106 an odd number times](/img/af/59b441420aa4f12fd50f5062a83fae.jpg)
[51nod] 2106 an odd number times

2022-2028 global aircraft front wheel steering system industry research and trend analysis report
![[51nod] 2102 or minus and](/img/68/0d966b0322ac1517dd2800234d386d.jpg)
[51nod] 2102 or minus and

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

2022-2028 global anti counterfeiting label industry research and trend analysis report
随机推荐
Under what circumstances do you need a fortress machine? What are the functions of a fortress machine
How to build a shopping website? What problems should be paid attention to in the construction of shopping websites?
How much is a fortress machine? Why do you need a fortress machine?
How to check the progress of trademark registration? Where can I find it?
What technology does cloud computing elasticity scale? What are the advantages of elastic scaling in cloud computing?
Cp/rm/mv parameters
Where is the cloud game server? Can individuals rent cloud game servers?
Tencent cloud CIF engineering effectiveness summit was successfully opened, and coding released a series of new products
Can elastic public IP be bound to a home server? The difference between elastic public IP and fixed IP
Why can't cloud games connect to the server? What if the cloud game fails to connect to the server?
System design: File Hosting Service
The server size of the cloud desktop. The cloud desktop faces the server configuration requirements
Grp: how to gracefully shutdown a process?
Why install code signing certificate to scan and eliminate virus software from security
[Tencent cloud] how can the MySQL database on the cloud fully back up the data base script?
[51nod] 2102 or minus and
What are the security guarantees for cloud desktop servers? What are the cloud desktop server platforms?
JMeter uses JDBC to perform database pressure test
Why do I need a code signing certificate? Where can I get a code signing certificate?
Tencent cloud CIF engineering efficiency summit ends perfectly