# Video Effects SDK for Windows and macOS

> Integrate the C++ Video Effects SDK into a Windows or macOS app: create a pipeline, enable effects and process BGRA or NV12 frames.

The desktop SDK is a C++ library for Windows 10/11 x64 (x86 apps are supported on 64-bit Windows) and macOS 11.0+ on Apple silicon and Intel. It processes BGRA and NV12 frames on the GPU (DirectX 11, Metal) with a CPU fallback.

## Before you start

Register in the [Developer Portal](https://effectssdk.ai/cp/registration#video), start a trial for Windows or macOS and download the SDK from the [desktop-demo-samples releases](https://github.com/EffectsSDK/desktop-demo-samples/releases).

## Create the factory

```cpp
::tsvb::ISDKFactory* createFactory()
{
    HMODULE module = ::LoadLibrary("tsvb");
    auto createSDKFactory = reinterpret_cast<::tsvb::pfnCreateSDKFactory>(
        GetProcAddress(module, "createSDKFactory"));
    return createSDKFactory(); // may return NULL
}
```

## Create a pipeline and enable effects

```cpp
::tsvb::ISDKFactory* factory = createFactory();
::tsvb::IFrameFactory* frameFactory = factory->createFrameFactory();
::tsvb::IPipeline* pipeline = factory->createPipeline();
factory->release();

pipeline->enableBlurBackground(0.6f);      // 0…1
// pipeline->enableReplaceBackground(&replacementController);
// pipeline->enableBeautification();
// pipeline->enableSmartZoom();
// pipeline->enableColorCorrection();
```

## Process frames

```cpp
::tsvb::IFrame* frame = frameFactory->createBGRA(data, bytesPerLine, width, height, false);
::tsvb::IFrame* result = pipeline->process(frame, nullptr); // same format as the input
```

Use `createNV12()` for NV12 input. With `makeCopy = false` the frame keeps a pointer to your buffer, so do not free it while processing. Create one `IPipeline` per video stream.

## Memory

Every SDK object implements `IRelease`: call `release()` when you are done, never `delete`.

```cpp
frameFactory->release();
pipeline->release();
```

## Next steps

- [C++ API reference](/sdk/desktop/docs/)
- [What's new in 2.6](/blog/video-effects-sdk-2-6-windows-macos): thread-safe pipeline, direct linking with `tsvb.lib`, new effects
- [Samples and full class reference](https://github.com/EffectsSDK/desktop-demo-samples)
- [Release notes](/releases?sdk=video-desktop)
