Video recording is possible in react native app

Hi @RaananW @Cedric @jeremy-coleman Video recording is possible with babylonjs react native in mobile app

Is video recording is supported in babylonjs react native?

Please be patient as today is a holiday on Europe so a lot of folks are off :slight_smile:

1 Like

cc @ryantrem

It depends on what you mean by video recording. If you mean being able to record the rendering into a video, then we have a NativeCapture plugin that might work.

1 Like

Hi @RaananW @bghgary @Cedric @carolhmj
Any documentation is there for recoding video for 3d model rendering.
or any example?

@Manjunatha_Mc please do not ping everybody in your messages. It is counter productive as for instance @RaananW and @carolhmj are not working as much on the native side of the house. We will ping who needs to be on the thread if the right owners are not already on the post.

As @bghgary mentioned:

I am not sure there are any documentations unfortunately.

3 Likes

We do have a NativeCapture plugin that gives you access to each rendered frame, however:

  1. It’s experimental and almost certainly will change in the future since what we really want is a standard BJS API that works well in both the browser and in native, and the experimental API exposed through Babylon React Native is native specific.
  2. It only gives you frames as rgb data, Babylon Native does not provide anything specifically for encoding those frames into a video (e.g. an mp4). You could do this with platform specific code, or possibly using an library like ffmpeg.

The other route you might be able to go is to use Texture.readPixels, which is a BJS API that is implemented in Babylon Native (you’d still need to do the video encoding yourself as this also only gives you raw rgb frame data). I believe you could use readPixels with RenderTargetTexture, though I haven’t tried it myself and I’m not sure how much perf overhead there would be. This part @sebavan might have some insights into.

3 Likes

why 3d model is blink while doing screen recording in mobile