当前位置:网站首页>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
边栏推荐
- Liaoyuan social cloud primary actual combat camp test environment script
- Simple and beautiful weather code
- What is the fortress machine? What role does the fortress machine play?
- How does the fortress machine connect to the server? Which is easy to use, fortress machine or firewall?
- How to pair cloud game servers? Is the cloud game server expensive?
- Can elastic public IP be bound to a home server? The difference between elastic public IP and fixed IP
- If the cloud knows that security is important
- How to use elastic scaling in cloud computing? What are the functions?
- [51nod] 2106 an odd number times
- Principle of efficient animation Implementation-A preliminary exploration of jetpack compose
猜你喜欢

Get to know MySQL database

Simple and beautiful weather code

2022-2028 global high tibial osteotomy plate industry research and trend analysis report
![[51nod] 3395 n-bit gray code](/img/b5/2c072a11601de82cb92ade94672ecd.jpg)
[51nod] 3395 n-bit gray code

2022-2028 global genome editing mutation detection kit industry survey and trend analysis report

Ar 3D map technology

2022-2028 global anti counterfeiting label industry research and trend analysis report
![[51nod] 2102 or minus and](/img/68/0d966b0322ac1517dd2800234d386d.jpg)
[51nod] 2102 or minus and

2022-2028 global cell-based seafood industry research and trend analysis report
![[51nod] 3047 displacement operation](/img/cb/9380337adbc09c54a5b984cab7d3b8.jpg)
[51nod] 3047 displacement operation
随机推荐
How does the fortress machine connect to the server? Which is easy to use, fortress machine or firewall?
What does cloud desktop mean? What are the characteristics of cloud desktop?
Case analysis | interpret the truth that multi branch enterprises choose sd-wan network reconstruction in combination with real cases
Principle of efficient animation Implementation-A preliminary exploration of jetpack compose
What are the security guarantees for cloud desktop servers? What are the cloud desktop server platforms?
Clickhouse optimize table comprehensive analysis
Grpc: how to reasonably manage log configuration?
Grpc: how to implement distributed log tracing?
[summary of interview questions] zj6 redis
What is edge computing? What are the characteristics of the Internet platform edge calculator?
golang with script
The medical technology giant was blackmailed and Microsoft announced 74 security vulnerabilities | global network security hotspot
[hot] with a budget of only 100 yuan, how to build a 1-year web site on Tencent cloud??
14. Tencent cloud IOT device side learning - data template application development
Three Scheduling Strategies in yarn
Shopee Clickhouse cold and hot data separation storage architecture and Practice
JD Logistics: from giant baby to mainstay
Coding Ci of Devops
RI Geng series: write a simple shell script, but it seems to have technical content
Under what circumstances do you need a fortress machine? What are the functions of a fortress machine