videokit-ai / natcorder

High performance, cross-platform video recording for Unity Engine.
https://github.com/natmlx/videokit
Apache License 2.0
100 stars 19 forks source link

WebGL webm record resize game view #19

Closed MonsieurD closed 1 year ago

MonsieurD commented 1 year ago

When I record a video with webm recorder on webgl, the screen is resized to the (I think) target resolution of the record.

Before recording : image During recording : image After it returns to the original resolution.

Can I avoid this behaviour ?

olokobayusuf commented 1 year ago

What version of Unity are you using? And can you share your recording code? This is likely a Unity bug.

MonsieurD commented 1 year ago

I'm using Unity 2021.3.13f1.

My recording code :

m_Clock = new RealtimeClock();
m_Recorder = new WEBMRecorder(c_RecordWidth, c_RecordHeight, c_RecordFrameRate);
m_CameraInput = new CameraInput(m_Recorder, m_Clock, m_Camera);

c_RecordWidth = 720 c_RecordHeight = 1280 c_RecordFrameRate = 30

olokobayusuf commented 1 year ago

Do you have any AR framework in your project?

MonsieurD commented 1 year ago

No AR framework in my project.

olokobayusuf commented 1 year ago

In this case it must be a bug within Unity Engine. I recommend trying out a different version of Unity, or switching to using the ScreenInput instead of CameraInput. I'm closing this issue.