Getting started
How an Orbit account is organised, what lives where in the console, and the shortest path from signing in to serving a name from our network.
A video is created before its file exists, so its address is settled first. This page covers creating one, sending the file, what comes out, private playback and what is counted.
An asset is one video. It exists before the file does: the address it will play at is settled when you create it, so you can put that address in a page while the upload is still running.
curl -X POST https://dash.yunzheng.space/api/v1/vod/assets \
-H "Authorization: Bearer $ORBIT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"title":"Launch keynote","visibility":"unlisted"}'| Field | What it sets |
|---|---|
title | What the video is called. Up to 200 characters. |
visibility | public, unlisted (default) or private. Only private requires a signed address. |
tags | Yours to find things by. They are not published with the video. |
description | Optional. Up to 2000 characters. |
unlisted means the address cannot be guessed. It is not access control: anybody who has the address can watch. private is the setting that is.Three calls: say how big the file is, send each part, then say you are finished. The declared size is required and it is checked on completion — a file that does not match what was declared is refused rather than half-transcoded.
B=https://dash.yunzheng.space/api/v1/vod/assets/$ID
curl -X POST $B/upload \
-H "Authorization: Bearer $ORBIT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"size":734003200,"content_type":"video/mp4"}'
# -> {"upload_id":"ovu_...","part_size":8388608}
split -b 8388608 video.mp4 part-
n=1; for f in part-*; do
curl -X PUT $B/upload/$UPLOAD_ID/parts/$n \
-H "Authorization: Bearer $ORBIT_TOKEN" --data-binary @$f
n=$((n+1))
done
curl -X POST $B/upload/$UPLOAD_ID/complete \
-H "Authorization: Bearer $ORBIT_TOKEN"
# -> {"asset_id":"ovd_...","job_id":"ovj_..."}Each part is answered with the list of parts that have landed, so an upload that is interrupted resumes by sending only what is missing. Parts may be sent in any order; the size of every part except the last one has to be the part_size you were given.
One HLS ladder per video: the resolution you uploaded, and the standard sizes below it, up to as many as your pack allows. Video is H.264 and audio is AAC at 128 kbit/s, cut into six-second pieces with independent_segments set, which is what lets a player change quality without interrupting the picture.
| Pack | Highest quality | Qualities per video |
|---|---|---|
| Free | 720p | 2 |
| Pro | 1080p | 4 |
| Business | 2160p (4K) | 6 |
| Unlimited | 2160p (4K) | 6 |
A poster is taken from the first frame, and a later frame is used instead when the first one is close to black. reprocess makes the ladder again from the original file, which is what to use after a pack change; the current ladder keeps playing until the new one is finished.
curl https://dash.yunzheng.space/api/v1/vod/assets/$ID/renditions \
-H "Authorization: Bearer $ORBIT_TOKEN"A public or unlisted video plays at one address, and it does not change:
https://vod.yunzheng.space/a/<asset_id>/master.m3u8
https://vod.yunzheng.space/a/<asset_id>/poster.jpgAny player that speaks HLS takes that address. Ours adds a quality menu, picture-in-picture and a statistics panel, and it is two lines:
<script src="https://vod.yunzheng.space/v1.js"></script>
<div id="p"></div>
<script>
OrbitPlayer.mount(document.getElementById('p'), {
src: 'https://vod.yunzheng.space/a/<asset_id>/master.m3u8',
vod: true, latency: 'standard'
})
</script>A private video is refused at that address. Ask for a signed one instead; it carries an expiry and a signature, and it stops answering when the expiry passes.
curl -X POST https://dash.yunzheng.space/api/v1/vod/assets/$ID/playback \
-H "Authorization: Bearer $ORBIT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"ttl_s":3600}'
# -> {"master_url":"https://vod.yunzheng.space/a/ovd_.../master.m3u8?exp=...&sig=...",
# "expires_at":"..."}To sign in your own backend instead — one link per viewer, with no round trip to us — hold a playback key. The secret is shown once, at creation, and cannot be read back afterwards; revoking a key stops every link already signed with it, including one a viewer has open.
curl -X POST https://dash.yunzheng.space/api/v1/vod/keys -H "Authorization: Bearer $ORBIT_TOKEN"
curl https://dash.yunzheng.space/api/v1/vod/keys -H "Authorization: Bearer $ORBIT_TOKEN"
curl -X DELETE https://dash.yunzheng.space/api/v1/vod/keys/$KEY_ID -H "Authorization: Bearer $ORBIT_TOKEN"| Limit | Meaning |
|---|---|
| Videos | how many assets you may have at once |
| Storage | the original file plus every quality made from it, and the poster |
| Transcoding a month | minutes of video encoded, counted once per quality |
| Delivery a month | what left the edge towards viewers |
| Highest quality | the ceiling the ladder is built to, per pack |
| Qualities per video | how many rungs the ladder may have |
Deleting a video gives the storage back at once, and the address stops answering in the same moment. A reprocess is counted again, because it is another encode.
GET /v1/account/quota under the same names.How an Orbit account is organised, what lives where in the console, and the shortest path from signing in to serving a name from our network.
Add a zone, point your registrar at our name servers, manage records: weighted answers, health-checked records, ALIAS at the apex, zone-file import.
Delegate the whole domain, delegate one hostname, or add a CNAME and leave your DNS where it is. What each one costs you and when to pick it.