hiukim / mind-ar-js

Web Augmented Reality. Image Tracking, Face Tracking. Tensorflow.js
MIT License
2.13k stars 394 forks source link

Screen Recording in WebAR #451

Closed Fatima-Aslam closed 5 months ago

Fatima-Aslam commented 10 months ago

I want to record the AR experience in the form of a video using a button click. Is there any method for this? As in model-viewer, user can record their AR experience. Same like this, I want in MindAR. Please help me to do it. Thanks

BostonLeeK commented 10 months ago

https://developer.mozilla.org/en-US/docs/Web/API/Screen_Capture_API/Using_Screen_Capture please read. You can capture only canvas and video (in your example). But you need to compose two videos (ar and video) and then save. It very expensive for browser.

vizsatiz commented 9 months ago

How does the model viewer do it with ease? Any comments on that? I will be happy to contribute to this solution

BostonLeeK commented 9 months ago

Please give information about what model viewer you talking. I just can give example what I'm try and it give me bad results and productivity

vizsatiz commented 9 months ago

The question had mentioned about model viewer and I assumed it was established. Well, i meant google model viewer https://modelviewer.dev/

hiukim commented 5 months ago

As mentioned by BostonLeek, you will need to record the canvas and the video. One way I would recommend is to create another canvas, then you draw both the video and the AR canvas on it every frame, then you somehow capture that new canvas and export as video.