The video data is the representation of the video that has been uploaded using the SDK. The uploaded video will be transcoded to other different resolutions depending on console settings. Below is a table of properties that it contains.
Property | Description |
---|---|
The fileUrl
and videoUrl.original
provides the URL of the same video resolution.
The difference being, fileUrl
returns the actual file format while videoUrl.original
returns MP4 format.
To upload a video to the system, you can use the Amity Video Upload API provided the SDK. The API allows you to upload a video to the Amity server. The SDK simplifies the process of uploading videos by providing pre-built components that you can easily integrate into your application.
Supported ✅ (please wait while we prepare a real example!)
Version 6 and Beta(v0.0.1)
If an error is encountered while creating the file, it will return the following errors:
Once you uploaded a video the videos undergo transcoding from their original resolution. You can quickly access the original size of the video right after you make the video message. However, it takes time for the transcoded resolutions to be ready. Here are the available transcoded resolutions.
1080p
720p
480p
360p
original
Supported ✅ (please wait while we prepare a real example!)
Here's an example of getting a specific video resolution from a post.
Additionally, you can display a video preview in the user interface by utilizing a video thumbnail image. This allows for a more visually appealing representation of the video and provides a quick preview for users before they choose to view the full video. The thumbnail may not immediately available after the video was uploaded. However, eventually, the thumbnail will be become available.
Supported ✅ (please wait while we prepare a real example!)
Supported ✅ (please wait while we prepare a real example!)
The functionality isn't currently supported by this SDK.
fileId
Identifier for the uploaded file
fileUrl
The HTTP web URL for the uploaded file. You can use this fileUrl
for downloading the original video file. (The file format remains unchanged)
attributes
Contains a dictionary with values for name
, extension
, size
and mimeType
of uploaded video.
attributes.metadata
Contains a dictionary with values for video
and audio
of uploaded video.
attributes.metadata.video
Contains a dictionary with values for width
, height
, duration
, bit_rate
, avg_frame_rate
and display_aspect_ratio
attributes.metadata.audio
Contains a dictionary with values for duration
, bit_rate
and sample_rate
videoUrl
After video uploaded and transcoded by the server. The video data will contain videoUrl
that provides different video URLs for each resolution.
original - the equivalent resolution to fileUrl
1080p - 1920×1080 in horizontal, and 1080x1920 in vertical
720p - 1280×720 horizontal, and 720x1280 in vertical
480p - 640x480 horizontal, and 480x640 in vertical
360p - 480x360 horizontal, and 360x480 in vertical
(All transcoded videos are in MP4 format)
status
An enum represents 4 video statues
uploaded - the video is uploaded and users can watch the original raw file on fileUrl
transcoding - the video is being transcoded to pre-defined resolutions
transcoded - the video is transcoded and the resolutions are provided to videoUrl
error - the video encounters an issue while transcoding