Ver código fonte

优化实时拉取摄像头视频流接口,修改切片时间

james 1 semana atrás
pai
commit
c697c35deb

+ 1 - 1
service-iot/service-iot-biz/src/main/java/com/usky/iot/service/impl/VcDeviceServiceImpl.java

@@ -75,7 +75,7 @@ public class VcDeviceServiceImpl extends AbstractCrudService<VcDeviceMapper, VcD
         String videoPassword = one.getVideoPassword();
         String videoIp = one.getVideoIp();
         String videoPort = one.getVideoPort().toString();
-        String command = "ffmpeg -i rtsp://"+accountNumber+":"+videoPassword+"@"+videoIp+":"+videoPort+" -vcodec copy -acodec aac -ar 44100 -c:v libx264 -preset ultrafast -tune zerolatency -strict -2 -ac 1 -r 30 -s 1280x720 -q 10 -f flv -hls_time 10 -hls_list_size 0 rtmp://"+rtmpIp+":1935/hls/"+deviceUuid;
+        String command = "ffmpeg -i rtsp://"+accountNumber+":"+videoPassword+"@"+videoIp+":"+videoPort+" -vcodec copy -acodec aac -ar 44100 -c:v libx264 -preset ultrafast -tune zerolatency -strict -2 -ac 1 -r 30 -s 1280x720 -q 10 -f flv -hls_time 1 -hls_list_size 3 -hls_flags delete_segments rtmp://"+rtmpIp+":1935/hls/"+deviceUuid;
         System.out.println(command);
 
         try {