Showing posts with label amazon. Show all posts
Showing posts with label amazon. Show all posts

March 22, 2021

Stream to AWS MediaConnect via SRT from Larix Broadcaster

AWS Elemental MediaConnect recently announced their support for SRT ingest. This makes it capable of receiving streams from all modern encoders, media servers and other SRT-powered software.

Larix Broadcaster has full support of SRT besides RTMP. RTSP and RIST, it also allows streaming simultaneously to multiple destinations.

Here's a brief instruction for how you can stream from Larix to MediaConnect using SRT.


Set up MediaConnect


First, log into your AWS account, go to MediaConnect control page and open Flows section.

Then click on Create flow to enter flow creation dialog.


First you enter a name for your flow and select availability zone if you need to. The Protocol name needs to be SRT listener. Another important field to specify is Inbound port which will be used for further connection setup. Also, White list CIDR block must be specified to allow your devices streaming into Media Connect.

Once you save the flow, you'll see the Inbound IP address, you'll need it for further connection setup.


Click on Start for your flow to get it ready to receive the content.

Now let's proceed with Larix Broadcaster setup.


Set up Larix Broadcaster via Larix Grove


If you haven't installed Larix Broadcaster yet, you can do it via Google Play and AppStore.

Now, in order to set up Larix easily, we'll use Larix Grove. Larix Grove format allows propagating streaming setting across devices using special URL. It can be distributed via QR code for easier import in your device. So we'll create QR code with our SRT ingest point.

Go to Larix Grove wizard, enter srt://ipaddress:port in URL field and select Caller mode for this connection. Click on QR code button to get the image.


Having the QR code, scan it it on our device using any app capable of that. It will open Larix Broadcaster and will import the connection settings automatically. All you'll need to do  after that it to tap on big red start button to initiate the stream.


Check MediaConnect input


Now go to MediaConnect, you'll see when your input becomes active.


You will see charts which means you have the stream up and running. You may also change flow setup if you need to make changes specific to SRT protocol, like set up latency, maxbw or other parameters.



You can use AWS Elemental MediaConnect documentation to see what you can do next with your stream.


Related documentation

SRT capabilities of Softvelum productsLarix Broadcaster, AWS Elemental MediaConnect docs


November 30, 2018

Using Amazon CloudFront for SLDP delivery

Live streaming is growing these days and a lot of its use cases require sub-second delay between image capture and its display on user's device.
That includes online chatting, betting and bidding, gaming, security and surveillance - all of them demand real-time picture to make the immediate response.

With the decline of Flash and RTMP as the main way to view live streams, the industry has been looking for new ways to deliver the media close to real-time.

Softvelum has developed SLDP, a last-mile delivery protocol for end-user devices to cover real-time demand. It's key features are:

  • Up to two-seconds delay between origin and player.
  • Multiple codecs support: it can deliver whatever your end-user platform can play, e.g. H.264, VP8, VP9, H.265/HEVC.
  • Adaptive bitrate support for delivering multiple resolutions and qualities.

Nimble Streamer software media server has full support for SLDP and its features. You can read this article to check how Nimble Streamer may take incoming live streams and produce SLDP based on that input.
SLDP playback is supported by SLDP Player. On Android and iOS, it's a native mobile application, while browser payback is covered by HTML5 JavaScript player working in any MSE- and MMS-enabled browser. All three players can be customized via respective SDKs.

Amazon CloudFront setup


SLDP is a streaming protocol based on WebSockets so it can be delivered via both HTTP and HTTPS on top of TCP.  This makes SLDP pervasive across any networks, including CDNs which support WebSockets.

Recently Amazon CloudFront announced full support for WebSockets. This allows AWS users to use all benefits of this delivery network to get all benefits of SLDP live streaming. If you're not yet familiar with AWS CloudFront, please check this page to get started.
CloudFront WebSockets setup is easy and seamless - you can complete it within a few minutes. In our example below we assume you will use ultimatemediastreaming.com domain for accessing your media streams. We'll add it into distribution settings and then use for further playback.

Notice that CloudFront does not cache WebSockets traffic. It serves only as a network for an optimal delivery.

Go to your AWS Management Console and find CloudFront in AWS services.

Find CloudFront service

You will be redirected to CloudFront Distributions control page.

CloudFront Distributions list

Here you need to click on Create Distribution button to proceed. You will be brought to Step 1 to select your delivery method for your content.

Click on Get started for Web delivery method.

You will need Web method so just click on Get started button. You will go to Step 2 to enter details.

Enter your domain.

This page has a lot of delivery parameters. However, with SLDP you don't need any of that except for Origin Domain Name field. Here you need to enter the domain name which you will map output stream to. In our example it's "ultimatemediastreaming.com" as mentioned previously. Your Origin ID will be generated automatically. You may also specify custom ports of origin server if you need to.

Now scroll down to the bottom of the page.

Create distribution.

Click on Create Distribution button to complete the process. You will then be taken back to distributions list.

Distribution is ready.
CloudFront will take some time to propagate setting across their network, but it won't take a few seconds. Once it's done, copy the Domain Name field value. In our example it's d1qarwymuxges8.cloudfront.net.

SLDP playback


Now CloudFront will take all requests from your viewers and take then to your Nimble Streamer instance.

So now all you need is to set up SLDP output from Nimble Streamer in case you haven't done this yet. Read more about how you can take input from various protocols with Open Broadcaster Studio, Larix Broadcaster and Haivision encoders as examples.

Once you have your SLDP ready, its full playback URL will be like
ws://x.x.x.x/liva_app/live_stream
Here "x.x.x.x" is your IP address and you can replace app name and stream name with your values. Then you map your IP to your origin domain name used in CloudFront settings. This will be like
ws://ultimatemediastreaming.com/live_app/live_stream
Since you've created a distribution in CloudFront, your stream will be available using these final URLs:
ws://d1qarwymuxges8.cloudfront.net/live_app/live_stream 
wss://d1qarwymuxges8.cloudfront.net/live_app/live_stream
The "ws://" prefix is for HTTP and "wss://" is for HTTPS.
You can use these URLs in any of your SLDP players. Your stream will be seamlessly delivered via CloudFront CDN.


Further steps


Now when you've set up low latency transmission, you can try fine-tuning it.

Key frame interval is the first option you could try, it affects the start-up time for a stream as well as switch time for adaptive bitrate stream. The less key frame interval is, the sooner a player will start the playback. Key frame interval is defined in encoder. Here's an example of how key frame interval and alignment can be set in Nimble Live Transcoder.

If you use our free HTML5 SLDP player parameters you may try playing with offset parameter to see how it works in your conditions with your key frame interval. Read this article for more details.

You may also find our SLDP FAQ useful. It clarifies some questions that our customers face when they try SLDP.

If you have further questions regarding SLDP or any other Softvelum technology, please contact us.

Related documentation


SLDP protocol, Nimble Streamer, SLDP setup in Nimble Streamer, Getting started with CloudFront

January 22, 2018

Using Amazon EC2 for HEVC transcoding

Nimble Streamer Live Transcoder is currently used in various live transcoding scenarios on various platforms. It can be deployed both to bare metal and virtual servers.

When it comes to HEVC (H.265) transcoding, there are certain limitations you may face. H.265 encoding is resource consuming so Nimble Live Transcoder supports only hardware encoding which is currently implemented for NVidia NVENC and Intel QuickSync. So if your project requires to use some cloud computing platform with no bare metal, you need to find a provider which has hardware acceleration available as part of cloud services. Our customers ask us about such provider so we wanted to do some analysis about this this.

Choosing EC2


After some research we ended up with Amazon Web Services (AWS) and their Elastic Compute Cloud (EC2). Here's what we have.

First, we need to define what chips are capable of HEVC encoding. Take a look at NVENC Support Matrix to see which of the chips have proper support. Considering latest NVidia changes in GeForce drivers EULA, not many cards can do what we need.

Having the list of proper chipsets, check EC2 instance types.  There are two of them that meet our criteria.

  • G3 instances have Tesla M60 based on 2nd generation of Maxwell chip family, starting from 1.14 USD per hour.
  • P3 instances have Tesla V100 based on Volta chip family, starting from 3.06 USD per hour.

We ran some tests on g3.4xlarge instance type, it has Tesla M60 chipset on board which we tested previously on bare metal. This time it also showed great results being used in cloud environment.

Notice that not all regions have P3 and G3 instances available. We tested our case in US East N. Virginia region, you should manually check what is the closest region with required instance types.

Working with Live Transcoder


Good thing about running any EC2 instances is that you can pay as you go. GPU-powered ones may cost significant amount of money so the best strategy would be to run them only when live streaming event take place.
The best usage scenario with Softvelum products would be as follows:

  1. Sign up for WMSPanel account, subscribe for it and subscribe for Live Transcoder license.
  2. Sign up for Amazon EC2 account
  3. Create your EC2 server instance with your preferred OS. We made our testing with Ubuntu 16.04.
  4. Install official NVidia drivers, check their website for latest version for your OS.
  5. Install Nimble Streamer instance on EC2 and register it in WMSPanel.
  6. Install Live Transcoder and register its license.
  7. Set up Live Transcoder scenarios and test them with your live streams.
  8. Stop EC2 instance.
  9. Prior to your live event, start EC2 instance.
  10. Your instance IP address will be changed after re-start, so make sure you add new IP to ingest URLs at your stream source.
That's it - you can stop and start again your instance any time you need it.


Notice that you may need some fine tuning if you'd like to use NVENC on high load, e.g. when transcoding multiple incoming streams on multiple GPUs. Take a look at this article for more details describing previous stress testing procedures and their results.

Please also check Transcoder troubleshooting article describing some approached to NVENC usage.

Zabbix monitoring of Nimble Streamer allows tracking server status, SRT streams and NVidia GPU status.

Feel free to visit Live Transcoder webpage for other transcoding features description and contact us if you have any question.

Related documentation


Live Transcoder for Nimble Streamer, HEVC support in Nimble Streamer, Live Streaming features,

September 23, 2015

Nimble Streamer deployment automation

WMSPanel is the official UI for Nimble Streamer and it is available under subscription model. Nimble Streamer is the free of charge media server which can run fine on lower-end servers or Virtual Machines.
Our customers have long and successful story of using automation deployment of Nimble Streamer, e.g. using Amazon Elastic Cloud. Nimble Streamer can be configured independently of WMSPanel specifying all settings via changing configuration files in manual mode.

However, to add pre-configured Nimble Streamer to WMSPanel for obtaining full statistics it was necessary to add each server in the control panel manually via the import configuration procedure.

Performing manual manipulations is very inconvenient in case of large number of media servers. That's why Nimble Streamer allows automating the process of adding pre-configured media server to WMSPanel.

Please back up your rules.conf before using this method to avoid accidental damages.

Notice that only active (not paused) settings are saved to rules.conf so only they will be restored.


Register a new server with existing rules


First, you can register a new server with a pre-configured rules.conf.
Run this command:
sudo /usr/bin/nimble_regutil -u admin@account.com -p password --apply-rules-conf
After that regutil registers Nimble Streamer instance and then automatically transfers the Nimble Streamer settings from /etc/nimble/rules.conf file to WMSPanel, and saves the authorization settings to the /etc/nimble/nimble.conf file for sending data to the panel, without changing the other settings.

After adding in WMSPanel, each server can be configured via Web interface. Each operation of setting up a new streaming scenario can be applied to all servers instances  immediately.

Re-apply some template rules.conf to an existing server


You can also apply some existing rules.conf file to the already registered server. You specify some rules.conf with pre-defined settings in your command and this will remove all existing settings of Nimble instance and will apply new settings instead. Use this command:
sudo /usr/bin/nimble_regutil -u admin@account.com -p password --reapply-rules-conf some_rules.conf
Here some_rules.conf is a file with some previously defined settings, it's an optional parameter.

Notice: This option is available only by request for subscribed customers. Contact our helpdesk in order to ask to enable this feature.

Adding via web UI

You may also consider adding an existing server via web UI. It does the same operation as described here but there you may also analyse the rules before applying them via WMSPanel.

Repairing after HW failure


If you existing server hardware has failed and/or you got new system on board, you may want to add this server as existing one rather than registering as new. Read this article for details of this operation.

With the described functionality, Nimble Streamer and WMSPanel users get additional benefits of automatic infrastructure deployment, best resilience and reliability of their streaming processes.


Cloud backups of Nimble configuration


Cloud backups of Nimble Streamer configuration: with this new feature you can save streaming configs of your Nimble Streamer instances into WMSPanel to improve redundancy. You can do it manually or automatically, the price is just 1 USD per month per backup.

Follow us in social media to get updates about our new features and products: YouTubeTwitterFacebookLinkedInRedditTelegram

July 22, 2015

Streaming VOD from remote HTTP storage via Nimble Streamer

Many broadcasting companies use remote media storage as a convenient way of organizing video-on-demand (VOD) streaming infrastructure. The main advantage of dedicated storage is having all files located in single repository, instead of maintaining multiple copies across all edge servers, and save costs on multiple large hard disk drives. The second advantage is ability to organize centralized backup and failure recovery and convenience of managing content, such as adding, removing or replacing media files. This is why storages like Amazon S3 are extremely popular.

Remote storage support is now available in Nimble Streamer. It works with any server, that supports file access via HTTP protocol with HTTPS as an option. Nimble Streamer support HLS, and MPEG-DASH transmuxing as well as progressive download from remotely stored media content. Advanced caching techniques allows Nimble to effectively stream files, those size exceeds available file system capacity.

Any S3-compatible storage is supported, e.g. DigitalOcean where both v2 and v4 signature types are supported.

Install Nimble Streamer


Please, see how to install Nimble Streamer for your operating system. Or read this blog article to see the example of Nimble Streamer installation on Ubuntu virtual machine.

Set up streaming routes


For local files (available in file system), please check "Set up streaming routes" section of "How to stream VOD with Nimble Streamer" article from our blog.
For media files stored remotely, you can perform the following steps:

1. Check that your media is available from remote Storage via HTTP (just try to simply download any media file). In this step you should have a media URL like this http://s3-us-west-1.amazonaws.com/wmspanel/bunny.mp4 (you can use any available remote storage).

