Android压缩
16lz
2021-12-04
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(安卓)SDK 下载地址
- Android获取本机Mac地址及IP地址方法
- android发送restful风格的http请求
- Android(安卓)Asynchronous Http Client
- android 图片压缩工具类
- Android音乐播放器之经典布局
- android 混淆时需要注意的地方