Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] this happens when I subscribe to compressor #78

Closed
sepehr13494 opened this issue Jan 19, 2020 · 8 comments
Closed

[Bug] this happens when I subscribe to compressor #78

sepehr13494 opened this issue Jan 19, 2020 · 8 comments
Labels
bug Something isn't working

Comments

@sepehr13494
Copy link

sepehr13494 commented Jan 19, 2020

Code Example (if has)

void main() {
final _flutterVideoCompress = FlutterVideoCompress();
            _conpressSubscription = _flutterVideoCompress.compressProgress$.subscribe((progress) {
                  debugPrint('progress: $progress');
                });
            File myFile = _file;
            debugPrint(_file.lengthSync().toString());
            final info = await _flutterVideoCompress.getMediaInfo(_file.path);
            print(info.toJson());
            if (info.duration > 120 || _file.lengthSync() > 5000000) {
              Fluttertoast.showToast(msg: 'در حال کم کردن حجم....');
              VideoQuality quality = VideoQuality.HighestQuality;
              if (_file.lengthSync() > 5000000) {
                quality = VideoQuality.MediumQuality;
              }
              final info2 = await _flutterVideoCompress.compressVideo(
                _file.path,
                startTime: 0,
                duration: 120,
                quality: quality, // default(VideoQuality.DefaultQuality)
                deleteOrigin: false, // default(false)
              );
              debugPrint(info2.toJson().toString());
              myFile = info2.file;
            }
}

this is the log :
I/flutter ( 6520): progress: 0.0
I/flutter ( 6520): progress: 0.0
I/flutter ( 6520): progress: 0.0
I/flutter ( 6520): progress: 0.0
I/flutter ( 6520): progress: 0.0
I/flutter ( 6520): progress: 0.0
I/flutter ( 6520): progress: 0.0
I/flutter ( 6520): progress: 0.0
I/flutter ( 6520): progress: 0.0
I/flutter ( 6520): progress: 0.0
I/flutter ( 6520): progress: 0.0
I/flutter ( 6520): progress: 0.0
I/flutter ( 6520): progress: 0.0
I/flutter ( 6520): progress: 0.0
I/flutter ( 6520): progress: 0.0
I/flutter ( 6520): progress: 0.0
I/flutter ( 6520): progress: 0.0
I/flutter ( 6520): progress: 0.0
I/flutter ( 6520): progress: 0.0
I/flutter ( 6520): progress: 0.0
I/flutter ( 6520): progress: 0.0
I/flutter ( 6520): {path: /storage/emulated/0/Android/data/netonote.ir.netonote/files/flutter_video_compress/VID_20191221_010843_056.mp4, title: , author: , width: 2700, ......

@sepehr13494 sepehr13494 added the bug Something isn't working label Jan 19, 2020
@aarajput
Copy link

I am facing same issue.

@febg11
Copy link

febg11 commented Mar 31, 2020

I have this as well but it prints 100

@vahid75hj
Copy link

i have same issue i

@hungtran2492
Copy link

I have same issue. How to fix it?

@Bidhanrai
Copy link

anyone got any fixes for this?

@ccamba
Copy link

ccamba commented Jun 29, 2020

I have same issue.

@kleytonstn
Copy link
Contributor

I just opened the pull request #93 that solves that issue

@rurico rurico closed this as completed in ef80842 Sep 9, 2020
@roberthook823
Copy link

I have same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants