Commit 1d35f6457422ffa1edc9911c9069ecaeb1e9b7e4

Authored by liwei2917
1 parent 350d4af1

抽帧时长修改

src/main/java/com/cnlive/shenhe/api/VideosControllerApi.java
@@ -194,7 +194,9 @@ public class VideosControllerApi { @@ -194,7 +194,9 @@ public class VideosControllerApi {
194 JSONObject extParam = new JSONObject(); 194 JSONObject extParam = new JSONObject();
195 195
196 if(!video.getCategory().equals(CommonConst.CATEGORY_WITNESS)){//非“目击者”视频 196 if(!video.getCategory().equals(CommonConst.CATEGORY_WITNESS)){//非“目击者”视频
197 - attach.put("interval", 10); 197 + Integer interval=10;//默认抽帧时长
  198 + interval=video.getDuration()/3600*10+10;//抽帧时长的算法:视频时长每增加一小时,抽帧时长增加10秒
  199 + attach.put("interval", interval);
198 attach.put("strategy", 1); 200 attach.put("strategy", 1);
199 attach.put("duration", video.getDuration()); 201 attach.put("duration", video.getDuration());
200 }else{ 202 }else{