Parcourir la source

修改获取图片封面图功能

qiuzijian il y a 3 ans
Parent
commit
5f70e3f725
2 fichiers modifiés avec 3 ajouts et 3 suppressions
  1. 2 2
      .idea/workspace.xml
  2. 1 1
      Modules/Camera/Services/CameraServices.php

+ 2 - 2
.idea/workspace.xml

@@ -437,12 +437,12 @@
       <workItem from="1641785500605" duration="61000" />
       <workItem from="1641786030534" duration="477000" />
       <workItem from="1641800375826" duration="26685000" />
-      <workItem from="1643085370753" duration="12888000" />
+      <workItem from="1643085370753" duration="13132000" />
     </task>
     <servers />
   </component>
   <component name="TimeTrackingManager">
-    <option name="totallyTimeSpent" value="442939000" />
+    <option name="totallyTimeSpent" value="443183000" />
   </component>
   <component name="ToolWindowManager">
     <frame x="0" y="0" width="1440" height="900" extended-state="0" />

+ 1 - 1
Modules/Camera/Services/CameraServices.php

@@ -817,7 +817,7 @@ class CameraServices
 
                 if ($file_exists && $ts_exists) {
                     //查询是否存在封面图
-                    if (!$cover_picture && $camera_id == 12032) {
+                    if (!$cover_picture) {
                         //获取第一帧作为封面图
                         $cover_exec = 'ffmpeg -i ' . public_path() . '/' . CameraEnum::M3U8_FILE_PATH . '/' . $path . '/' . CameraEnum::M3U8_FILE_NAME . ' -vf "select=between(mod(n\, 25)\, 0\, 0), setpts=N/24/TB" ' . public_path() . '/' . CameraEnum::M3U8_FILE_PATH . '/' . $path . '/' . CameraEnum::COVER_PICTURE_NAME;
                         exec($cover_exec);