truvideo_video_sdk 1.0.1 copy "truvideo_video_sdk: ^1.0.1" to clipboard
truvideo_video_sdk: ^1.0.1 copied to clipboard

Provides video editing features like trimming, rotation, concatenation, and merging, allowing users to modify videos within the app

Truvideo Video SDK #

This plugin integrates TruvideoVideoSdk for handling video files, including browsing, editing, encoding, and merging videos.

Supported Platforms #

  • Android
  • iOS

Features #

  • Loads and displays videos from a directory
  • Edits videos
  • Generates thumbnails
  • Compares videos
  • Retrieves video information
  • Clears noise from videos
  • Encode videos using EncodeBuilder
  • Merge videos using MergeBuilder
  • Concatenate videos using ConcatBuilder

Requirements #

  • TruvideoVideoSdk Plugin

Setup #

  1. Add TruvideoVideoSdk Plugin to your project.
  2. Install dependencies:
    flutter pub get
    
  3. Ensure proper permissions in AndroidManifest.xml & Info.plist.
  4. Run the app:
    flutter run
    

Usage #

  • Edit a video:
    void editVideo(String videoPath) {
      TruvideoVideoSdk.editVideo(
        inputPath: videoPath,
        outputPath: "\${directoryPath}/edited_video.mp4",
        onResult: (String? result) {
          print("Video edited successfully: \$result");
        },
        onError: (String? message) {
          print("Video editing failed: \$message");
        },
      );
    }
    
  • Generate a thumbnail:
    void generateThumbnail(String videoPath) {
      TruvideoVideoSdk.generateThumbnail(
        videoUri: videoPath,
        outputPath: "",
        position: 1000,
        width: 300,
        height: 300,
        precise: true,
        onResult: (String? result) {
          print("Thumbnail generated successfully: \$result");
        },
        onError: (String? message) {
          print("Thumbnail generation failed: \$message");
        },
      );
    }
    
  • Retrieve video information:
    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");
      },
    );
    }
    
  • Clear noise from a video:
    void clearNoise(String videoPath) {
    TruvideoVideoSdk.cleanNoise(
      videoUri: videoPath,
      outputPath: "\${directoryPath}/noise_removed.mp4",
      onResult: (String? result) {
        print("Noise cleared successfully: \$result");
      },
      onError: (String? message) {
        print("Noise clearing failed: \$message");
      },
    );
    }
    
  • Encode a video:
    Future<void> encodeVideo(String videoPath) async {
    final builder = EncodeBuilder(
    filePath: videoPath,
    resultPath: "$directoryPath/encoded.mp4",
    )
      ..setWidth(1280)
      ..setHeight(720)
      ..setFrameRate(TruvideoSdkVideoFrameRate.sixtyFps);
        
      await builder.build();
      final result = await builder.process();
      }
    
  • Compare multiple videos:
    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");
      },
    );
    }
    
  • Concatenate multiple videos:
    Future<void> concatVideos(List<String> videoPaths) async {
      final builder = ConcatBuilder(
      filePaths: videoPaths,
      resultPath: "$directoryPath/concat.mp4",
      );
        
      await builder.build();
      final result = await builder.process();
    }
    
  • Merge multiple videos:
    Future<void> mergeVideos(List<String> videoPaths) async {
      final builder = MergeBuilder(
      filePaths: videoPaths,
      resultPath: "$directoryPath/merged.mp4",
      )
      ..setWidth(480)
      ..setHeight(640)
      ..setFrameRate(TruvideoSdkVideoFrameRate.thirtyFps);
        
      await builder.build();
      final result = await builder.process();
    }
    

Documentation #

For more details, please refer to the official documentation: Truvideo Swift SDK Guide

License #

MIT #

Support #

If you have any questions or suggestions regarding the SDK, please contact us at support@truvideo.com.

0
likes
150
points
47
downloads

Publisher

verified publishertruvideo.com

Weekly Downloads

Provides video editing features like trimming, rotation, concatenation, and merging, allowing users to modify videos within the app

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on truvideo_video_sdk

Packages that implement truvideo_video_sdk