GPU Video Flutter

  • GPU Video Flutter in Android
  • Base on source GPU Video Flutter : https://github.com/MasayukiSuda/GPUVideo-android
  • We create a Plugin for Flutter Developer who want to apply filter in their own images, videos but can not find any library for it

About

  • What is it, what does it do

    • Customize filter in your own video
    • Record videos, take images with many filters
    • Work with flash, camera back of front, ...
    • Support landscape or portrait or square camera type
  • Project status: working/prototype Done 3/3 Function Next Clean and Re-Arrange Code

Table of contents

Use for instance github.com/ekalinin/github-markdown-toc:

Installation

  • Add this library into your pubspec.yaml file:
      gpu_video_flutter_kz: ^0.0.4
    
  • Open Project Android in new screen
    • Change your minSDKVersion to 21
      defaultConfig {
          minSdkVersion 21
      }
      
    • Add to your build.gradle (Project:android)
      maven { 
        url 'https://jitpack.io' 
      }
      

Usage

  • Movie Preview

    GPUMoviePreview(
      videoUrl:
          "https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/360/Big_Buck_Bunny_360_10s_1MB.mp4",
    )
    
    • To use Filter for this video you can use:
    GpuVideoFlutterKz.filterVideo(FilterType.BILATERAL_BLUR);
    
    • Set Filter's Percentage:
    GpuVideoFlutterKz.setFilterPercentage(int percent);
    
  • Camera Recorder

    • Init
    GPUCameraRecord(
          cameraViewType: CameraViewType.square),
    )
    
    • You can change type of camera to portrait or landscape otherwise.
    • To add filter for your preview camera, just use:
    GpuVideoFlutterKz.filterCameraRecorder(filterType);
    
    • To start record:
    GpuVideoFlutterKz.recordCameraVideo();
    
    • To end record:
    String videoPath = GpuVideoFlutterKz.stopRecordCameraVideo();
    // Return of stop record video is video's path
    
    • To switch between front and back camera:
    GpuVideoFlutterKz.switchCamera();
    
    • To turn on or off flash:
    GpuVideoFlutterKz.turnOnOffFlash();
    
    • To capture an image:
    String imagePath = GpuVideoFlutterKz.captureImage();
    //Return of this function is image's path
    
  • Mp4 Compose

    • Get All Video In Gallery:
      List<VideoItem> videos = await GpuVideoFlutterKz.getListVideo();
      // return list of VideoItem (which is in my lib)
      
    • Start CodeC:
      GpuVideoFlutterKz.startCodec(isMute, isFlipHorizontal,
                  isFlipVertical, videoSelectedPath, filterType);
      // Apply 5 properties to your video and save the new video into your gallery
      

Screenshots

Features

Content

Description, sub-modules organization...

Requirements

  • Require Android Min SDK 21

License

Apache License, Version 2.0