|
@@ -473,6 +473,11 @@ ffmpeg -i "concat:1.ts|2.ts" -c copy output.mp4
|
|
|
* @return
|
|
|
*/
|
|
|
public static String startRecording(String cameraCode, String channel) {
|
|
|
+ try {
|
|
|
+ Thread.sleep(2);
|
|
|
+ } catch (InterruptedException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
log.info("-----startRecording------" + historyUrl + "/recordpro/api/start?streamPath=" + cameraCode + "/" + channel);
|
|
|
return historyUrl + "/recordpro/api/start?streamPath=" + cameraCode + "/" + channel;
|
|
|
}
|
|
@@ -1237,10 +1242,11 @@ ffmpeg -i "concat:1.ts|2.ts" -c copy output.mp4
|
|
|
public String playbackURLs(String code, String frontValue, String laterValue) {
|
|
|
|
|
|
try {
|
|
|
- TimeUnit.SECONDS.sleep(65 * Integer.parseInt(laterValue));
|
|
|
- log.info("--------------->playbackURLs");
|
|
|
+ log.info("--------------->playbackURLs-----异步开始-");
|
|
|
log.info("frontValue------------->" + frontValue);
|
|
|
log.info("laterValue------------->" + laterValue);
|
|
|
+ TimeUnit.SECONDS.sleep(65 * Integer.parseInt(laterValue));
|
|
|
+ log.info("--------------->playbackURLs");
|
|
|
PlaybackVo playbackVo = new PlaybackVo();
|
|
|
playbackVo.setCameraIndexCode(code);
|
|
|
// 获取当前时间
|
|
@@ -1250,7 +1256,7 @@ ffmpeg -i "concat:1.ts|2.ts" -c copy output.mp4
|
|
|
OffsetDateTime beforeTenMinutes = currentTime.minusMinutes(Long.parseLong(frontValue));
|
|
|
log.info("beforeTenMinutes------------->" + beforeTenMinutes);
|
|
|
// 获取报警后的时间
|
|
|
- OffsetDateTime afterTenMinutes = currentTime.plusMinutes(Long.parseLong(laterValue));
|
|
|
+ OffsetDateTime afterTenMinutes = currentTime.plusMinutes(Long.parseLong("0"));
|
|
|
log.info("afterTenMinutes------------->" + afterTenMinutes);
|
|
|
// 格式化时间
|
|
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSSXXX");
|