Giter Club home page Giter Club logo

flutter_video_compress's Introduction

制服元気ツインテル少女気になりたい

   あまみ るり
    天海 瑠璃

天海るりは、空と海が瑠璃色に染まる景色。そんなことを考えて名付けました。天海るりという名前は、実はなんですね。

flutter_video_compress's People

Contributors

gustavocontreiras avatar kleytonstn avatar rurico avatar torlinone avatar vlada3003 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

flutter_video_compress's Issues

'UIImage' has no member 'UIImageJPEGRepresentation'

Please error to compile example in xCode 10.1:

flutter_video_compress-master/ios/Classes/SwiftFlutterVideoCompressPlugin.swift:79:16: error: value of type 'UIImage' has no member 'UIImageJPEGRepresentation'
return thumbnail.UIImageJPEGRepresentation(compressionQuality: compressionQuality)

lutter_video_compress-master/ios/Classes/SwiftFlutterVideoCompressPlugin.swift:164:94: error: type 'CMTime' has no member 'kCMTimeZero'
try? compressionVideoTrack!.insertTimeRange(timeRange, of: sourceVideoTrack, at: CMTime.kCMTimeZero)

Remove videoToGif and instead add creating a short video without sound

Description

Since Gif is lossless format, gifs made from video have are bigger in size than short videos without audio. Also, there is a problem with Regift library since it is targeting iOS 11.1. My suggestion is to remove videoToGif and add a couple of optional parameters to startCompression for creating video preview.

Platform

Both

Code Example (if has)

void main() {
     _flutterVideoCompress.startCompress(
          file.path,
          deleteOrigin: true,
          quality: VideoQuality.LowQuality,
          startTime: 0,
          duration: 5,
          includeAudio: false,
          frameRate: 24,
        );
}

Expected solution

I will implement this by adding parameters to this method if @TenkaiRuri agrees?

erro help me

'flutter_video_compress/flutter_video_compress-Swift.h' file not found

Compressing seems to never stop

When compressing a second video after compressing the first one, I get following Error:

Already have a compression process, you need to wait for the process to finish

It seems that the compression process of the first video is still in progress.
Does it not stop automatically? Do I need to stop it manually by calling _stopCompress() ?

Thanks for your help!

[Bug] Doesn't compile with iOS 13

Description

I'm using flutter_video_compress: 0.3.7+8 to deploy to an iPhone XS Max on iOS 13. It works in the Android simulator, but I get the following compilation errors in Xcode 11:

Xcode's output:
↳
    leveldb-library-fugunjpkrwxlsrdkdyyylozzzgaq
    /Users/karsten/workspaces/me/services/company-c/apps/ca_test_flutter/ios/Pods/Regift/Regift/AVAssetImageGeneratorTimePoints.swift:12:5: warning: 'public' modifier is redundant for instance method declared in a public extension
        public func generateCGImagesAsynchronouslyForTimePoints(timePoints: [TimePoint], completionHandler: @escaping AVAssetImageGeneratorCompletionHandler) {
        ^~~~~~~

    leveldb-library-fugunjpkrwxlsrdkdyyylozzzgaq
    /Users/karsten/workspaces/me/services/company-c/apps/ca_test_flutter/ios/Pods/Regift/Regift/Regift.swift:251:45: error: missing argument label 'preferredTimescale:' in call
                let time = CMTimeMakeWithSeconds(seconds, Constants.TimeInterval)
                                                ^
                                                          preferredTimescale: 
    /Users/karsten/workspaces/me/services/company-c/apps/ca_test_flutter/ios/Pods/Regift/Regift/Regift.swift:303:46: error: missing argument label 'preferredTimescale:' in call
            let tolerance = CMTimeMakeWithSeconds(Constants.Tolerance, Constants.TimeInterval)
                                                 ^
                                                                       preferredTimescale: 
    /Users/karsten/workspaces/me/services/company-c/apps/ca_test_flutter/ios/Pods/Regift/Regift/Regift.swift:251:45: error: missing argument label 'preferredTimescale:' in call
                let time = CMTimeMakeWithSeconds(seconds, Constants.TimeInterval)
                                                ^
                                                          preferredTimescale: 
    /Users/karsten/workspaces/me/services/company-c/apps/ca_test_flutter/ios/Pods/Regift/Regift/Regift.swift:303:46: error: missing argument label 'preferredTimescale:' in call
            let tolerance = CMTimeMakeWithSeconds(Constants.Tolerance, Constants.TimeInterval)
                                                 ^
                                                                       preferredTimescale: 
    /Users/karsten/workspaces/me/services/company-c/apps/ca_test_flutter/ios/Pods/Regift/Regift/AVAssetImageGeneratorTimePoints.swift:12:5: warning: 'public' modifier is redundant for instance method declared in a public extension
        public func generateCGImagesAsynchronouslyForTimePoints(timePoints: [TimePoint], completionHandler: @escaping AVAssetImageGeneratorCompletionHandler) {
        ^~~~~~~

    leveldb-library-fugunjpkrwxlsrdkdyyylozzzgaq
    note: Using new build systemnote: Planning buildnote: Constructing build description

Could not build the precompiled application for the device.

Error launching application on o8z.

Platform

iOS

Backtracking step (if has)

  1. Include flutter_video_compress: 0.3.7+8 in pubspec.yaml
  2. Build with Flutter 1.9 & Xcode 11
  3. Get Compilation error

Expected solution

This project uses the Regift iOS Cocoa Pod, I think in version 1.5. Now in version 1.6, these problems are solved. So I added this line to my ios/Podfile:

pod 'Regift', '1.6'

But Regift 1.6 has iOS 11.1 as the minimum requirement. This clashes with the rest of Flutter which has iOS 8.0 as the minimum compilation target. I'm unable to change that to iOS 11.1. I can change the deployment target to 11.1, but that hasn't solved the error.

[Bug]

Description

When using a video less than 5 secs long, the example application crashes on iOS. This occurs when generating the GIF.

Here is the output:

flutter: [Compressing Video] start
flutter: [Compressing Video] done! 0s
flutter: [Getting Thumbnail File] start
flutter: [Getting Thumbnail File] done! 0s
flutter: [Getting Gif File] start
Lost connection to device.
Exited (sigterm)

Platform

IOS

[Bug]

Description

Regift.swift file gives an error at line 303, "let tolerance = CMTimeMakeWithSeconds(Constants.TimeInterval, Constants.Tolerance)". Xcode wants this line as "let tolerance = CMTimeMakeWithSeconds(Float64(Constants.TimeInterval), preferredTimescale: Int32(Constants.Tolerance))"
When I fix them and run app it works. But the following day it crashes because of this line. Cannot build app without changing this line. I use latest versions of both swift and xcode.

Platform

IOS

[Bug] Compression Progress only shows 0.0

Description

I have used the example code of
_subscription =
_flutterVideoCompress.compressProgress$.subscribe((progress) {
debugPrint('progress: $progress');
});
In the debug print it only shows 0.0 and never changes value. The compressing of the video works fine but the progress never updates.

[Feature] resize video

Would be nice if we could take 4k 60fps videos and resize them down to 1080p 30fps + compression + trim before uploading. Thanks.

Return file instead of path

Hi,
I need to upload the compressed video to firebase.
Any possability to return the compressed file instead of the path?

Good job btw. with the widget!

[Suggestion] Rename methods

I saw that you owners are not americans and maybe thats the reason the methods don't have a intuitive name.

My suggestions for rename:
startCompress -> compressVideo
convertVideoToGif -> compressVideoToGif
stopCompress -> cancelCompress
getThumbnail -> getThumbnailBytesList
getThumbnailWithFile -> getThumbnail

[Feature] Added audio compression function

Description

Provide detailed contextual explanations to help us understand

Platform

IOS|Android|Both|Other

Code Example (if has)

void main() {

}

Expected solution

Expect description of the solution

Error while compressing video

Description

java.io.FileNotFoundException: x86/ffmpeg
at android.content.res.AssetManager.nativeOpenAsset(Native Method)
at android.content.res.AssetManager.open(AssetManager.java:744)
at android.content.res.AssetManager.open(AssetManager.java:721)
at nl.bravobit.ffmpeg.FFmpeg.isSupported(FFmpeg.java:65)
at com.example.flutter_video_compress.FFmpegCommander.compressVideo(FFmpegCommander.kt:25)
at com.example.flutter_video_compress.FlutterVideoCompressPlugin.onMethodCall(FlutterVideoCompressPlugin.kt:56)
at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:201)
at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:88)
at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:219)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:326)
at android.os.Looper.loop(Looper.java:160)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

