Giter Club home page Giter Club logo

Comments (4)

AFathi avatar AFathi commented on June 18, 2024 3

Hey @drawItForMe,

In order to retrieve the rendered frames in real-time you'll need to do the following:

  1. Include RenderARDelegate into your UIViewController class
class ViewController: UIViewController, RenderARDelegate {

} 
  1. Set renderAR to self
recorder?.renderAR = self
  1. Add delegate function
func frame(didRender buffer:CVPixelBuffer, with time:CMTime, using rawBuffer:CVPixelBuffer) {
// use `buffer` and push to RTMP server
}

The delegate function will return the rendered buffers you'll need to create a live video stream of your AR app.

Note:- Make sure to set onlyRenderWhileRecording to false when you start an RTMP session

recorder?.onlyRenderWhileRecording = false

-Ahmed

from arvideokit.

drawItForMe avatar drawItForMe commented on June 18, 2024

Thank you @AFathi, it helped me a lot!

For my streaming screen sharing app, I am using WebRTC (https://github.com/MattGson/SwiftWebRTC).
Do you know if I can retrieve the rendered frames in real-time in an other format instead of CVPixelBuffer please?

Eric

from arvideokit.

AFathi avatar AFathi commented on June 18, 2024

@drawItForMe, can you specify what kind of format do you need?

from arvideokit.

drawItForMe avatar drawItForMe commented on June 18, 2024

My bad, the issue is not from your side but from SwiftWebRTC. I don't know at all what is the format needed for WebRTC framework...

from arvideokit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.