-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RTMP stream forwarding (Forward) is specified through a URL. #231
Conversation
* 2.0release: support push flv stream over HTTP POST to SRS. fix the unicode to ascii add stream status to api. update donation update donation enable hls for push flv. update donation. add push flv conf fix the flv caster bug, when nread is 0, disconnect it. fix the http flv stream caster. refine the http message, set the connection if required. refine code, use decoder to parse flv stream fix the http read chunked encoding bug.
Why do we need to specify the forward address when connecting?
|
Actually, I just referenced your vhost where the parameters are passed on the connect. Actually, I also find it strange. Usually, it is better to add the forward address at the end of the address.
|
Why not specify these parameters in the configuration file?
|
This makes it more convenient to change whether to forward the stream at any time. Currently, we have a use case where most of the streams only need to be viewed on the local network. They do not need to be viewed on the internet. However, sometimes certain playback sources need to be played on the internet. If this forwarding is configured through a config file, it is not very flexible. Additionally, if authentication is required when using a third-party CDN, the authentication information needs to be included in the URL. This makes it very inflexible to configure through a configuration file.
|
Authentication information should be placed in the URL because it often changes.
|
If you think it's appropriate, you can support adding vhost information in the foward, submit a new pull request, I have closed this for now.
|
RTMP stream forwarding (Forward) is specified through a URL with the hashtag 53.
Usage: No additional configuration is required in the configuration file.
When pushing, the forward parameter can be added in the app. Currently, only adding parameters in the app is supported.
For example:
Method 1: Add forward IP and port
Push address:
rtmp://192.168.2.170:1935/myapp?forward=192.168.2.170:19350/mystream
The server will automatically push the stream to the server 192.168.2.170:19350.
View the forward address:
rtmp://192.168.2.170:19350/myapp/mystream
to play the stream.View the source address:
rtmp://192.168.2.170:1935/myapp/mystream
Method 2: Add forward complete address
Push address:
rtmp://192.168.2.170:1935/myapp?forward=rtmp%3A%2F%2F192%2E168%2E2%2E170%3A19350%2Fyapp%2Fystream/mystream
Or
rtmp://192.168.2.170:1935/myapp...forward...rtmp%3A%2F%2F192%2E168%2E2%2E170%3A19350%2Fyapp%2Fystream/mystream
The server will automatically push to the server according to the address
rtmp://192.168.2.170:19350/yapp/ystream
.View the forward address:
rtmp://192.168.2.170:19350/yapp/ystream
.View the source address:
rtmp://192.168.2.170:1935/myapp/mystream
.Also, please note that the forward complete address needs to be URI encoded. You can use the
objs/research/librtmp/srs_rtmp_uri_encode
tool for encoding. A demonstration of the URI encoding program can be found intrunk/research/librtmp/srs_rtmp_uri_encode.c
.TRANS_BY_GPT3