重定向视频流

问题描述 投票:0回答:1

假设我正在将带有OBS的RTMP视频发送到C#应用程序,例如http://my_site/.com

例如,我想在中间件中将其重定向到内部rtmp服务器-网址rtmp://internal/live下>

如何执行该“重定向”而不破坏视频流?

app.Use(async (context, next) =>
{
    if (!context.Request.Headers.TryGetValue("ApiKey", out var key))
    {
        context.Response.StatusCode = (int)HttpStatusCode.Unauthorized;
        return;
    }

    if (!apiKeys.Contains(key))
    {
        context.Response.StatusCode = (int)HttpStatusCode.BadRequest;
        return;
    }

    Redirect(await next.Invoke());
});

如果我仅重定向所有数据,是否需要添加一些支持rtmp协议?

假设我正在将带有OBS的RTMP视频发送到我的C#应用​​程序,例如http://my_site/.com,我想将其在中间件中重定向到例如内部rtmp服务器-网址rtmp:// internal / live我该如何...

c# asp.net-core nginx rtmp
1个回答
0
投票

RTMP是双向协议。您可以在两者之间使用TCP代理(例如ssh隧道或ha代理)。但是您仍然需要运行某些软件的RTMP服务器。那可能在您的应用程序中,甚至可能在nginx中。

© www.soinside.com 2019 - 2024. All rights reserved.