This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

ai.natml.natcorder

1.9.4 • Public • Published

NatCorder

NatCorder is a high performance, cross-platform video recording API for Unity Engine. First, create a recorder:

// Create a recorder
var recorder = new GIFRecorder(
    640,  // image width
    480,  // image height
    0.1   // frame duration
);

Next, commit a bunch of video and/or audio frames to the recorder:

// Commit video frames
Texture2D[] frames = ...;
foreach (var frame in frames)
    recorder.CommitFrame(frame.GetPixels32());

And when you're all done, finish writing and use the video as you desire:

// Finish recording
string videoPath = await recorder.FinishWriting();

NatCorder comes with a rich featureset including:

  • Record any texture, anything that can be rendered into a texture, or any pixel data.
  • Record to MP4 videos and animated GIF images.
  • Control recording quality and file size with bitrate and keyframe interval.
  • Record at any resolution. You can specify what resolution recording you want.
  • Get the path to recorded video in device storage.
  • Record game audio with video.
  • Support for recording HEVC videos.
  • Support for Android, iOS, macOS, WebGL, and Windows.

See the online docs to learn more about NatCorder.

Installing NatCorder

First, add the following items to your Unity project's Packages/manifest.json:

{
  "scopedRegistries": [
    {
      "name": "NatML",
      "url": "https://registry.npmjs.com",
      "scopes": ["ai.natml"]
    }
  ],
  "dependencies": {
    "ai.natml.natcorder": "1.9.4"
  }
}

Then retrieve your access key from NatML Hub and add it to your Project Settings:

specifying your access key

Using NatCorder requires an active NatML VideoKit subscription. You can try it out for free, but functionality is limited. See the docs for more info.


Requirements

  • Unity 2021.2+

Supported Platforms

  • Android API Level 24+
  • iOS 14+
  • macOS 10.15+ (Apple Silicon and Intel)
  • Windows 10+ (64-bit only)
  • WebGL:
    • Chrome 91+
    • Firefox 90+

Resources

Package Sidebar

Install

npm i ai.natml.natcorder

Weekly Downloads

104

Version

1.9.4

License

Apache-2.0

Unpacked Size

4.68 MB

Total Files

112

Last publish

Collaborators

  • olokobayusuf