提高了帧率,增强直播画质
This commit is contained in:
@@ -101,7 +101,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="请输入要查看的车机SN"
|
||||
android:text="F803EB2046PZD00149"
|
||||
android:text="F803BB2037EZD00048"
|
||||
android:textColor="#FFFF"
|
||||
app:layout_constraintBottom_toTopOf="@+id/liveToggleBtn"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
@@ -65,8 +65,8 @@ public class LiveStreamManagerImpl implements ILiveStreamManager {
|
||||
mLivePushConfig = MoGoLivePushConfig.getInstance();
|
||||
mLivePushConfig.setWidth(WIDTH);
|
||||
mLivePushConfig.setHeight(HEIGHT);
|
||||
mLivePushConfig.setVideoBitrate(1500);
|
||||
mLivePushConfig.setVideoFPS(15);
|
||||
mLivePushConfig.setVideoBitrate(5000);
|
||||
mLivePushConfig.setVideoFPS(25);
|
||||
mLivePushConfig.setAudioChannels(2);
|
||||
mLivePushConfig.setAudioSampleRate(44100);
|
||||
mLivePushConfig.setAudioFormat(AudioFormat.ENCODING_PCM_16BIT);
|
||||
|
||||
@@ -28,6 +28,7 @@ import im.zego.zegoexpress.constants.ZegoScenario;
|
||||
import im.zego.zegoexpress.constants.ZegoUpdateType;
|
||||
import im.zego.zegoexpress.constants.ZegoVideoBufferType;
|
||||
import im.zego.zegoexpress.constants.ZegoVideoCodecID;
|
||||
import im.zego.zegoexpress.constants.ZegoVideoConfigPreset;
|
||||
import im.zego.zegoexpress.constants.ZegoVideoFrameFormat;
|
||||
import im.zego.zegoexpress.constants.ZegoViewMode;
|
||||
import im.zego.zegoexpress.entity.ZegoCanvas;
|
||||
@@ -395,7 +396,7 @@ public class MoGoLiveManager {
|
||||
});
|
||||
|
||||
// 视频配追
|
||||
ZegoVideoConfig zegoVideoConfig = new ZegoVideoConfig();
|
||||
ZegoVideoConfig zegoVideoConfig = new ZegoVideoConfig(ZegoVideoConfigPreset.PRESET_720P);
|
||||
// 采集分辨率,控制摄像头图像采集的分辨率。SDK 要求将宽和高设置为偶数。
|
||||
zegoVideoConfig.setCaptureResolution(mLivePushConfig.getWidth(), mLivePushConfig.getHeight());
|
||||
// 编码分辨率,控制编码器编码推流的图像分辨率。SDK 要求将宽和高设置为偶数。推流前后设置均可生效
|
||||
@@ -408,6 +409,7 @@ public class MoGoLiveManager {
|
||||
zegoVideoConfig.setCodecID(ZegoVideoCodecID.DEFAULT);
|
||||
// 将视频信息设置到推流引擎
|
||||
mExpressEngine.setVideoConfig(zegoVideoConfig);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user