【问题标题】:Webrtc Android camera captureWebrtc Android 摄像头抓拍
【发布时间】:2018-07-11 19:03:09
【问题描述】:

什么

渲染相机源

另请参阅 Google 讨论:

https://groups.google.com/forum/#!searchin/discuss-webrtc/capturer$20android$20preview%7Csort:date/discuss-webrtc/sUIR23FftSU/5YIp7cO1BgAJ

用例

如果我在 2G 网络上,我应该看到我自己的高质量视频,而其他被呼叫者应该看到我像素化。

Apprtc Demo 是做什么的?

Apprtc Demo 呈现将在 peerConnection 上发送的 mediaStream videoTrack,而不是真正的 Camera feed。

我在做什么?

作为 Apprtc 演示

见解

有两种方法很有希望但没有帮助

  • VideoSource.adaptOutputFormat(width, height, fps)
  • CameraVideoCapturer.startCapture(宽度、高度、fps)

因为我是从 peerConnection 而不是从相机渲染的。

问题

您对我如何实现自己相机的渲染有任何想法吗?

【问题讨论】:

    标签: android mobile camera webrtc capture


    【解决方案1】:

    当您创建视频源时,您会将视频捕获器附加到它。

    例如。 localVideoSource = peerConnectionFactory.createVideoSource(videoCapturer);

    所以你必须实现接口org.webrtc.VideoCapturer 然后将其设置为视频源。

    从您的讨论中,我了解到您需要更好的质量,您可以通过在启动默认相机时设置自己的分辨率来避免自定义实现,如下所示:

    capturer.startCapture(widthRecording, heightRecording, fpsRecording);

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-12-31
      • 2020-11-14
      • 2015-02-21
      • 2020-07-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多