tencent cloud

Mobile Live Video Broadcasting

Release Notes and Announcements
TUILiveKit Release Notes
Live SDK Release Notes
User Guide
Product Introduction
Overview
Strengths
Performance Statistics
Concepts
Purchase Guide
TRTC Live Billing Overview
Billing of Video Live Component
Activating the Service (TUILiveKit)
Free Demo
Demo
Run Demo(TUILiveKit)
Integration Guide
Video Live Streaming
Preparation
Host Live Streaming
Audience Viewing
Live Stream List Live Stream List
Voice Chat Room
Preparation
Host Live Streaming
Audience Viewing
Live Stream List
Live Streaming Kit
Live Streaming Kit(Electron Desktop Application)
Live Streaming Kit(Web Desktop Browser)
Live Broadcast Monitoring
Monitoring Webpage (Web Desktop Browser React)
Monitoring Webpage (Web Desktop Browser Vue)
UI Customization
Live Stream Video Component
Video Source Editing Canvas
Audience List Component
Barrage Component
Media Source Configuration Panel
Link Management Panel
Live Gift Component
No UI Integration
Video Live Streaming
Voice Chat Room
Feature Guide
Follow Anchors (TUILiveKit)
Ultimate Image Quality (TUILiveKit)
Push Media Stream Into Room (TUILiveKit)
Gift System (TUILiveKit)
Client APIs
Android
iOS
Web
Server APIs (TUILiveKit)
Account System
REST API
Third-Party Webhooks
Error Codes (TUILiveKit)
FAQs
Platform Compilation
User Authentication
Live SDK
Product Introduction
Purchase Guide
Free Demo
Free Trial License
SDK Download
Licenses
Advanced Features
Client API
FAQs
Integration (No UI)
API Documentation
OSS information
OSS Attribution Notice

Setting Video Quality

포커스 모드
폰트 크기
마지막 업데이트 시간: 2024-01-13 15:49:41

Sample Code

Regarding frequently asked questions among developers, Tencent Cloud offers an easy-to-understand API example project, which you can use to quickly learn how to use different APIs.
Platform
GitHub Address
iOS
Android

Features

LiveAVSDK uses the setVideoQuality API provided by V2TXLivePusher to set video quality.

API definition

You can use setVideoQuality to set the resolution and resolution mode (landscape/portrait) of published video.
public abstract int setVideoQuality(V2TXLiveVideoEncoderParam param);

Parameters

Parameter
Type
Description
param
Video encoding parameters.
Enumerated values of V2TXLiveVideoResolution:
Value
Description
V2TXLiveVideoResolution160x160
Resolution: 160 × 160; bitrate: 100-150 Kbps; frame rate: 15 fps
V2TXLiveVideoResolution270x270
Resolution: 270 × 270; bitrate: 200-300 Kbps; frame rate: 15 fps
V2TXLiveVideoResolution480x480
Resolution: 480 × 480; bitrate: 350-525 Kbps; frame rate: 15 fps
V2TXLiveVideoResolution320x240
Resolution: 320 × 240; bitrate: 250-375 Kbps; frame rate: 15 fps
V2TXLiveVideoResolution480x360
Resolution: 480 × 360; bitrate: 400-600 Kbps; frame rate: 15 fps
V2TXLiveVideoResolution640x480
Resolution: 640 × 480; bitrate: 600-900 Kbps; frame rate: 15 fps
V2TXLiveVideoResolution320x180
Resolution: 320 × 180; bitrate: 250-400 Kbps; frame rate: 15 fps
V2TXLiveVideoResolution480x270
Resolution: 480 × 270; bitrate: 350-550 Kbps; frame rate: 15 fps
V2TXLiveVideoResolution640x360
Resolution: 640 × 360; bitrate: 500-900 Kbps; frame rate: 15 fps
V2TXLiveVideoResolution960x540
Resolution: 960 × 540; bitrate: 800-1500 Kbps; frame rate: 15 fps
V2TXLiveVideoResolution1280x720
Resolution: 1280 × 720; bitrate: 1000-1800 Kbps; frame rate: 15 fps
V2TXLiveVideoResolution1920x1080
Resolution: 1920 × 1080; bitrate: 2500-3000 Kbps; frame rate: 15 fps
Enumerated values of V2TXLiveVideoResolutionMode:
Value
Description
V2TXLiveVideoResolutionModeLandscape
Resolution in landscape mode: V2TXLiveVideoResolution640_360 + V2TXLiveVideoResolutionModeLandscape = 640 × 360
V2TXLiveVideoResolutionModePortrait
Resolution in portrait mode: V2TXLiveVideoResolution640_360 + V2TXLiveVideoResolutionModePortrait = 360 x 640
Application Scenario
resolution
resolutionMode
Live showroom
V2TXLiveVideoResolution960x540
V2TXLiveVideoResolution1280x720
Landscape or portrait
Live game streaming
V2TXLiveVideoResolution1280x720
Landscape or portrait
Mic connect (primary-stream image)
V2TXLiveVideoResolution640x360
Landscape or portrait
Mic connect (small image)
V2TXLiveVideoResolution480x360
Landscape or portrait
Blu-ray streaming
V2TXLiveVideoResolution1920x1080
Landscape or portrait

Note

For smoother mic connect experience, after mic connect starts, please call setVideoQuality() to set the host’s resolution to V2TXLiveVideoResolution640x360 and the mic-connecting audience’s resolution to V2TXLiveVideoResolution480x360. After mic connect ends, you can call setVideoQuality() again to set the resolutions to previous values.

FAQs

1. Why is the video delivered to audience not as clear as that watched by the host?

The video watched by the host is the raw data captured by the camera after pre-processing (beauty filter application, mirroring, clipping, etc.) and therefore is of high quality. However, the video watched by audience has been compressed and then decoded by the codec. Encoding compromises video quality (the lower the target resolution, the more the video is compressed), which is why the video delivered to audience is not as clear as that watched by the host.

2. Why does V2TXLivePusher sometimes publish video at a resolution of 368 × 640 or 544 × 960?

If you enable hardware acceleration, the video published may have atypical resolutions such as 368 × 640 or 544 × 960. This is because some hardware encoders do not allow resolutions that aren’t a multiple of 16. You can change the fill mode of the player to get rid of black bars.

도움말 및 지원

문제 해결에 도움이 되었나요?

피드백