微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

修剪后如何压缩视频

如何解决修剪后如何压缩视频

我正在开发 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 举报,一经查实,本站将立刻删除。