|
@@ -119,11 +119,13 @@ public class CameraUtil {
|
|
|
String ph = "flv/" + DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, new Date())
|
|
|
+ "/" + channel + "/"
|
|
|
+ UUID.randomUUID().toString() + ".flv";
|
|
|
- try {
|
|
|
- return historyPlay(list, ph);
|
|
|
- } catch (Exception e) {
|
|
|
- log.error(e.getMessage());
|
|
|
- e.printStackTrace();
|
|
|
+ if (!ObjectUtils.isEmpty(list)) {
|
|
|
+ try {
|
|
|
+ return historyPlay(list, ph);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error(e.getMessage());
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
@@ -400,18 +402,24 @@ public class CameraUtil {
|
|
|
|
|
|
public static void main(String[] args) throws IOException {
|
|
|
|
|
|
- List<String> fromVideoFileList = new ArrayList();
|
|
|
- String p = "C:\\Users\\Administrator.DESKTOP-0NUUTMM\\Desktop\\work\\106\\流媒体\\";
|
|
|
- String newfilePath = p + "hb.flv";
|
|
|
- fromVideoFileList.add(p + "20230303_174931_175031-d6d56396-b9a8-11ed-aeb9-00163e06a5f3.flv");
|
|
|
- fromVideoFileList.add(p + "20230303_175032_175132-fb32b9fe-b9a8-11ed-aeb9-00163e06a5f3.flv");
|
|
|
- fromVideoFileList.add(p + "20230303_175133_175233-1f97af04-b9a9-11ed-aeb9-00163e06a5f3.flv");
|
|
|
- fromVideoFileList.add(p + "20230303_175234_175334-43f4daf1-b9a9-11ed-aeb9-00163e06a5f3.flv");
|
|
|
- fromVideoFileList.add(p + "m.flv");
|
|
|
- fromVideoFileList.add(p + "m33.flv");
|
|
|
- fromVideoFileList.add(p + "mv.flv");
|
|
|
- fromVideoFileList.add(p + "mvido.flv");
|
|
|
- convetor(fromVideoFileList, newfilePath);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ String channel = "34020000001320000002";
|
|
|
+ String startTime = "2023-03-09";
|
|
|
+ String endTime = "2023-03-09";
|
|
|
+ String param = "channel=" + channel + "&startTime=" + startTime + "&endTime=" + endTime;
|
|
|
+ String s = HttpUtils.sendGet("http://47.106.159.135/streams" + "/api/record/flv/list", param);
|
|
|
}
|
|
|
|
|
|
|