Category Archives: Wowza Streaming Engine

how to reduce HTTP Live Streaming (HLS) latency with Wowza Streaming Engine?

HTTP Live Streaming (HLS) is here to stay, it works everywhere, high quality and stability, but latency or delays between the stream and the end user can be 60-90 seconds, if you streaming live events that can be a very big issue, imagine Sports betting?
But with Wowza Streaming Engine it is possible to reduce the latency to 3 to 5 seconds.
It is not good enough but for now there is no other solution.

Below we have some adjustments that using the Wowza Streaming Engine Manage, we can easily improve, although of course there are some negative components.

This risks inherent of the configuration adjustements are due to smaller chunk sizes may result in playback errors if you fail to increase the number of seconds built into the playlist. If a stream is interrupted, and the player requests the next playlist, the stream may be interrupted when the playlist doesn’t arrive.

Additionally, by increasing the number of segments that are needed to create and deliver low-latency streams, you also increase the server cache requirements. To alleviate this concern, ensure that your server has a large enough cache, or built-in elasticity. You will also need to account for greater CPU and GPU utilization resulting from the increased number of keyframes. This requires careful planning for load balancing, with the understanding that increased computing and caching overhead incurs a higher cost of operation.

Lastly, as chunk sizes are smaller, the overall quality of the video playback can be impacted. This may result into either not being able to deliver full 4K video to the player, or small playback glitches with an increased risk of packet loss. Essentially, as you increase the number of bits (markers on the chunks), you require more processing power to provide smooth playback; without it, you get packet loss and interruptions.

A- In Wowza Streaming Engine Manager, click the Applications tab and then click live in the contents panel.

On the details page Properties tab, click Cupertino Streaming Packetizer in the Quick Links bar.

In the Cupertino Streaming Packetizer area, click Edit, and change the values for the following properties:

1- cupertinoChunkDurationTarget- Set the duration of each chunk in milliseconds. The default value is 10000, but the chunkDurationTarget must be smaller to reduce the latency of Apple HLS streams. For a one-second chunk size, set the value to 1000.

2- cupertinoMaxChunkCount- Sets the maximum number of chunks Wowza Streaming Engine stores in the available chunk list. The default value is 10, but for reduced latency streaming we recommend storing 50 seconds worth of chunks. For one-second chunks, set the cupertinoMaxChunkCount to 50; if you’re using half-second chunks, the value should be doubled (100).

3- cupertinoPlaylistChunkCount- Sets the number of items returned to the player in the playlist. The default value is 3, but for reduced latency streaming we recommend returning 12 seconds of data to the player. This prevents the loss of chunks between chunklist requests. For one-second chunks, set the cupertinoPlaylistChunkCount to 12; if you’re using half-second chunks, the value should be doubled (24).

ClickSave.

B- On the Properties tab, click Customin the Quick Links bar.

In the Custom area, click Edit.

Click Add Custom Property, specify the following custom property settings in the Add Custom Property dialog box, and then click Add:

1- In Path, select /Root/Application/LiveStreamPacketizer.

2- In Name, enter cupertinoMinPlaylistChunkCount.

3- In Type, select Integer.

4- In Value, specify the minimum number of chunks required before Wowza Streaming Engine provides a playlist to the player. The default value is 1, but for reduced latency streaming we recommend requiring a minimum of 6 seconds worth of chunks. For one-second chunks, set the cupertinoMinPlaylistChunkCount to 6; if you’re using half-second chunks, the value should be doubled (12).

Click Save and restart the application to apply the changes.

Done, try now. Or just contact Hosting Marketers and order our RTMP Wowza with our shared hosting Wowza Engine.

RTMP Servers

Real-Time Messaging Protocol or RTMP was developed originally by Macromedia, which then became Adobe. It was a system to implement streaming of video, text and audio over the internet between a flash player and a server with the RTMP setup.

Using fragments between the server and the user, it maintains a stable connection and because of that it has low latency, meaning that there is a very short delay, between the server and the user. The delay is perhaps 1 or 2 seconds.

The RTMP servers available are Adobe Media Server, Red5, Wowza Streaming Engine, Nginx RTMP server and a few more, but this 4 are the most common, although Adobe is very expensive and Red5 is difficult, personally I prefer Wowza RTMP, which has a number of advantages, we will talk about this on another post.

Going back to RTMP, it is a TCP-based protocol which maintains persistent stable connections and allows low-latency communication. To deliver streams smoothly and transmit as much information as possible, it splits streams into fragments, and their size is negotiated dynamically between the client and server.