Platform

Android

Code Example

    final _flutterVideoCompress = FlutterVideoCompress();

   final compressedVideoInfo = await _flutterVideoCompress.compressVideo(
           file.absolute.path,
           quality: VideoQuality.DefaultQuality,
            deleteOrigin: false,
         );

[Bug] java.lang.Integer cannot be cast to java.lang.Long

on Android(Kotlin) when tryin

Uint8List image = flutterVideoCompress.getThumbnail(path, quality: 50);

it shows error

java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long
E/MethodChannel#flutter_video_compress( 3286): Failed to handle method call
E/MethodChannel#flutter_video_compress( 3286): java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long
E/MethodChannel#flutter_video_compress( 3286): 	at com.example.flutter_video_compress.FlutterVideoCompressPlugin.onMethodCall(FlutterVideoCompressPlugin.kt:33)
E/MethodChannel#flutter_video_compress( 3286): 	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:222)
E/MethodChannel#flutter_video_compress( 3286): 	at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:96)
E/MethodChannel#flutter_video_compress( 3286): 	at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:643)
E/MethodChannel#flutter_video_compress( 3286): 	at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#flutter_video_compress( 3286): 	at android.os.MessageQueue.next(MessageQueue.java:323)
E/MethodChannel#flutter_video_compress( 3286): 	at android.os.Looper.loop(Looper.java:135)
E/MethodChannel#flutter_video_compress( 3286): 	at android.app.ActivityThread.main(ActivityThread.java:5417)
E/MethodChannel#flutter_video_compress( 3286): 	at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#flutter_video_compress( 3286): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
E/MethodChannel#flutter_video_compress( 3286): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
I/flutter ( 3286): FlutterVideoCompress Error: 
I/flutter ( 3286):       Method: getThumbnail
I/flutter ( 3286):       PlatformException(error, java.lang.Integer cannot be cast to java.lang.Long, null)

Compression progress

A callback that states the progress of the compression. I think ffmpeg has one built into their library but I'm not sure if that's what your using.

[Bug] getMediaInfo doesn't recognize orientation

A landscape picture should have 16 x 9 aspect ratio (like 1920x1080)
A portrait picture should have 9 x 16 aspect ratio (like 1080x1920)

If you use getMediaInfo on both kind of files on Android it will return the same result:
width 1920 and height 1080

Is there any way to get the orientation of the video file?

Can't support swift

我的项目里添加use_frameworks!会造成版本冲突兼容性的问题,于是我把use_frameworks!注释,仅仅添加如下代码
pre_install do |installer|

workaround for CocoaPods/CocoaPods#3289

Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
报错找不到一个.h文件,这该如何解决,是否压缩视频有oc语言的包

[Bug] AVAsset tracks is sometimes empty

Description

asset.tracks(withMediaType: AVMediaType.video).first! is sometimes crashing the app. Simply initializing the AVAsset is not enough for the asset to be ready to access its tracks.

Platform

IOS

Expected solution

AVAsset needs to be loaded first before accessing any of its tracks.

Here is an example of how to fix it.

    public func getTrack(_ asset: AVURLAsset)->AVAssetTrack? {
        var track : AVAssetTrack? = nil
        let group = DispatchGroup()
        group.enter()
        asset.loadValuesAsynchronously(forKeys: ["tracks"], completionHandler: {
            var error: NSError? = nil;
            let status = asset.statusOfValue(forKey: "tracks", error: &error)
            if (status == .loaded) {
                track = asset.tracks(withMediaType: AVMediaType.video).first
            }
            group.leave()
        })
        group.wait()
        return track
    }

[Split plugin]

Description

To just create a thumbinail there is no ned of ffmpeg on Android (I don't know about iOS), so if a developer only need to extract the thumbnail from a video the app gets bigger than the needed.

Platform

Android

Expected solution

  1. This plugin could keep it`s set of features by depending of another plugin? or an artifact that implements the thumbnail creation.
  2. another plugin just for thumbnails.

Crashes app

On compress video the app just crashes.

E/flutter (16713): [ERROR:flutter/shell/platform/android/platform_view_android_jni.cc(40)] java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/att.moe.fluttervediocompressexample-gbpmaA3AowDifB_AlSEofw==/base.apk"],nativeLibraryDirectories=[/data/app/att.moe.fluttervediocompressexample-gbpmaA3AowDifB_AlSEofw==/lib/x86, /data/app/att.moe.fluttervediocompressexample-gbpmaA3AowDifB_AlSEofw==/base.apk!/lib/x86, /system/lib]]] couldn't find "libpldroid_shortvideo_core.so"
E/flutter (16713): at java.lang.Runtime.loadLibrary0(Runtime.java:1012)
E/flutter (16713): at java.lang.System.loadLibrary(System.java:1669)
E/flutter (16713): at com.qiniu.pili.droid.shortvideo.b.l.(ShortVideoCore.java:32)
E/flutter (16713): at com.qiniu.pili.droid.shortvideo.b.l.a(ShortVideoCore.java:14)
E/flutter (16713): at com.qiniu.pili.droid.shortvideo.b.p.(ShortVideoTranscoderCore.java:157)
E/flutter (16713): at com.qiniu.pili.droid.shortvideo.PLShortVideoTranscoder.(PLShortVideoTranscoder.java:18)

[Thumbnail Size]

Description

Provide a way to specify a relative size for the thumbnails, many times we don't need the full size of the image. This would make the thumbnail generation faster and allow smaller file uploads. Reducing just the qualify will make the compression quality worse, but the resolution will be kept so it is not the same thing.

Platform

Both

Sample

final imageFile = await FlutterVideoCompress().getThumbnailWithFile(
        videoPath,
        resolutionRatio: 1/2, ##  half of the video resolution.
      );
```
### Expected solution
When a video resolution is MxN, the thumbnail should have the resolution ratio R, with thumbnail size being 
(M*R)x(N*R).

[Bug] framework not found Regift

Description

I'm trying to use this package with Xcode 10.2.1 and I'm getting ld: framework not found Regift when compiling the flutter project.

Platform

IOS

Backtracking step (if has)

  1. Added flutter_video_compress: ^0.3.7+8 to pubspect.yaml
  2. Compile -> Error. ld: framework not found Regift

PlatformException(flutter_video_compress, 8, 8)

I/PLDroidShortVideo( 7999): Pili-Transcode:ShortVideoTranscoderCore:init -
I/PLDroidShortVideo( 7999): Pili-Transcode:ShortVideoTranscoderCore:transcode +
E/PLDroidShortVideo( 7999): Pili-System:ZeusManager:no authorized feature : transcode_video status : UnAuthorized
I/flutter ( 7999): FlutterVideoCompress Error:
I/flutter ( 7999): Method: compressVideo
I/flutter ( 7999): PlatformException(flutter_video_compress, 8, 8)

I find it works now and then , then this error starts happening

[Bug] Pod install problems with latest version

Description

Build breaks when use_frameworks! is added to a Podfile.
When a library that has s.static_framework = true is added to a project that has flutter_video_compress, '$pod install' fails with a message "[!] The 'Pods-Runner' target has transitive dependencies that include statically linked binaries: (image_cropper)"
image_cropper is a library that has s.static_framework = true
if use_frameworks! isn't set then Regift won't compile.

Platform

IOS

Proposed solution

Is to fork Regift and to reduce the ios minimum supported version and remove the use_frameworks! flag. However, this is just a guess since I'm unfamiliar with iOS build system.

Compression hangs

Hi
Im having trouble getting a video to compress after I have already compressed one. I compress one video and it works fine but the second seems to hang and never returns from the await. I'm doing it like this

final String newPath = await _flutterVideoCompress.compressVideo(path: file.path, deleteOrigin: true);

Would you please be able to help me

Thanks
Jawad

Bad state: Stream has already been listened to.

When popping the page (example page of the project) and returning following error is thrown:

Bad state: Stream has already been listened to.

  @override
  void dispose() {
    super.dispose();
    _subscription.unsubscribe();
  }

Dispose is implemented.

[Bug] Failed to ensure /storage/~/files/flutter_video_compress: 400

Platform

Android

Backtracking step (if has)

  1. open application
  2. get video file from gallery with image picker
  3. start compress file with flutter video compress
D/FFmpeg  (29290): Build.CPU_ABI : armeabi-v7a
D/FFmpeg  (29290): ffmpeg is ready!
W/ContextImpl(29290): Failed to ensure /storage/~/files/flutter_video_compress: 400
D/FFmpeg  (29290): Running publishing updates method

Why am I getting this?
Also compressing is taking forever.

Ffmpeg licence

Thanks for the great package, have a question regarding usage of ffmpeg, I am no lawyer and the ffmpeg licensing is very varied based on codec used, can you please share your thoughts on this.

[Help/Performance] Video compressing taking too long

Description

I need to take a video from camera/gallery, compress it (lower resolution or quality or width/height) and upload to firebase storage so I can download it later and show it on a VideoPlayer on a ListView.

Platform

Android

Using

Latest Image Picker

Expected solution

I did some tests and the compressing is taking around 1 minute for each video second:
A 5 seconds video needs ~5 minutes to compress;
A 12 seconds video needs ~12 minutes to compress.

Is there an easy way to improve performance of compressing?
Like using an Isolate or something like.

Which is the best approach for that?
Should I start compressing right after picking video to save time?
Should I use camera plugin instead of image picker for taking videos?

My goal is to make an Instagram-like social network so it can't take so long to upload a small video.

Method of cancelling

Is there a way of cancelling a compression after its started? Thank you for the great library.

[Background thumbnail creation]

Description

The thumbnail creation may consume some time of the Main Thread in Android, which can lead to ANRs or at least make the app not so fluid. So to avoid that it would be good to defer to a background the the process of thumbnail creation.

Platform

Android

Expected solution

To forward the thumbnail creation calls to a thread.

[Bug] App crash in while compression video

Platform

Android

Backtracking step (if has)

  1. open application
  2. Select video to compress and exit the app.
  3. Reopen app the app from device launcher
  4. After few seconds app will crash

Crash report uploaded to Firebase Crashlytics :-

Fatal Exception: java.lang.NumberFormatException: null
       at java.lang.Long.parseLong + 557(Long.java:557)
       at java.lang.Long.parseLong + 636(Long.java:636)
       at com.example.flutter_video_compress.Utility.getMediaInfoJson + 45(Utility.kt:45)
       at com.example.flutter_video_compress.FFmpegCommander$compressVideo$1.onFinish + 83(FFmpegCommander.kt:83)
       at nl.bravobit.ffmpeg.FFcommandExecuteAsyncTask.onPostExecute + 77(FFcommandExecuteAsyncTask.java:77)
       at nl.bravobit.ffmpeg.FFcommandExecuteAsyncTask.onPostExecute + 12(FFcommandExecuteAsyncTask.java:12)
       at android.os.AsyncTask.finish + 695(AsyncTask.java:695)
       at android.os.AsyncTask.access$600 + 180(AsyncTask.java:180)
       at android.os.AsyncTask$InternalHandler.handleMessage + 712(AsyncTask.java:712)
       at android.os.Handler.dispatchMessage + 106(Handler.java:106)
       at android.os.Looper.loop + 193(Looper.java:193)
       at android.app.ActivityThread.main + 6669(ActivityThread.java:6669)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run + 493(RuntimeInit.java:493)
       at com.android.internal.os.ZygoteInit.main + 858(ZygoteInit.java:858)

[Bug] Unable to build with iOS device

Description

My Flutter app built on iOS device with an error.

Platform

IOS

Backtracking step (if has)

  1. Insert dependency flutter_video_compress: ^0.3.7+8 into pubspec.yaml and install packages
flutter packages get
cd ios
pod install
  1. Start debugging with VS Code (F5)
  2. Got error

Error message from debug console

Launching lib/main.dart on iPhone Xʀ in debug mode...
Xcode build done.                                            2.2s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **
Xcode's output:
↳
    /Users/hunguyen/Projects/ergon-mobile/ios/Pods/Regift/Regift/Regift.swift:251:45: error: missing argument label 'preferredTimescale:' in call
                let time = CMTimeMakeWithSeconds(seconds, Constants.TimeInterval)
                                                ^
                                                          preferredTimescale:
    /Users/hunguyen/Projects/ergon-mobile/ios/Pods/Regift/Regift/Regift.swift:303:46: error: missing argument label 'preferredTimescale:' in call
            let tolerance = CMTimeMakeWithSeconds(Constants.Tolerance, Constants.TimeInterval)
                                                 ^
                                                                       preferredTimescale:
    /Users/hunguyen/Projects/ergon-mobile/ios/Pods/Regift/Regift/AVAssetImageGeneratorTimePoints.swift:12:5: warning: 'public' modifier is redundant for instance method declared in a public extension
        public func generateCGImagesAsynchronouslyForTimePoints(timePoints: [TimePoint], completionHandler: @escaping AVAssetImageGeneratorCompletionHandler) {
        ^~~~~~~
Could not build the application for the simulator.
Error launching application on iPhone Xʀ.
Exited (sigterm)

Expected solution

My Flutter app should have built successfully

[Bug] Cannot run example on iOS with swift version 4.2.1

Description

My Swift version:

Apple Swift version 4.2.1 (swiftlang-1000.11.42 clang-1000.11.45.1)
Target: x86_64-apple-darwin18.6.0

Unable to run the example. The error says:

Launching lib/main.dart on iPhone XR in debug mode...
Xcode build done.                                            1.7s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **
Xcode's output:
↳
    === BUILD TARGET video_player OF PROJECT Pods WITH CONFIGURATION Debug ===
    The “Swift Language Version” (SWIFT_VERSION) build setting must be set to a supported value for targets which use Swift. Supported values are: 3.0, 4.0, 4.2. This setting can be set in the build settings editor.
Could not build the application for the simulator.
Error launching application on iPhone XR.
Exited (sigterm)

Platform

iOS

Backtracking step

  1. clone this repo https://github.com/rurico/flutter_video_compress.git
  2. cd flutter_video_compress/example/
  3. flutter packages get
  4. flutter run

Expected solution

Does the plugin support swift 4.2?

compressed video is null

I am trying to compress a video file and return the new compressed file, but following code prints NULL both times:

   final MediaInfo newPath = await _flutterVideoCompress.startCompress(
    widget.videoFile.path,
    deleteOrigin: true,
  );

  setState(() {
    video = newPath.file;
  });

   print("${newPath.file}");
   print("$video");

[Bug]视频压缩无效

Description

Provide detailed contextual explanations to help us understand

Platform

IOS|Android|Both|Other

Backtracking step (if has)

  1. open application
  2. touch somewhere 5 times
  3. crash

Code Example (if has)

void main() {

}

Expected solution

Expect description of the solution

[Bug?] HighestQuality and DefaultQuality are the same? Portrait and landscape are different?

I'm runnning some tests on Android.

I've made 4 videos for that:
a) full hd landscape 1920x1080 16:9
b) full hd portrait 1080x1920 9:16
c) hd landscape 1280x720 16:9
d) hd portrait 720x1280 9:16

After compressing with HighestQuality:
a) full hd landscape was turned into 1080x608 16:9
b) full hd portrait was turned into 1080x1920 9:16
c) hd landscape was turned into 1080x608 16:9
d) hd portrait was turned into 1080x1920 9:16

After compressing with DefaultQuality:
a) ~
b) full hd portrait was turned into 1080x1920 9:16
c) ~
d) ~

Is this working how it should?
Why landscape goes to 608 height and portrait stays with the same value?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.