【问题标题】:Agora remote video too zoomed inAgora 远程视频也放大了
【发布时间】:2020-07-08 22:48:02
【问题描述】:

我正在使用 agora 进行一对多的直播。因此,我的代码中有一个广播者和多个受众。

  await AgoraRtcEngine.enableWebSdkInteroperability(true);
  AgoraRtcEngine.setParameters('{\"che.video.lowBitRateStreamParameter\": 
  {\"width\":320,\"height\":180,\"frameRate\":15,\"bitRate\":140}, 
  {\"che.video.keep_prerotation\":false},{\"che.video.local.camera_index\":1025}}');
 await AgoraRtcEngine.setChannelProfile(ChannelProfile.LiveBroadcasting);
 await AgoraRtcEngine.setClientRole(ClientRole.Audience);
 await AgoraRtcEngine.joinChannel(null, channelName, null, 0);

它工作正常。但问题是视频过于放大,因此无法使用。 在 stackoverflow 上还有一个关于这个问题的问题: Video stream is more zoomed than I'd like and isn't the same as the local stream view. How can I fix this?

对此接受的解决方案是:请在加入频道之前添加以下代码,这应该会有所帮助 -

setParameters:@"{\"che.video.keep_prerotation\":false}" setParameters:@"{\"che.video.local.camera_index\":1025}"

参考演示代码:https://github.com/AgoraIO-Community/Agora-Video-With-FaceUnity-iOS/blob/d777df2aac725bce120f9e8c4d599d026d2c9d79/AgoraWithFaceunity/Controllers/RoomViewController.m#L110

但对我来说,这个解决方案不起作用。如您所见,我已经按照答案的建议添加了参数。 甚至到 github 的链接也显示 404。 谁能帮我解决这个问题。

【问题讨论】:

    标签: flutter agora.io


    【解决方案1】:

    在参数中,您必须添加以下详细信息以及您提到的代码:

    setParameters("{"che.audio.live_for_comm":true}")
    

    也可以通过以下方式修复缩小的框架:

    1. 您可以通过调用来设置视频配置文件

      setVideoEncoderConfiguration()

    通过这个您可以设置您的视频配置文件。您可以在此处获取有关这些配置文件的详细信息:https://docs.agora.io/en/Video/API%20Reference/java/classio_1_1agora_1_1rtc_1_1video_1_1_video_encoder_configuration.html#a50e755074e254026b51dfaa2e3dc91d9

    1. 您也可以尝试将方向定义为横向或纵向,然后查看结果。

    2. 如果屏幕大小或文本大小增加,也可以在您的设备设置中将其更改回默认值并再次尝试运行。

    【讨论】:

    • 谢谢!我将方向更改为自适应并且它起作用了。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-10-05
    • 2016-12-27
    • 2023-04-05
    • 2020-12-29
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多