Open source

C# video SDK

Easily build video experiences into your C# app with the FastPix C# video SDK.

Trusted by product teams shipping video at scale

AAO NXTAadhanKnovorocketlaneDLICOMPractice by Numberssuperbit

What you get

Everything your C# app needs for video

Upload it, encode it, stream it, and see how it is doing. That is the whole job, and it all comes from one package you install like any other.

Getting video in is the easy part. Use a file you already host, or send one straight from your app. Nothing to store in between.

Your video plays on the web, on phones, on tablets and on TVs, and you never build a separate player for any of them.

Everyone watching gets a version that suits their screen, their browser and how fast their connection happens to be that day.

You can see how your video is actually doing, because the numbers come with it instead of being sold to you separately.

Install

C# SDK installation

Install the package with the dotnet CLI or the Package Manager console. It targets .NET 8.0, so that is the floor. Everything the client can do is listed in the C# SDK docs.

Every endpoint underneath the SDK is listed in the API reference.

Shellbash · dotnet or Package Manager
# Installs the client and its dependencies
dotnet add package Fastpix

# or, from the Package Manager console
Install-Package Fastpix

Credentials

Your access tokens

FastPix gives you two values, not one key. Pass a Security object to the FastpixSDK constructor and register the result as a singleton. Both travel as HTTP Basic on every request. Keep them on your server. Get them from the access-token page in your dashboard.

Generate both on the access-token page in your dashboard. A free account issues a working pair straight away.

C#C# · Program.cs
using Fastpix;
using Fastpix.Models.Components;

// Authenticates every request that follows, over HTTP Basic
var sdk = new FastpixSDK(security: new Security() {
    Username = "your-access-token",
    Password = "your-secret-key",
});

Open source

The C# SDK on GitHub

The code is public and Apache-2.0 licensed, so you can read exactly what it sends before you depend on it. Issues, pull requests and forks are welcome here and on every other package FastPix publishes.

On-demand video

Video upload and playback

Await the create method with a request object to add a file you already host. It comes back encoded for every screen and connection, with an ID your player uses. Video on Demand covers the rest.

C#sdk.InputVideo.CreateMediaAsync
// 1. Hand FastPix a video to fetch and encode
var req = new CreateMediaRequest() {
    Inputs = new List<Fastpix.Models.Components.Input>() {
        Fastpix.Models.Components.Input.CreatePullVideoInput(
            new PullVideoInput() {
                Url = "https://static.fastpix.com/fp-sample-video.mp4",
            }
        ),
    },
};

var res = await sdk.InputVideo.CreateMediaAsync(req);

// 2. Issue the ID a player streams from
var pb = await sdk.Playback.CreateAsync(
    mediaId: "your-media-id",
    body: new CreateMediaPlaybackIdRequestBody() {
        AccessPolicy = AccessPolicy.Public,
    }
);

Ask for more up front

Captions, chapters and In-Video AI metadata are requested while the video is added.

Public or signed

Decide per playback ID whether anyone can watch, or only a viewer holding your token.

Browser uploads

Pair with a client-side upload SDK for pause, resume and retry.

Encoding

Every video gets its own encode

Most platforms run every file through the same settings. FastPix looks at each video first and encodes it to suit, so the file comes out smaller and still looks the same.

A ladder shaped to the title

Rungs are chosen per video, not copied from a preset.

2160p
1080p
720p
480p

35% smaller, same picture

Measured against H.264, HEVC and AV1 at matched quality.

standard
fastpix
35% smaller

Video Data

Playback analytics, built in

You do not need another tool to see how your video is doing. Every play is recorded automatically in Video Data, and you read the numbers with the same client you used to upload.

C#sdk.Metrics.GetOverallValuesAsync
// Averages the quality-of-experience score over the last 24 hours
var res = await sdk.Metrics.GetOverallValuesAsync(new GetOverallValuesRequest() {
    MetricId = MetricId.QualityOfExperienceScore,
    Measurement = Measurement.Avg,
    Timespan = "24:hours",
    FilterBy = "browser_name:Chrome",
});

Ten fields are yours

Tag sessions with your own account, plan or lesson ID and slice by them later.

Enums, not strings

Metric and timespan are enums, so a typo fails at compile time.

Into your warehouse

Views come back through the same client, so they land in BI or a warehouse.

Which QoE metrics actually deserve an alert is covered in this working reference.

How it works

What happens after you upload a video

You get a media ID back straight away, while the file is still being processed. FastPix encodes it, stores it and prepares it for delivery, then sends a webhook the moment it is ready to play.

Your C# appsdk.InputVideo.CreateMediaAsyncpull from a source URL you hostdirect uploadsigned URL, your code pushes itlive streamlive over RTMPS or SRTFastPix runs the pipelineEncodeper-title ladder, HLS and MP4Storerenditions, thumbnails, captionsDelivermulti-CDN, 300+ locationsAny player or deviceplaybackIdpublic, or signed for gated videoWeb, iOS, Android, Flutternative SDKs, or any HLS clientSmart TVSamsung Tizen and LG webOSvideo.media.ready webhookYour app learns the media is playable without polling for it.

Independent timings for encode and first frame are on the benchmark page, which also names the workloads where FastPix does not come first.

Live streaming from your C# app

Live uses the same client as on-demand. Ask for a stream key, point OBS, vMix, a phone or a hardware encoder at it, and FastPix takes care of the stream and the recording.

Questions developers ask

C# SDK questions, answered

  • How do I upload a video in C#?

    Two ways. Give sdk.InputVideo.CreateMediaAsync a URL of a file you already host, passed as a request object, and FastPix fetches it. Or open a direct upload, which returns a signed URL your own code sends the file to. The first suits a backend job, the second a user-facing form. Both hand back a media ID.

  • Do I need FFmpeg to handle video in C#?

    No. Most .NET answers point at Xabe.FFmpeg or a shelled-out process, which puts a native binary inside your deployment. FastPix encodes on its side, so your C# code only makes API calls. You never install FFmpeg, size a worker box, or maintain a rendition ladder for every device you care about.

  • How do I convert a video to HLS in C#?

    You do not convert it yourself. sdk.InputVideo.CreateMediaAsync creates the media entry, FastPix produces the HLS renditions, and sdk.Playback.CreateAsync hands you the ID a player streams from. There is no ffmpeg command, no segmenting step and no manifest to write. Renditions are chosen per title rather than from a fixed preset, so a screen recording and an action scene do not get the same treatment.

  • Does the SDK work with ASP.NET Core?

    Yes. Register FastpixSDK as a singleton in the ASP.NET Core container and inject it into controllers, minimal API endpoints or a BackgroundService. Since every operation is awaitable, requests never block a thread pool thread, and the request CancellationToken flows straight through.

Documentation

Docs, references and guides

This page shows you the idea. When you need the exact parameter, the response or the error code, the docs have it, with an example you can run beside every operation.

C# SDK reference

Every namespace and method, with a runnable snippet per operation.

Full API reference

Every endpoint and payload behind all seven server SDKs.

Webhook reference

Each event FastPix emits, with sample payloads and the signature scheme.

Five-minute quickstart

Sign up, hit the endpoint, get a playing video back.

Choosing an SDK

Seven server SDKs, plus the client-side player, uploader and data SDKs.

Changelog

Released versions, fixes and breaking changes across the platform.