Explorar o código

查询回放视频根据报警ID

gao.qiang hai 1 ano
pai
achega
05db719941

+ 6 - 0
.idea/misc.xml

@@ -1,6 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="ExternalStorageConfigurationManager" enabled="true" />
+  <component name="JavaScriptSettings">
+    <option name="languageLevel" value="ES6" />
+  </component>
   <component name="MavenProjectsManager">
     <option name="originalFiles">
       <list>
@@ -14,4 +17,7 @@
     </option>
   </component>
   <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
+  <component name="SuppressionsComponent">
+    <option name="suppComments" value="[]" />
+  </component>
 </project>

+ 3 - 1
vehicle-admin/src/main/java/com/ozs/web/core/util/CameraUtil.java

@@ -720,8 +720,10 @@ ffmpeg -i "concat:1.ts|2.ts" -c copy output.mp4
                 log.info(ffmpegPath + " -re -i /opt/streams/file/" + code + ".mp4  -c:v copy -c:a copy -f rtsp rtsp://124.70.58.209:8554/live/" + code);
                 try {
                     // 创建ProcessBuilder对象,设置ffmpeg命令及参数
-                    ProcessBuilder pb = new ProcessBuilder("/usr/local/ffmpeg/bin/ffmpeg", "-re", "-i", "/opt/streams/file/"+code+".mp4", "-c:v", "copy", "-c:a", "copy", "-f", "rtsp", "rtsp://124.70.58.209:8554/live/44");
+                    ProcessBuilder pb = new ProcessBuilder("/usr/local/ffmpeg/bin/ffmpeg", "-re", "-i", "/tmp/file/"+code+".mp4", "-c:v", "copy", "-c:a", "copy", "-f", "rtsp", "rtsp://124.70.58.209:8554/live/44");
 
+                    // 设置工作目录,如果需要的话
+                    pb.directory(new File("/usr/local/bin/ffmpeg"));
                     Map<String, String> environment = pb.environment();
                     environment.put("LD_LIBRARY_PATH", "/usr/local/ffmpeg/lib");