Uiza Documentation
2020-07-01
Search…
⌃K

Video Streaming

Streaming videos with Uiza is pretty straightforward where the whole process could be summarized in 4 simple steps:
  1. 1.
    You give us the video,
  2. 2.
    You allow us to publish the video,
  3. 3.
    We let you know when your video is published, and
  4. 4.
    You tell your player to start streaming
    🤓

Step 1: Create a video entity

You can create a video_entity using HTTP/HTTPS URL links to your original video files. In case the video file is located in your PC, you can upload the video via the Uiza Developer Console by following these steps:
  1. 1.
    Login to Uiza Developer Console
  2. 2.
    Start your application, then go to Upload Video page
  3. 3.
    Browse to your local video file or enter multiple HTTP/HTTPS URLs
  4. 4.
    Click Proceed to start uploading your selected video files
Upload Video Selection Page
Successfully uploaded video_entities will be ingested and listed out in the Developer Console. To transcode the video, click on "Publish" or move to step 2.
Upload Video Result Page
Go to Entities page and select created video entity for checking id and other details.

Step 2: Publish the video entity

The renditions of your video, as the output of transcoding, will be distributed to Uiza's Content Delivery Network (CDN) through which it is delivered to viewers.
To let Uiza know that you are ready to publish your video to your viewers, you can use Uiza Developer Console or send a request to Publish a video entity API.
post
https://api.uiza.sh
/v1/video_entities/:id/publish
/v1/video_entities/:id/publish
Sample Request
curl -X POST https://api.uiza.sh/v1/video_entities/f42b4ac3-869e-4010-8e21-042e40be7655/publish
-H 'Accept: */*'
-H 'Authorization: uap-c1ffbff4db954ddcb050c6af0b43ba56-41193b64'
-H 'Cache-Control: no-cache'
-H 'Connection: keep-alive'

Step 3: Retrieve the video entity's information

The process of transferring the renditions of your video to Uiza's CDN takes time. You player can only start playing the video after it has been successfully published. To keep track of this process, retrieve the video entity's information. The publish_to_cdn argument indicates the publishing status of your video entity. If the value is success, you are good to go.
get
https://api.uiza.sh
/v1/video_entities/:id
/v1/video_entities/:id
Sample Request
curl -X GET https://api.uiza.sh/v1/live_entities/22013d8a-d5fa-48f0-9a63-1f471ca9e81d
-H 'Accept: */*'
-H 'Accept-Encoding: gzip, deflate'
-H 'Authorization: uap-c1ffbff4db954ddcb050c6af0b43ba56-41193b64'
-H 'Cache-Control: no-cache'
-H 'Connection: keep-alive'
Three playback links are returned in the response of Step 3. These playback links represent the 3 streaming protocols that Uiza currently supports:
  • hls for HLS fMP4 streaming,
  • hls_ts for HLS ts streaming, and
  • mpd for MPEG-dash streaming.
Configure these playback links to your player will enable your player to get the video chunks from Uiza's CDN, decode and display them to your viewers. And that is How to stream your first video with Uiza in 4 simple steps.
😉