-
-
[原创]使用FFMpeg+openSSL下载在线视频,可下载https
-
发表于: 2019-10-30 13:31 3155
-
注:下载压缩中apk有一个bug,在视频seek大于30分钟时,会自动跳到视频的开始处,此问题出在so中,so已替换最新的,问题已解决,本人较懒apk没有编译最新的(2019-10-31)
下载地址: https://www.lanzous.com/i736mcf
播放例子代码:
https://bbs.pediy.com/thread-255133.htm文件中的APP加壳工具:
https://bbs.pediy.com/thread-251275.htm
更多资源传送门:
https://bbs.pediy.com/user-854079.htm
protected void downVideo(boolean isChecked) {
if(fileDown == null) {
fileDown = new MediaFileDown();
fileDown.setDownListener(new OnCallParparedListener() {
@Override
public void onCallParpared() {
tv_down.setText("下载中...");
}
}, new OnCallCompleteListener() {
@Override
public void onCallComplete() {
//下载完成
T.showShort(getApplication(), "下载结束");
fileDown.stop();
swDown.setChecked(false);
tv_down.setText("下载结束");
}
}, new OnDownloadingListener() {
@Override
public void onDownloadingListener(int curr, int duration) {
if(duration>0) {
int leng = curr *100 /duration;
// Log.e(TAG, "curr "+curr+" duration "+duration);
// Log.e(TAG, "进度-->"+leng);
pb_hint_progress.setSecondaryProgress(0);
pb_hint_progress.setProgress(leng*pb_hint_progress.getMax() /100);
}
}
}, new MediaFileDown.OnErrorListener() {
@Override
public void onError(int arg0) {
}
});
}
if(isChecked) {
String name = null;
if(!isEmpty(urlName)) {
name = urlName+"_"+System.currentTimeMillis()+".mp4";
}else {
name = "video"+"_"+System.currentTimeMillis()+".mp4";
}
fileDown.setDownload(urlPath, Environment.getExternalStorageDirectory()+File.separator+name);
fileDown.start();
// mediaPlayer.setSaveVideoFile(Environment.getExternalStorageDirectory()+File.separator+name);
}else {
fileDown.stop();
swDown.setChecked(false);
}
}
[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!
最后于 2019-10-31 16:10
被富到流油^-^编辑
,原因: 补充说明
赞赏
他的文章
看原图
赞赏
雪币:
留言: