flutter_native_video_trimmer 1.1.8 copy "flutter_native_video_trimmer: ^1.1.8" to clipboard
flutter_native_video_trimmer: ^1.1.8 copied to clipboard

A lightweight Flutter plugin for video manipulation using native code. Trim videos without FFmpeg dependency.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_native_video_trimmer/flutter_native_video_trimmer.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  final _videoTrimmer = VideoTrimmer();

  // Example of how to use the video trimmer functions
  Future<void> _exampleUsage() async {
    try {
      // 1. Load a video file
      await _videoTrimmer.loadVideo('/path/to/your/video.mp4');

      // 3. Trim the video (first 5 seconds)
      final trimmedPath = await _videoTrimmer.trimVideo(
        startTimeMs: 0,
        endTimeMs: 5000,
      );
      print('Video trimmed to: $trimmedPath');

      // 4. Clear the cache
      await _videoTrimmer.clearCache();
    } catch (e) {
      print('Error: $e');
    }
  }

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: Scaffold(
        body: Center(
          child: Text('Check console for function usage example'),
        ),
      ),
    );
  }
}
5
likes
160
points
536
downloads

Publisher

verified publishertuankhoidev.com

Weekly Downloads

A lightweight Flutter plugin for video manipulation using native code. Trim videos without FFmpeg dependency.

Repository (GitHub)
View/report issues

Topics

#video #trimmer #media

Documentation

API reference

Funding

Consider supporting this project:

buymeacoffee.com

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on flutter_native_video_trimmer