Open source

Java video SDK

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

Trusted by product teams shipping video at scale

AAO NXTAadhanKnovorocketlaneDLICOMPractice by Numberssuperbit

What you get

Everything your Java 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

Java SDK installation

Add the dependency to Gradle or Maven. Maven Central serves 1.0.4, though the README still pins 1.0.3. It needs JDK 11 or newer. Everything the client can do is listed in the Java SDK docs.

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

Gradlegroovy · build.gradle
// Gradle, in build.gradle. Maven Central serves 1.0.4
implementation 'io.fastpix:sdk:1.0.4'

Credentials

Your access tokens

FastPix gives you two values, not one key. Build a Security object into the SDK builder and it authenticates everything that follows over HTTP Basic. Keep the built SDK as a singleton. 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.

Javajava · Application.java
import io.fastpix.sdk.FastPixSDK;
import io.fastpix.sdk.models.components.Security;

// Authenticates every request that follows, over HTTP Basic
FastPixSDK sdk = FastPixSDK.builder()
    .security(Security.builder()
        .username("your-access-token")
        .password("your-secret-key")
        .build())
    .build();

Open source

The Java 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

Build a request, chain it onto the create method and finish with call. The video comes back encoded for every screen and connection, with an ID your player uses. Note the plural namespace. Video on Demand covers the rest.

Javasdk.inputVideos().create()
// 1. Hand FastPix a video to fetch and encode
CreateMediaRequest req = CreateMediaRequest.builder()
        .inputs(List.of(
            Input.of(PullVideoInput.builder()
                .url("https://static.fastpix.com/fp-sample-video.mp4")
                .build())))
        .build();

CreateMediaResponse res = sdk.inputVideos().create()
        .request(req)
        .call();

// 2. Issue the ID a player streams from
sdk.playback().createId().mediaId("your-media-id").call();

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.

Javasdk.metrics().listOverallValues()
// Averages the quality-of-experience score over the last 24 hours
GetOverallValuesResponse res = sdk.metrics().listOverallValues()
        .metricId("quality_of_experience_score")
        .measurement("avg")
        .timespan("24:hours")
        .filterBy("browser_name:Chrome")
        .call();

Ten fields are yours

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

Shorter method names

listBreakdown and getTimeseries here, not the longer names other SDKs use.

Into your warehouse

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

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 Java appsdk.inputVideos().create()pull 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 Java 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

Java SDK questions, answered

  • How do I upload a video in Java?

    Two ways. Give sdk.inputVideos().create() a URL of a file you already host, passed as a builder chain ending in .call(), 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 Java?

    No. Most JVM answers point at a wrapper like Xuggler or a shelled-out ffmpeg process, both of which you then own in production. FastPix encodes on its side, so your Java 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 Java?

    You do not convert it yourself. sdk.inputVideos().create() creates the media entry, FastPix produces the HLS renditions, and sdk.playback().createId() 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 Spring Boot and Quarkus?

    Yes. Register the built SDK as a singleton bean in Spring Boot, or an ApplicationScoped producer in Quarkus, and inject it where you need it. The builder is thread-safe once built. For reactive stacks, call .async() and work with the CompletableFuture or Publisher it hands back.

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.

Java 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.