2. Navigate to "Nimble Streamer" -> "VOD & re-streaming routes" menu section of WMSPanel web interface and click "Add VOD streaming route" link.

3. In the appeared dialog specify path, that is requested by your viewers via public URL and path, that requested content is taken from. Select "http://" or "https://" in dropdown list and enter path to your remote files location.

4. Optionally, specify the AWS access key id and AWS secret access key if your media files are protected by Amazon.

5. Click "OK" button.




Your new route will appear in Nimble routes list.

Now if you request http://localhost:8081/s3/bunny.mp4/playlist.m3u8, then Nimble Streamer takes file http://s3-us-west-1.amazonaws.com/wmspanel/bunny.mp4, transmuxes it, and performs HLS streaming.
This works for HLS and MPEG-DASH by default. If you'd like to use this for progressive download, you need to explicitly enable it in Nimble configuration file.
Open nimble.conf file and add the following parameter.
enable_pd_for_remote_vod=true
Then re-start Nimble Streamer. You can read more about config file on this page.

Test VOD streaming


Now you can test VOD streaming on a desktop and on a mobile device using HTML5 player and JWPlayer. Check "Test streaming media via multiple devices" section of "How to stream VOD with Nimble Streamer" article.

That's it.


Now you've set up a media server that can stream MP4 video files stored on remote HTTP Storage via HLS and MPEG-DASH protocols.

Take a look at Nimble Streamer performance tuning basics to see examples of live streaming resources usage and also learn about basic approaches to best performance.

In addition to single unit efficiency, you may create robust delivery networks by using load balancing techniques for spreading the load between several Nimble instances.

You can use "vod_cache_timeout" and "vod_cache_min_storage_time" parameters available in Nimble Streamer settings to define maximum and minimum cache lifetime periods.

You can also take a look at the video where Jan Ozer of Streaming Learning Center and Yury Udovichenko of Softvelum discuss dynamic packetizing of live, VOD and DVR content. It gives more details about Nimble Streamer VOD streaming, especially about remove HTTP origin feature set, it's pros and cons.



SMIL files support


Nimble Streamer can process not only media files, but also SMIL files located in remote HTTP storage. This works for both HLS and MPEG-DASH. You can use this feature as a convenient way of providing your viewers with different bitrate options for video playback.

Server-side ads insertion for VOD


Nimble Advertizer allows dynamically insert ads into VOD streaming. It supports pre-roll, mid-rolls and custom business logic based on programmable handlers. VOD files from remote HTTP location are also supported for SSAI.

Troubleshooting


Nimble Streamer internal transmuxer buffer sometimes may not be enough to fit generated HLS chunk. This may lead to this error in Nimble Streamer logs:
[tmux1] E: buffer is too small to generate
By default the buffer is 40MB. You can increase it using "vod_transmuxing_buffer". Read Nimble Streamer configuration description for config setup details.


Related documentation



December 25, 2011

Clouds and virtuality for Wowza and WMSPanel

Virtual services and cloud computing become more popular during last few years. No surprise that some resource-consumption solutions and products has been recently exploring that opportunity.

As example, Wowza Media Services provides Amazon AWS installation for those who wants to create scalable streaming solutions. There are many other companies that provide similar functionality. This gives a low threshold for companies that want to try providing streaming services. For mature companies this also allows re-structure their assets and increase overall robustness. You can even make your own cloud using software like Parallels solutions to be independent from 3rd-party vendors.

WMSPanel also uses this technology, we chose Rackspace for both staging and production environment. And of course it works fine with Wowza Media Server on Amazon EC2.

Please also read more about our current cloud architecture.

The pros of cloud solution for us are simple.
  1. Ready to use environment. No need to buy or rent a hardware when we need it. It's already there because virtual machines are always available.
  2. Scalability is a big advantage. When a large customer starts some free evaluation (since first 2 weeks are free of charge) we may see some overload. In this case we can just switch to another service plan to keep our customers out of trouble and to have plenty of time to optimize things.
  3. When a customers wants a separate branded instance of WMSPanel, we can setup a virtual machine that will handle his own requests without any intersection with other customers.
The only contra is that pricing plans are missing granularity, i.e. in case of increased consumption we have to buy more than we actually need. This means extra stability for our customers but a bit bigger price for us.

Given all pros and cons we can already say for sure that optimization has its cost, literally. When we optimize our software, we can see numbers that say how much we cut down our expenses and hence what service price may be optimal for our customers.

This also means that we may provide agile customers pricing. And cost becomes much lower as long as we keep implementing and improving WMSPanel.

WMSPanel cloud control is also used for controlling Nimble Streamer, a light-weight HTTP streaming server for HLS, Smooth and progressive download streaming and re-streaming.