![]() In VLC, use the srt://media_gateway_ip:port to watch the stream.Provides the IP broadcast address. ffmpeg -re -i video-file.mp4 -c copy -f flv rtmp://media_gateway_ip/live/stream Configure the source so it looks like this.įrom another server send the video stream to the Media Gateway using this command (you need ffmpeg installed). In case you want your source to be a video file instead of a camera stream, reconfigure the source or add another route with new source and destination of which the source is RTMP. Make sure you specify the destination port, not the source port and the protocol should be srt. Enter the IP address of the AWS instance and specify the destination port like srt://public_IP:port. Go to this website, download and install VLC and from the menu click on Media | Open Network Stream. There is really nothing much to say here. And if everything is OK after about 8-10 seconds you’ll see a green dot next to your source in the Media Gateway. It will tell you that the app can’t connect to the server. If something is not right, you’ll see it right away on your camera. Now, that you have a connection, make sure it’s active by selecting it and after that just hit the Record button. The defaults are 640×480 with audio, but you can change that in the settings for the app. Go to Settings (the gear icon), Connections and click on the (+) sign to add a connection.Įnter a name for your connection, and for the URL enter the public IP of your instance and the port of the listener, so it looks like srt://public_IP:port. On your phone download this app from Google Play or App Store. In my case, you have to add UDP ports 5001 to the rules of the security group. SUPER IMPORTANT: Make sure you edit the security group for this instance and open the ports for the source and destination. Click Add and once you go back, click Create to create the route. Change the Type to Listener and leave the rest of the parameters as-is. Can you use some other ports? Yes, you can as long as they are not the same and greater than 1024 and less than 65535. The Media Gateway passes the signal from UDP 50000 (source) to UDP 50001 (destination). Name the destination however you like, make sure the Protocol is TS over SRT and the Port is 50001. You can’t stream from your phone directly, because your phone’s bandwidth and horse power are minuscule, so you need a gateway. A camera on your phone sends the video to our instance in AWS and this instance (Media Gateway) distributes the feed to numerous viewers. The Destination is where the broadcast will be distributed. So, this tells the Media Gateway to listen on port UDP 50000 for any incoming broadcast. It will tell you how to tweak these parameters. As I said earlier, if you want a better throughput, read the SRT deployment guide doc that I’ve sent earlier. The Mode is Listener and the rest are the defaults. The Protocol is TS Over SRT and the port is 50000. Further down, enter a description for the Source Name, in my case it’s Larix Cam or whatever you want to put here. For the Route Name, enter a description and make sure the checkmark is checked for Start Route. So, from the screen that you see, click on the button to add a route. I won’t go into details what each option does and what each keyword means, I’ll just guide you through creating a route for you to be able to broadcast. Once the instance boots up log with the default username haiadmin and the password is your instance id which is i-0123something. Create the instance as you normally do, make sure you have a public IP and the ports that are recommended in the security group given are open (22, 80 and 443). OK, in my case I’ll go with a t3.medium instance which is 2 CPUs and 4GB RAM. It’ not a necessary read to continue with this post, but it’s strongly recommended once you have everything up and running. It describes how to size your environment and it gives you practical guidance on how to configure the Media Gateway. I strongly suggest that you go over this document. Is it 2 CPUs, 4 CPUs, 8? Well, nobody knows your needs, but it also depends on what type of stream are you sending, is it going to be a low-res or 1080p, how many users will consume that stream, etc. ![]() Another important thing is the size of the instance, how much horse power you need. So if you are not streaming, just shut down the instance. I’ll choose Pay-as-You-Go Media Gateway.Īs you can see, the software is not that cheap and you pay as much as you used. You’ll see several options(SRT Gateway vs. In AWS, launch a new instance from the AWS Marketplace and search for SRT. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |