问题描述
我正在开发 Flutter 应用程序并尝试在使用 video_trimmer:
修剪后压缩视频,但它不会接受压缩
uploadVideo(int data)async {
await _trimmer.saveTrimmedVideo(startValue: _startValue,endValue: _endValue ) // if i removed this function it will compress perfectly
.then((value) async {
setState(() => file = File(value));
// the path into value is '/data/user/0/com.example.whosaround/app_Flutter/Trimmer/WhatsApp_Video_2021-07-01_at_11_trimmed:Jul3,2021-08:27:59.mp4'
});
// compress Video .. will not compress
final info = await VideoCompress.compressVideo(
file.path,quality: VideoQuality.LowQuality,deleteOrigin: false,includeAudio: true,);
//refrech file video after compressed
setState(() => file = File(file.path));
}
//but will send normally to storage !
if (file == null) return;
final fileName = basename(file.path);
final destination = 'files/$fileName';
task = FirebaseApi.uploadFile( destination,file);
setState(() {});
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)