'http://10.71.177.215:7000', 'username' => 'admin1', 'password' => 'Td123..', 'sysId' => 'PG', 'sId' => ["a066b080481649f9a7669e397cfd614f"], 'ip' => '10.71.177.215', 'port' => '1554', ] ); $tdwy = new TdwyController(); $result = $tdwy->getRtspById(); $path = '金家渠煤矿/井下区域/摄像头'; if (!is_dir('/www/wwwroot/video.nxjiewei.com/public/' . CameraEnum::M3U8_FILE_PATH . '/' . $path)) { mkdir('/www/wwwroot/video.nxjiewei.com/public/' . CameraEnum::M3U8_FILE_PATH . '/' . $path, 0777, true); } //取流进程 $exec = 'nohup /usr/bin/ffmpeg -i "' . $result['content'][0]['url'] . '" -fflags flush_packets -max_delay 1 -an -flags -global_header -hls_time 1 -hls_list_size 3 -hls_flags delete_segments+omit_endlist -vcodec copy -y /www/wwwroot/video.nxjiewei.com/public/' . CameraEnum::M3U8_FILE_PATH . '/' . $path . '/' . CameraEnum::M3U8_FILE_NAME . ' >/dev/null &'; shell_exec($exec); $exec = 'nohup /usr/bin/ffmpeg -i "' . $result['content'][0]['url'] . '" -vcodec copy -acodec copy -vbsf h264_mp4toannexb -f hls -hls_flags delete_segments -segment_list_size 10 -hls_list_size 2 /www/wwwroot/video.nxjiewei.com/public/' . CameraEnum::M3U8_FILE_PATH . '/' . $path . '/' . CameraEnum::M3U8_FILE_NAME . ' >/dev/null &'; dd($result); '/usr/bin/ffmpeg -i "rtsp://10.71.177.215:1554/s?dev=5203241b-27a0-4ca1-a11e-7a7c53b0f858&sup=d4021d3801e14ea4ba87bc9b072b2644&supip=192.168.4.216&support=8000&ch=1&type=0" -fflags flush_packets -max_delay 1 -an -flags -global_header -hls_time 1 -hls_list_size 3 -hls_flags delete_segments+omit_endlist -vcodec copy -y /www/wwwroot/video.nxjiewei.com/public/files/video/m3u8/金家渠煤矿/井下区域/摄像头/out.m3u8 >/dev/null &'; } }