RTMP servers are ideal for live streaming but also for Ondemand video streaming, it is also a necessary component for live video chats.

RTMP Server, how it works

The server must be setup with a media server, like Adobe or Red5, then the video stream connects to the RTMP installed on the server, the video stream could be a laptop with a software installed, this software is an encoder, there are a number of them, OBS Studio, but the most common is the Adobe, FMLE, which you can download free at http://hosting-marketers.com/flashmedialiveencoder_3.2_wwe_signed.msi (for windows computers, Mac computers you can download directly at Adobe site.)

On the encoder you enter the server RTMP, which would be something like this:

fmle encoder
click on the image to see larger size

rtmp://server_IP/live/stream_name

Then you connect and start the broadcast. this stream will go directly the RTMP server and you can now setup a player for your users, if you using a RTMP player you will need to use a flash player, but using Wowza Streaming Engine on the RTMP server it converts the stream to a HLS protocol which can be used on many other platforms as well, like smartphones and HTML5 Players. Although the HLS has the latency issue because of the flash players end of live it is nearly impossible not to use it. Nowadays, with a good configuration you can reduce the latency to 3 or 4 seconds.

So we have, YOU on your laptop with a camera and an encoder >>> your internet connection and the RTMP Server connection >>> and finally the player on your site broadcasting your live event. Or your video files.

How to setup Roku with Wowza Streaming Engine and Hosting Marketers

You need first to decided what you want to do, live streaming? Video Streaming? then order the appropriate Wowza package at

Wowza Hosting | Wowza Streaming Engine

I suggest you contact us with your requirements, because the bitrate on the packages are not very high and if you going to stream high quality videos you will need higher bitrate, we will customize your package by increasing the bitrate and reducing the number of users allowed.

The formula we use is as below:

package bitrate x viewers allowed = A

A / bitrate requested = new number of viewers

If your wowza package that you want to order is  Wowza 300 you allowed 512kbps.

https://hosting-marketers.com/wowza-hosting/

512 x 300= 153600

Now if you ask for 2000kbps bitrate:

153600 / 2000= 77 viewers

so you will have 2000kbps bitrate and 77 max. viewers.

Now for the instructions how to Stream to Roku using Wowza streaming engine.

So lets say you want to stream videos, you will need to order Ondemand Streaming.  After you order and agree on the bitrate upload a few videos files in MP4 format and slightly below the bitrate allowed. Your HLS URL for any of your videos would be something like this

https://11234566777778.streamlock.net:1937/8XXX/mp4:video.mp4/playlist.m3u8

you will have your HLS URL from your wowza control panel, on it should click on “Media Player” and you will have on the left a player and on the right the code for the player, copy it to a notepad and find on it the “sourceURL” that will be it for the sample file. replace the sample file with the name of your uploaded video.  For instructions on setting up the ondemand streaming check the tutorial here.

Now lets go  basic instructions for packaging and uploading your application and creating a private channel on a Roku set-top box to stream videos from our Wowza to the Roku device.

Notes:

  • You may need to configure your stream as a multi-bitrate stream as outlined in How to create Apple App Store compliant streams (audio only rendition).
  • If you experience playback problems, see How to switch between absolute and relative URLs in Apple https Live Streaming playlists. This article describes how to switch back to using absolute paths for iOS playlists. This has been fixed in recent Roku firmware updates.
  • If your stream only uses AC3 surround sound audio, set the Roku Audio mode (found in Settings > Audio > Audio) to Auto. If Audio is set to Stereo and the stream only contains AC3 audio, users unable to playback surround sound will not hear audio in the stream. Viewers can identify if their HDMI device can decode Dolby Digital AC3 surround sound by looking for a (DD) or (DD+) label next to the Autosetting. To increase accessibility of your stream, make sure you have both stereo and surround sound audio tracks in your stream.

 

  • Setting up the Roku device and Roku SDK

    1. Get your Roku running and associate it with an online Roku account.
    2. In your online account, sign up for the developer program, and then download the Roku SDK (Software Development Kit) and unzip RokuSDK.zip.
    3. Navigate to the Packaging Your Application section of the Roku SDK documentation, and then follow the instructions to set up a DevID and Password. These credentials are used when packaging your application before uploading to a channel.
    4. Unzip the RokuSDK/examples/zips/simplevideoplayer.zip example and edit the simplevideoplayer/source/appMain.brs file as follows:
      1. Comment out the following lines using an apostrophe () character:
        'urls = ["https://video.ted.com/talks/podcast/CraigVenter_2008_480.mp4"]
        'qualities = ["HD"]
        'StreamFormat = "mp4"
        'title = "Craig Venter Synthetic Life"
        'srt = "file://pkg:/source/craigventer.srt"
      2. Uncomment and modify the following lines so that the urls line matches the one below:
        ' a test stream from Wowza
        urls = ["https://11234566777778.streamlock.net:1937/8XXX/mp4:video.mp4/playlist.m3u8"]
        qualities = ["SD"]
        streamformat = "hls"
        title = "my video file"
        srt = ""
        Note: To play your own content, change the urls value to the playlist URL of your content.
    5. Select all files in the simplevideoplayer folder and compress these files (not the folder itself) into a zip file to upload to the Roku box.
    6. Follow the Run the package Utility instructions in the Packaging Your Application section of the Roku SDK documentation to upload your package zip file and register your application to the Roku player. After successfully uploading the application to the Roku box, the application will show up as a channel.

    After completing these steps, a prompt to run your application appears on your Roku box. After the application is running, you can refer to the Roku SDK documentation for information on how to set up a private channel and make it accessible to users to subscribe.

