Version - 1.0.3-beta.3
Video Information
This function gives you all the important details about a video, like its resolution, duration, codec, and other useful metadata.
void getVideoInfo(String videoPath) {
TruvideoVideoSdk.getVideoInfo(
videoUri: videoPath,
onResult: (String? result) {
print("Video info: $result");
},
onError: (String? message) {
print("Failed to fetch video info: $message");
},
);
}Compare Video
This function checks if multiple videos are compatible for concatenation, returning true if they have matching characteristics and false if they need merging.
void compareVideos(List<String> videoPaths) {
TruvideoVideoSdk.compareVideos(
videoUris: videoPaths,
onResult: (bool? result) {
print("Videos comparison result: $result");
},
onError: (String? message) {
print("Video comparison failed: $message");
},
);
}Edit Video
This function initiates video editing by creating a preset with the input video URL and the desired output URL. It then presents the TruvideoSdkVideoEditorView with the preset, allowing users to perform editing actions. Upon completion, it provides the result of the edited video.
Thumbnail Generation
This function asynchronously generates a thumbnail for a given video using the TruvideoSdkVideo's thumbnailGenerator. It accepts a TruvideoSdkVideoThumbnailInputVideo object as input, which encapsulates the necessary information about the video.
Clean noise
This function asynchronously utilizes TruvideoSdkVideo's engine to clean noise from a specified video file located at the given input URL. The cleaned video is then saved to the provided output URL.
Concat Videos
This function concatenates multiple videos into a single video file. First, it checks if the videos can be concatenated by calling the canConcatVideos function. If the videos are compatible, it proceeds to concatenate them using the ConcatBuilder. Finally, it prints the output path of the concatenated video.
Merge Videos
The mergeVideos function combines several videos into one file. Unlike just sticking them together, this method reprocesses the videos, which might take longer. The merged video could end up with different qualities to fit all the originals. Unlike a simple join, this method lets you mix videos without any specific limitations, giving you more options.
Encode Video
This function is used to build a TruvideoSdkVideoRequest that performs an encoding operation. An encoding operation allows to perform changes over a single video by changing one or many of its attributes, such as:
Resolution through the width and height parameters
Video codec (.h264 and .h265)
Audio codec (.aac, .mp3, .ac3)
Frame rate (24fps, 25fps, 30fps, 50fps, 60fps)
Get All Requests
This function will provide all the requests created by builder. The return type will be List<VideoRequestDetails>?.
The class VideoRequestDetails contains id, type, status, createdAt and updatedAt parameters.
Get Request by ID
This function will return request associated with the id.
Process
Call process function to start processing the request.
Cancel
Call cancel function during processing, if you want to cancel the process.
Delete
Call delete function to delete the request permanently.
Delete function not available in iOS.
Last updated
Was this helpful?