Android压缩
16lz
2021-01-23
android视频压缩
效果图
选择当前视频大小为 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; }
压缩成功之后效果 视频文件会在下面的输出地址中显示
代码地址:
https://download.csdn.net/download/smallredzi/12057132
更多相关文章
- 最新eclipse中android插件安装下载地址
- android手机两种方式获取IP地址
- android 开启本地相册选择图片并返回显示
- Android 异步任务加载图片代码
- Android获取本机Mac地址及IP地址方法
- android 开发上传图片遇到返回 FileNotFoundException
- Android ListView(Selector 背景图片 全选 Checkbox等按钮)
- Android中的Picasso实现圆角图片
- Android 设置图片的四个角 为圆角