Browse Source

优化实时拉取摄像头视频流接口,修改视频流分辨率1920*1080为640*480

james 1 week ago
parent
commit
5cd0fe7101

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

@@ -22,7 +22,6 @@ import com.usky.iot.service.vo.BuildFacilityStatusVO;
 import org.apache.tomcat.jni.Local;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import sun.security.util.Length;
 
 import java.text.SimpleDateFormat;
 import java.time.LocalDateTime;

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

@@ -49,7 +49,6 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.interceptor.TransactionAspectSupport;
 import org.springframework.web.multipart.MultipartFile;
-import sun.net.dns.ResolverConfiguration;
 
 import javax.servlet.ServletOutputStream;
 import javax.servlet.http.HttpServletResponse;

+ 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 -strict -2 -ac 1 -r 30 -s 1920x1080 -q 10 -f flv rtmp://"+rtmpIp+":1935/hls/"+deviceUuid;
+        String command = "ffmpeg -i rtsp://"+accountNumber+":"+videoPassword+"@"+videoIp+":"+videoPort+" -vcodec copy -acodec aac -ar 44100 -c:v libx264 -strict -2 -ac 1 -r 30 -s 640x480 -q 10 -f flv rtmp://"+rtmpIp+":1935/hls/"+deviceUuid;
         System.out.println(command);
 
         try {