1

As far as i understand reading all these articles:

docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-rtmp.html docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-overview.html docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Tutorials.html docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/wowza-creating-stack.html docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-rtmp-creating.html docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-rtmp-values-specify.html docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AMS5.0SubscribingToAMS.html docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/LiveStreamingAdobeMediaServer5.0.html

And in particular the following:

https://aws.amazon.com/it/blogs/aws/amazon-cloudfront-now-supports-streaming-media-content/ https://aws.amazon.com/it/blogs/aws/using-amazon-cloudfront-for-video-streaming/

It looks like it is NOT possible to mirror a live streaming RTMP using CloudFront with a Web or RTMP Distribution on TCP 80 or TCP 1935, since those distributions are based the delivery/mirroring/caching of static files for both players and video files (FLV).

The support on the live streaming is offered by Amazon via CloudFormation stack and Adobe Media Server or WOWZA integration, but in our scenario the client already has its own Red5 streaming server, already working and set up.

How is it possibile to use CloudFront to mirror a Live Streaming RTMP connection on TCP 80 or 1935, by using an origin server and RTMP flow that is running on a Red5, instead of delivering a static FLV file from an S3 hosting ?

I would like to understand if this solution is supported by Amazon and where to find the knowledge base to perform such configuration.

Basically, in our scenario we already have the RTMP exposed on the public web, we only need AWS to cache it through CloudFront and serve to other clients.

We want to try doing a Web Distribution only for the Flash Player which will be downloaded by the clients to see the streaming, and we would like the player to point to AWS CDN mirroring URL for the live streaming.

Is this possible and how ?

Thank you very much, Best Regards

0

I just spent some time working on this recently. The answer is no, as another answer to this question points out.

However, you can essentially string up your own RTMP CDN using AWS. You can set up a bunch of nginx-rtmp instances to be edges.

nginx-rtmp documentation can be found on the project's GitHub (https://github.com/arut/nginx-rtmp-module/). You basically run a bunch of these whichever way you prefer (EC2 instances, ECS as I'm doing, or however you like) but you configure them to pull from the ingest server.

You then load balance the edges and pull from them for viewing.

This gets a bit complicated as you're basically rolling your own CDN from scratch using AWS EC2 instances and probably want to have distribution points in multiple regions. Depending on your scale, it may make sense to have intermediate nodes that serve to pull from the origin and redistribute to regional edges.

See the "pull" directive in nginx-rtmp. A sample config:

rtmp {
   server {
       listen 1935;

       application streamapp {
           live on;
           pull rtmp://my-streaming-server.com:1935/streamapp;
      }
   }
}
| improve this answer | |
  • Hi, thanks for this useful suggestion Misha. Do you have some specific documentation or can point to some online resource about how to set up nginx-rtmp instances as edges, and maybe particularly on the AWS ? We already know how to setup nginx to proxypass RTMP requests to an internal Red5, but what we need is to have the client streaming towards our main nginx/Red5, which will re-stream the content towards another CDN server in AWS hosting nginx/Red5 that will be used by thousands of players also hosted on CDN. – KRiSh05 Sep 20 '16 at 12:50
  • @KRiSh05 I edited my response to add some more detail. Please let me know if I can help explain things a bit better. Depending on your scale, it may be easier to string up a small CDN yourself this way or it may be easier / more cost effective to use a company like Akamai. – Misha Nasledov Sep 20 '16 at 20:06
  • Thank you very much for the useful info! i confirm i've been able to setup and run a nginx-rtmp-module mirror on an EC2 instance yesterday. It works very well with RTMP but it looks like rtmp-module project has no support for RTMPT yet. Do you know of any workarounds about this using Red5/Red5Pro / nginx as mirrors on EC2 perhaps ? implementing RTMP over HTTP is crucial to avoid firewall restrictions on the client side. Thanks! – KRiSh05 Sep 23 '16 at 13:44
  • @KRiSh05 I haven't worked with Red5 before, but doing some quick research, doesn't look like nginx-rtmp does RTMPT. However, Red5 can do origin/edge configuration. You'll have to configure your Red5 instances appropriately, but otherwise it should work pretty much how I described. github.com/mondain/red5/blob/master/doc/tags/0_8_0/… – Misha Nasledov Sep 23 '16 at 18:17
1

A CloudFront distribution can deliver streaming content by using the following HTTP-based streaming protocols:

  • Adobe HTTP Dynamic Streaming (Adobe HDS)
  • Apple HTTP Live Streaming (Apple HLS)
  • Microsoft Smooth Streaming
  • MPEG-DASH

Cloudfront is designed to distribute HTTP VOD/Live Stream traffic and RTMP VOD. For Live Streaming RTMP you may want to look at other CDN services such as Akamai. You should be able to use both services together if you'd like to use CloudFront for your HTTP traffic and Akamai for your RTMP Live Streams.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.