重定向 RTMP 请求
Redirect a RTMP Request
是否可以向 rtmp
请求发出重定向 - 类似于 http 302 重定向?
我不可能修复我的内容中存在的所有 rtmp
url,所以我想放置一些基本的重定向器,将请求发送到我的新服务器。
谢谢!
RTMP中没有这个概念。您将需要客户端连接到端点以查询要广播到的 URL。
我还没有完全理解你,但我想我可以帮助你一点,并继续通过评论澄清。比如我不知道你是有不同的入口点还是只分发1->N。
Your proposal, if I didn't misunderstand, is that you have an RTMP
traffic as input of a basic redirector, and wants to send the same
content to a list of RTMP addresses placed for example in a text file.
Your question is how to implement this basic redirector, isn't it?
在这种情况下,您可以使用 FFmpeg 应用程序来完成,就像流式传输系统将数据发送到多个发布点(用于分发的 CDN)一样
文件:rtmp_output_list.txt
rtmp://001.entrypoint.your_cloud.com/live/your_name?user=your_user&pass=your_pass
rtmp://002.entrypoint.your_cloud.com/live/your_name?user=your_user&pass=your_pass
rtmp://003.entrypoint.your_cloud.com/live/another_name?user=another_user&pass=another_pass
...
Bash 调用 ffmpeg 的脚本:basic_redirector.sh
#!/bin/bash for RTMP_OUTPUT in `cat rtmp_output_list.txt`
RTMP_INPUT="rtmp://192.168.0.101/test"
METADATA="-metadata width=XXX -metadata height=XXX ... [rest of metadata]"
do
ffmpeg -i $RTMP_INPUT -async 1 -vcodec copy -acodec copy $METADATA -f megts -f flv $RTMP_OUTPUT
done
如果我没有正确理解您的意思,请发表评论,我会帮助您。
祝你好运。
是否可以向 rtmp
请求发出重定向 - 类似于 http 302 重定向?
我不可能修复我的内容中存在的所有 rtmp
url,所以我想放置一些基本的重定向器,将请求发送到我的新服务器。
谢谢!
RTMP中没有这个概念。您将需要客户端连接到端点以查询要广播到的 URL。
我还没有完全理解你,但我想我可以帮助你一点,并继续通过评论澄清。比如我不知道你是有不同的入口点还是只分发1->N。
Your proposal, if I didn't misunderstand, is that you have an RTMP traffic as input of a basic redirector, and wants to send the same content to a list of RTMP addresses placed for example in a text file. Your question is how to implement this basic redirector, isn't it?
在这种情况下,您可以使用 FFmpeg 应用程序来完成,就像流式传输系统将数据发送到多个发布点(用于分发的 CDN)一样
文件:rtmp_output_list.txt
rtmp://001.entrypoint.your_cloud.com/live/your_name?user=your_user&pass=your_pass
rtmp://002.entrypoint.your_cloud.com/live/your_name?user=your_user&pass=your_pass
rtmp://003.entrypoint.your_cloud.com/live/another_name?user=another_user&pass=another_pass
...
Bash 调用 ffmpeg 的脚本:basic_redirector.sh
#!/bin/bash for RTMP_OUTPUT in `cat rtmp_output_list.txt`
RTMP_INPUT="rtmp://192.168.0.101/test"
METADATA="-metadata width=XXX -metadata height=XXX ... [rest of metadata]"
do
ffmpeg -i $RTMP_INPUT -async 1 -vcodec copy -acodec copy $METADATA -f megts -f flv $RTMP_OUTPUT
done
如果我没有正确理解您的意思,请发表评论,我会帮助您。 祝你好运。