Video

Import the following dependency in your file, here you will use these function.

import { 
    getVideoInfo,
    MergeBuilder,
    getResultPath,
    editVideo,
    compareVideos,
    ConcatBuilder,
    EncodeBuilder,
    generateThumbnail,
    cleanNoise,
    FrameRate
} from 'truvideo-react-video-sdk';

Video Information

  • The TruVideoVideoSdk has a getVideoInfo function provides video info such as resolution, duration, codec information and relevant metadata.

try {
    // call video info function
    const videoInfo : MediaInfo = await getVideoInfo(filePath);
    console.log('Video info:', videoInfo);
} catch (error) {
    console.error('Error fetching video info:', error);
}

MediaInfo Type

Compare Video

  • The TruVideoVideoSdk has a compareVideos function compare multiple videos and returns the boolean accordingly as the concat video needs to have the same characteristics i.e it return true videos are compatible with concat otherwise not.

Edit Video

The TruVideoVideoSdk has a editVideo function that takes a filePath & resulthPath

Thumbnail Generation

Preview of video is crucial, thumbnail generation gives you the preview image from the timeframe you need.

  • The TruVideoVideoSdk has a generateThumbnail function this method takes the videoPath, resultPath, position, width, height as input and places the image at the resulting path.

Clean noise

We are utilizing high-level Artificial intelligence for noise cancellation over the input video. It’s useful for video containing background noises.

  • This function takes video path, result path, and callback and places a new video to the resulting path after clearing noise

Concat Videos

  • Concatenation uses a specific algorithm to merge multiple videos one after another to make one video efficiently and make a completely new video. This method takes the video list, and result path to place a new video and place a new video and place the video at the given result path.

Merge Videos

  • The TruVideoVideoSdk has a mergeVideos function have same functionality as concat to merge multiple videos to make one another video but there is an advantage over contact to merge all video does not have to be of same configuration.

  • This method takes video URIs list, and result path to place a new video and place the video at the given result path

Encode Video

The TruVideoVideoSdk has a encodeVideo function constructs to carry out a an encoding operation. This operation enables modification to a video by altering one or more of its attribute, such as:-

  • Resolution via width and height parameters

BuilderResponse

GetAllRequest

This function will provide all the requests created for Encode, Concat and Merge Builder

  • Input Params

  • Function Utilisation

GetRequestById

This function will return exact request associated with the id

Last updated

Was this helpful?