| | |
| | | * Javacv录制视频 |
| | | */ |
| | | @PostMapping("/rVoids") |
| | | public void rVoids() { |
| | | public void rVoids(String url) { |
| | | String UUID = DateUtil.time(); |
| | | UUIDs=UUID; |
| | | RecordVideoThread recordVideoThread = new RecordVideoThread(); |
| | | recordVideoThread.filePath = "D:\\software\\minio\\data\\jfpt\\void\\"+UUID + ".mp4"; |
| | | recordVideoThread.timesSec = 0L; |
| | | recordVideoThread.streamURL = "https://web.byisf.com:18000/live?port=1935&app=live&stream=0012415A75C6-1";// 最好设置结束时长 如直接停止程序会造成输出文件的损坏无法正常播放 |
| | | String newJson = StringEscapeUtils.unescapeHtml4(url); |
| | | recordVideoThread.streamURL =newJson;// 最好设置结束时长 如直接停止程序会造成输出文件的损坏无法正常播放 |
| | | recordVideoThread.isAudio = true; |
| | | thread = new Thread(recordVideoThread); |
| | | thread.start(); |
| | |
| | | |
| | | |
| | | @PostMapping("/stop") |
| | | public void stop(String jid) throws FrameGrabber.Exception { |
| | | public String stop(String jid) throws FrameGrabber.Exception { |
| | | //返回前端路径 |
| | | String vaddress = null; |
| | | thread.stop(); |
| | |
| | | vaddress = "https://web.byisf.com/" + PRF_MINIO_URL + UUIDs + ".mp4"; |
| | | //把路径通过警情id添加到警情信息 |
| | | alarmService.updateVaddress(vaddress,jid); |
| | | return vaddress; |
| | | |
| | | } |
| | | |
| | | } |