Browse Source

使用fmp4进行截图,以避免ffmpeg不兼容h265的flv导致的截图失败

pull/226/head
64850858 3 years ago
parent
commit
e21abeea37
  1. 4
      src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java

4
src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java

@ -114,9 +114,9 @@ public class PlayServiceImpl implements IPlayService {
WVPResult wvpResult = (WVPResult)responseEntity.getBody(); WVPResult wvpResult = (WVPResult)responseEntity.getBody();
if (wvpResult.getCode() == 0) { if (wvpResult.getCode() == 0) {
StreamInfo streamInfoForSuccess = (StreamInfo)wvpResult.getData(); StreamInfo streamInfoForSuccess = (StreamInfo)wvpResult.getData();
String flvUrl = streamInfoForSuccess.getFlv(); String streamUrl = streamInfoForSuccess.getFmp4();
// 请求截图 // 请求截图
zlmresTfulUtils.getSnap(flvUrl, 5, 1, path, fileName); zlmresTfulUtils.getSnap(streamUrl, 5, 1, path, fileName);
} }
} }
System.out.println(path); System.out.println(path);

Loading…
Cancel
Save