ai模型输出流配置化

main
陈伟 4 days ago
parent 6f23aa90dc
commit d016a11512

@ -2452,7 +2452,8 @@ namespace OpenAuth.App.ServiceApp
ExpandoObject();
var x = SnowFlakeSingle.instance;
//var pushUrl = $"rtmp://box.wisestcity.com:1935/live/{x.NextId()}";
var pushUrl = "rtmp://box.wisestcity.com:1935/live/11";
var config = ConfigHelper.GetConfigRoot();
var pushUrl = config["AIModelApi:PushUrl"];
json.rtmp_url = req.RtmpUrl;
json.push_url = pushUrl;
json.imgsz = 640;
@ -2487,7 +2488,6 @@ namespace OpenAuth.App.ServiceApp
json.tag = jsonTag;
var content = new StringContent(JsonConvert.SerializeObject(json), Encoding.UTF8, "application/json");
var config = ConfigHelper.GetConfigRoot();
var url = config["AIModelApi:Url"];
using var httpClient = new HttpClient();
var response = await httpClient.PostAsync($"{url}/start_detection", content);

@ -665,8 +665,8 @@ public class ConfigSubscribe : IJob
if (!string.IsNullOrEmpty(task.AIInspection) && task.AIInspection.Equals(true) &&
!string.IsNullOrEmpty(task.PushUrl))
{
// todo 停止直播
// todo 停止 aimodel 运行
// 停止直播
// 停止 aimodel 运行
var para = @$"{{
""bid"": {Guid.NewGuid().ToString()},
""data"": {{

Loading…
Cancel
Save