- Home /
Video encoding with Windows media encoder
Hi,
I'm using a c# script to record video within Unity. The script works well when I run it from Visual C#, but in Unity (as a plugin) it throws an out of memory exception when I try to start the recording.
Tried very low capture resolution but it still throws this exception.
The Unity log shows:
Enc2 Exception:System.OutOfMemoryException: Out of memory. at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR (Int32 errorCode) [0x00000] in :0 at (wrapper cominterop) WMEncoderLib.WMEncoderClass:Start () at (wrapper cominterop-invoke) WMEncoderLib.WMEncoderClass:Start ()
Thanks for the help.
Your answer
![](https://koobas.hobune.stream/wayback/20220613015624im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
video media encoder addframe texture format 5 expected to be 4 1 Answer
(C#) How to capture video stream without using a third party SDK 2 Answers
Unity Camera Capture for Android to video file 4 Answers
Automated Video Capture (Server Side) 0 Answers
Capture the Screen, and Audio being Played in a Unity3D based iOS Game 0 Answers