android视频压缩 

效果图 

Android压缩_第1张图片Android压缩_第2张图片

Android压缩_第3张图片选择当前视频大小为 65.57MB  压缩有三种方式

分别对应的是 High   Mediunm  Low  上面用的是Low 最小的 

 public static VideoCompressTask compressVideoHigh(String srcPath, String destPath, CompressListener listener) {        VideoCompressTask task = new VideoCompressTask(listener, VideoController.COMPRESS_QUALITY_HIGH);        task.execute(srcPath, destPath);        return task;    }    public static VideoCompressTask compressVideoMedium(String srcPath, String destPath, CompressListener listener) {        VideoCompressTask task = new VideoCompressTask(listener, VideoController.COMPRESS_QUALITY_MEDIUM);        task.execute(srcPath, destPath);        return task;    }    public static VideoCompressTask compressVideoLow(String srcPath, String destPath, CompressListener listener) {        VideoCompressTask task =  new VideoCompressTask(listener, VideoController.COMPRESS_QUALITY_LOW);        task.execute(srcPath, destPath);        return task;    }

 

Android压缩_第4张图片压缩成功之后效果  视频文件会在下面的输出地址中显示

代码地址:

https://download.csdn.net/download/smallredzi/12057132 

更多相关文章

  1. 最新eclipse中android插件安装下载地址
  2. android手机两种方式获取IP地址
  3. android 开启本地相册选择图片并返回显示
  4. Android 异步任务加载图片代码
  5. Android获取本机Mac地址及IP地址方法
  6. android 开发上传图片遇到返回 FileNotFoundException
  7. Android ListView(Selector 背景图片 全选 Checkbox等按钮)
  8. Android中的Picasso实现圆角图片
  9. Android 设置图片的四个角 为圆角

随机推荐

  1. [置顶] Android Dialog的十种类型汇总
  2. 【Android】 Android中适配器简介
  3. android studio debug签名设置
  4. Android 实现跳转到Google Play 详情页
  5. android打开联系人的代码
  6. android日期控件显示
  7. android java 检测文件夹(目录)是否存在,
  8. android获取控件宽高
  9. Android 自定义 LinearLayout
  10. Android 中颜色对应的值