Using Wowza Streaming Engine and our wowza control panel to Live Camera Restream

The option Live Camera Restream, on our wowza control panel is used for IP cameras, the output of IP camera is normally RTSP or RTP ( example: rtsp://[camera-ip-address]:554/axis-media/media.amp ).

This format RTP or RTSP is useless for players, by using our wowza server and the Live Camera Re-Stream we convert this signal for playback on all supported player technologies. Some cameras are not supported, please open a ticket and email us the rtsp or rtp for us to check if it works on our wowza servers.

After you order you receive an email with the wowza control panel URL, username (the email) and the password. Login to the wowza control panel and click on to enter the service overview.

click on the image to see the full picture:

the service overview of IP Camera Re-Stream is shown on the image below:

On the right menu, there are some links, Configure, restart, stop, and reporting.

Reporting will give you information on the videos seen, traffic, connections and so on. On the top menu there are some links which provide information on how many viewers you have online which countries and bandwidth used.

Click on “Configure” and then Plugin. On “Shoutcast / Icecast / IPCAM URL” replace http://localhost:8000 with your IP Camera URL, it should be a rtsp or rtp, (ex: rtsp://[camera-ip-address]:554/axis-media/media.amp )

You have to restart the service, at the bottom click “Update Configuration”

After restart the system will take you back to the service overview. Now click “Media Player” on the top menu grab the player code and paste it on your site.

For further instructions on how to use our wowza control panel check the links below:

1- Live streaming

2- TV Station

3- Ondemand Streaming

4- IP Camera Re-Streaming

Ondemand Video Streaming on our Wowza control panel

After you order ondemand streaming you will receive an email with the wowza control panel URL, your username (your email) and a password. Login to the control panel and click on to go to the overview of your server:

click on the image to see the full picture

your server overview will look like the image below.

There are a number of links on the right menu, configure, restart, stop, reporting, Build Playlist, File manager and player links.

I suggest you don’t make any changes on the configuration, the important buttons are “File Manager” were you upload your video files, and “Build Playlist” were you create a playlist and access the 2 players we offering, a flash player and a HTML player.

Reporting will give you information on the videos seen, traffic, connections and so on. On the top menu there are some links which provide information on how many viewers you have online which countries and bandwidth used.

Click on File Manager to upload or drag your videos to the server. Videos must be in flv or mp4 format. You can use a ftp software to upload the videos, but the but click on the video and drag it to the server is probably easier.

Now go back to the server overview and click on “Build Playlist”

click on create a playlist,

enter your playlist name, ex. playlist1 and click “continue”

click on the videos and with the mouse move your available Media from the right to the left which will be your playlist.

When adding the videos you will see on the left the videos uploaded “Available Media” and you need to move the ones you want to the right “Build Your Playlist” some videos may have a exclamation mark, that means the bitrate on the video is higher then the allowed on your package, you better delete these videos from the server and convert them again with the correct bitrate.

Save the playlist and now you can click on the player links, you have 2 options, Flash Player and HTML Player, I suggest you use the HTML Player, nicer and it works on mobile devices also.

Html Player has 2 options, static and dynamic, static every time you add or change your playlist you will have to grab the code and paste it again on your site. the Dynamic player any changes you make on the playlist will show immediately on your site player.

and the flash player:

For further instructions on how to use our wowza control panel check the links below:

1- Live streaming

2- TV Station

3- Ondemand Streaming

4- IP Camera Re-Streaming