-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Support edge/forward to Aliyun and Tencent CDN. #1202
Comments
First, create live domain at here, please select your region. First, click here to create a domain for live streaming, and select your region. Click manage button to mange the domain, about DRM and url. Click the "Manage" button to manage the domain, configure anti-theft chain, streaming, and playback information.
|
Then, config the DRM and publish/play url of that domain. Then, configure the DRM (authentication information) of the domain name and generate URLs for streaming and playback. For each publish/play url, you should generate the For each streaming and playback URL, the authentication information needs to be generated separately. The best practice is to generate URLs programmatically, and for the specific algorithm, please refer to the live streaming authentication documentation.
|
Next, start SRS in edge or forward server:
Please replace the Replace
|
Finally, publish stream to Aliyun CDN, or your SRS then play:
Play stream |
Today, forwarding with srsv2.0-r5 to Aliyun was not successful. There might be some configuration errors.
Streaming center address: However, if streaming to SRS and then forwarding to Alibaba Cloud, playback will not be possible. Does this mean that Alibaba Cloud no longer supports this operation? The stream is also shown as offline in the Alibaba Cloud backend. The console displays the following error message: 1007 reset by peer.
|
Actually, I just found out that I don't need to stream, just starting SRS results in an error.
|
I tried it, it is possible. The SRS configuration is as follows:
Generate the streaming address in the Alibaba Cloud console: When streaming to SRS, it will forward to Alibaba Cloud. Please note that when streaming, it is necessary to include authentication information in the URL.
When playing, it is also necessary to include authentication information in the address.
|
May I ask a question? Currently, I am pushing the stream to SRS, then using the configuration file to forward it to an Alibaba Cloud server. However, the online stream is not displayed on the Alibaba Cloud server, even though the resource monitoring in the domain management section shows resource movement. The videos cannot be played. Can you please explain why?
|
[2020-06-08 20:34:39.382][Trace][9011][217] connected, version=0.0.0.0, ip=, pid=0, id=0, dsu=1
|
ffmpeg -rtsp_transport tcp -re -i rtsp://admin:luke1234@192.168.0.108 -vcodec copy -acodec copy -f flv rtmp://192.168.0.22/AppName/StreamName?auth_key=1591621430-0-0-ca4f580a543d387b7874ea7baff0db8f
|
Inside the log, there is information that SRS actually forwarded successfully. Assuming that the push/pull streaming domain names for Alibaba are: push.ali/pull.ali The above information is based on SRS 3.0.141.
|
|
@liguocahng
|
Open a new issue to describe the problem of domain name forwarding, and provide a detailed description.
|
Reopen for #2130 |
In some other cases, when forwarding, the vhost is also carried and cannot be removed through configuration, causing similar issues. Expectation: The configuration of forward should allow the cancellation of vhost parameter configuration, specifically only vhost, while other URL query parameters should still be used. Temporarily using exec to resolve it. exec {
enabled on;
publish ./objs/ffmpeg/bin/ffmpeg -f flv -i rtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream] -c copy -f flv rtmp://cdn.con/[app]/[stream];
}
|
@springjk Another solution is to modify the source code.
|
@langyastudio
In my scenario, the resource usage is roughly similar to when I used "forward" before. The resource usage also depends on the incoming bitrate and the number of transcoding processes, but I haven't done any specific calculations. As for stability, I haven't noticed any issues in the past few days. I see that "forward" also uses ffmpeg for forwarding, so there shouldn't be much difference.
|
@springjk
|
Dup to #1342 |
Fixed in 2.0.255 and 3.0.40
The text was updated successfully, but these errors were encountered: