RTMP Server in the era of HTTP video streaming

Given the growing popularity and support of HTTP video streaming, it may be tempting to consider Real Time Messaging Protocol (RTMP) streaming obsolete. But in many cases, working with RTMP server is still very meaningful. As soon as Macromedia first pronounced RTMP with Flash Player 6 in 2002, the brand new Macromedia Flash Communication Server MX (FCS) required to stream the evolving Flash Video (FLV) format, stream was live or VOD.

However, for FCS, licensing costs were high (up to $5,000 per server), and as a result, CDN costs were high than other proprietary streaming formats. Some manufacturers in the industry have called RTMP streaming costs a “Flash tax”. But Flash Player has been a ubiquitous introduction to desktop browsers for well over a decade, much larger than other plug-ins. Though, streaming server technology has traditionally been harder for web developers to implement, and simpler HTTP delivery has mostly been easier and more cost-effective. In 2003, Macromedia enabled Flash Player 7 to support HTTP delivery of FLV files, allowing integrators to use standard web server technology to deploy online video.

So in many ways, RTMP as a VOD transport delivery has not been a requirement for web video for more than a decade. As a video solution architect, I think of business requirements as the leader in most audio video decisions. And still, in 2014, RTMP is the de facto standard for the following use cases:

Publishing live streams from software/hardware encoders: Almost all streaming devices support RTMP to publish to CDN providers and streaming servers. Some native mobile applications also use RTMP libraries to publish live video from their mobile camera.

Near-instant search/playback: One of the benefits of RTMP streaming is its enhanced search capability. With real-time streaming, the player can search anywhere in the video with less buffering than HTTP delivery. However, to enjoy this feature, you need a Flash Player on your desktop and as such, it is not possible in mobile browsers. HTML5 browsers use HTTP domain requests to facilitate faster searching of VOD files.

Content Protection: RTMP Server can facilitate different levels of content protection, from obfuscation to true DRM. RTMP streams are not stored for playback on a desktop browser.

Adaptive Streaming: One of the preferred uses of RTMP is adaptive streaming playback, where we provide the video player with more bitrates and content resolutions, providing the best resolution at the current network speed. Some HTTP adaptive streaming technologies, such as HLS and MPEG-DASH, allow similar delivery, but RTMP may be more responsive to switching one bitrate to another. Unfortunately, there is no standard for HTTP adaptive streaming between HTML5 video-enabled browsers. As such, the Flash-based display of adaptive streaming is still a requirement for adaptive streaming.

Live Streaming Playback: While live streams do not need to be adaptive, compressed video segments apply the same principle to all live streaming playback. For desktop playback within the browser, virtually every live streaming event requires a video player that supports Flash-based rendering and RTMP playback. Apple Safari on iOS natively supports HLS, and luckily, all modern streaming servers, including the Wowza Streaming Engine, support RTMP and HLS compression.

The requirement for a Live Streaming Flash Player will only change if MPEG-DASH appears everywhere as Flash currently. If Internet Explorer 8, 9 and 10 support is required to install live streaming, then RTMP streaming is still required. Also, if you need a delay close to zero in a live stream, then HTTP streaming will almost certainly not meet your needs while RTMP is capable; HTTP mechanisms require that multiple packets be collected on the server before being sent to the video player.

python hosting

In summary, if your video workflow involves live streaming or any kind of packaged video installation, RTMP is the key to a successful video experience. HTTP delivery has already replaced most Flash VOD installs on video, but HTTP video can’t handle all RTMP video use cases.

Another important setup on Red5 Server is the Python Hosting offered to all hosting customers, with python cpanel hosting the advantage is cheaper and easier to install and run python scripts on a normal hosting. With Python Hosting and rtmp server the customer can really start a webmasters and increase a number of usages to host python scripts or even video chat or live streaming.

As my university professor used to say the computers language for the next 50 years will be python, fast, easier with multiple modules which allow any developer to start an application running python is a few short hours.

Web hosting in Ethiopia

Web design is a web development process that creates a website that has a good layout, graphic design, typography, user interface, etc to make it appealing to users and easy to use. Starting a business requires the implementation of the business plan but sustaining and maintaining requires tremendous efforts because at this stage the effectiveness and proficiency of the business plan and strategies in achieving the desired goal are put to test. Livin in a digital world, web design is an important part of the online marketing platforms and strategies that must be properly utilized to skyrocket your business to achieve your business goal. The importance of good web design to your business include

  1. It provides easy accessibility of information on product and services at customer convenient time.
  2. It brands business and creates awareness for goods and services than other forms of advertisement if properly optimized for users and search engines.
  3. It represents your business in the online community.
  4. It makes your business more credible and reliable because of the opportunity to make an inquiry.
  5. It creates a good impression in the mind of your potential customers.
  6. It helps to thrive in your competitive niche and increase sales.
  7. It is best adaptable in solving customers problems in buying services.

Website is essential for sustainable growth of business but when poorly designed will not yield the desired result thus choosing an expert in web designing must be done with care to maximize utilization of time and money and prevent damage to your business because web design services vary in quality depending on the competency and experience of the expert hired. In need of high-quality web design at an affordable price, prove your seriousness by patronizing and buying the unprecedented and transcendent services of Ethiopia Web Hosting and Design company where customers expectations metamorphose into fruition.

About Ethiopia Web Designing and Hosting Company

Ethiopia Web hosting and Design is a premier Web design company of notable standard that specializes in web design and hosting. We have twelve years of experience with magnificent achievement and remarkable success in web design and hosting. We have built an appreciable reputation for the creation of positive return on investment for our clients which we are not willing to stanch and relinquish. We have our first class servers in the USA and we partner with Hosting Marketers Inc, one of the main web hosts in the United States of America. Ethiopia web hosting is the leading provider of shared web hosting in Ethiopia. We have our main data center located in Chicago board of trading Building which is one of the world largest institutions equipped with infrastructures to provide:

  1. redundant and precision power supply.
  2. 24×7×365 manned security and video surveillance.
  3. Air conditioning and HVAC.
  4. 24×7×365 datacenter staff to provide assistance for customers.
  5. Network assets

Our infrastructures are the state of the art to provide you with the best hosting services.

  • Ethiopia web design service

Web design is multi-facet discipline involving web graphic design, user interface design, typography, and standard code and Search Engine Optimization. We have competent and savvy personnel who tangle as a team to create a website that has these following features:

  1. Effective measures in meeting the target market and also made appropriate and suitable for the identified trend of the audience.
  2. Optimal balance between aesthetics and clarity.
  3. Required layout, instruction, and labeling to make it user-friendly to enhance usefulness and versatility to users.
  4. Mobile Optimization for high ranking in Search engine result page (Serp) by using responsive web design in order to increase traffic and conversion rate.
  5. Search engine optimization strategies rightly implemented.
  6. Web browsers supporting typography.
  7. Motion graphics and infographics to make the presentation easier without depleting the target market.
  8. Catching and friendly domain name that matches the business name with a popular top-level domain (.com, .net, .org, .info) to create a good and lasting impression in visitors mind at a reasonable price of 500 birrs per year. Deal with us and experience our outstanding creativity and connection. The minimum price for our web design service is 2000 birr.
  • Ethiopia Web Hosting service

Ethiopia web hosting provides individuals and organizations websites internet access via the world wide web. Our quality hosting services provide personal website creator, small businesses, developers and large institutions customers with various hosting services to meet their target market at competitive prices. The hosting packages have been carefully and well-formulated to provide web spaces, bandwidth, domain name, email addresses, file transfer protocol, techies support, server-side script, frontpage extensions, etc that are users goal replenishing, enhancing and supporting. The availability of website and downtime stated in our Service Level Agreement is duly comply to. We provide the buyer of hosting services with 24 hours a day 365 days a year of customer support desk – a staff to provide the solution to complains made not, thus accounting for our reputation as not just packs of huge bandwidth limit and webspace. The detail description of our hosting packages are as follow :

  1. Hosting one for 1500 birr / 51 dollar per year

Cpanel/softaculous, 5GB web space, file transfer 500GB, unlimited domains/emails/databases, cloudflare directly on Cpanel, PHP version selector, and free SSL certificate.

  1. Hosting two for 3200 birr / 108.8 dollar per year

Cpanel/softaculous, 10GB webspace, file transfer 1000GB, unlimited domains/emails/databases, CloudFlare directly on Cpanel, PHP version selector and free SSL certificate.

  1. Hosting three for 5200 birr/176.8 dollars per year

Cpanel/softaculous, 20 GB webspace, file transfer 2000GB, unlimited domains/emails/databases, CloudFlare directly on Cpanel, PHP version selector and free SSL certificate.

  1. Reseller one for 4800 birr/163.2 dollars per year

WHM/Cpanel/softaculous, unlimited Cpanel account, 10 GB webspace, file transfer 250 GB, unlimited domains/emails/databases, CloudFlare directly on Cpanel, PHP version selector and free SSL certificate for all your account.

  1. Reseller two for 9000 birr/306 dollars per year

WHM/Cpanel/softaculous, unlimited Cpanel account, 20 GB webspace, file transfer 500 GB, unlimited domains/emails/databases, CloudFlare directly on Cpanel, PHP version selector and free SSL certificate for all your account.

  1. Reseller three for 14500 birr/483 dollars per year

WHM/Cpanel/softaculous, unlimited Cpanel account, 30 GB webspace, file transfer 750 GB, unlimited domains/emails/databases, CloudFlare directly on Cpanel, PHP version selector and free SSL certificate for all your account.

  1. Server one for 2500 birr/85 dollar per month

Dual Quad-Core Xeon E5520, 200 GB hard disk, 8 GB RAM, 10 TB transfer ( 1 Gbps uplink), Cpanel/whm, 5 usable IP addresses, fully managed

  1. Server two for 5200 birr/176.8 dollars per month

Intel Xeon 4 Core, 2×500 GB hard disk, 16 GB RAM, 20 TB transfer ( 1 Gbps uplink), Cpanel/whm, 5 usable IP addresses, fully managed

  1. Server three for 7500 birr/255 dollars per month

Quad-core Xeon 5410, 2×120 GB SSD hard disk, 48 GB RAM, 30 TB transfer ( 1 Gbps uplink), Cpanel/whm, 5 usable IP addresses, fully managed

Which is better for live streaming, RTMP vs HLS vs WebRTC?

It’s hard to say which one is better, as we’re not comparing apples. Let’s break it up to the strengths and weaknesses of each method.

RTMP used to be the de facto standard for live streaming. Many CDNs offer delivery that scales to the masses. RTMP, however, does not take into consideration that broadcaster and viewers might have internet connections that aren’t always up to the task of transferring the stream at full speed. Smartphones and web browsers are also unable to play back RTMP natively; Browsers used to depend on a flash plugin for playback, which has been phased out over the last couple of years.

HLS was created for using existing HTTP CDNs for delivering live streams. It scales great, but latency can suffer in many implementations. Bitrate can adapt depending on the viewers needs. Most devices can play HLS natively, or through a javascript player. This is probably the most cost-effective way of delivering video.

WebRTC is more focused for one-to-one streaming. Bitrate is adaptable, but not many CDNs support edge delivery over WebRTC – those that do cost quite a bit more than other solutions. WebRTC can be played back in most browsers and smartphones today, using javascript players. Open source solutions for native playback and broadcasting are also available.

Red5 or Wowza Media Server consulting services

Since 2008 we worked with Red5 and Wowza Media Server platform, developing custom modules, helping our clients to integrate a number of systems to control the stats or installing a Wowza control panel into their servers, debugging performance issues, and tuning performance.

Our main areas of expertise are:

  • Live Broadcasts, Video chats Scripts
  • Server: custom module development
  • Integration: HTML, PHP, web services, etc.
  • Load Balancing

And since we know the Media Servers thoroughly, we might also be of help with:

  • Helping you choose the best server for your needs
  • Production environment setup and deployment
  • Server: installation & configuration
  • Wowza Control panel setup
  • Wowza Server: performance tuning

If you’re interested in our services, please contact us and we can further discuss your needs.

How to optimize wowza

This article provides suggestions for tuning Wowza Media Server on your production hardware.

Note: For use with Wowza Media Server® 2 and later.

 

  1. It is generally best to run the most recent Sun Java JDK (Java SE Downloads). It is best to run a 64-bit operating system with the 64-bit Java VM. The 64-bit VM enables Java heap sizes greater than 2GB.
    Note: If you are on a Mac with OS X 10.5.x or greater (Snow Leopard) with 64-bit hardware you can run the Java 6 VM. To change your default Java VM in OSX, open the Java preferences application /Applications/Utilities/Java/Java Preferences and drag the Java SE 6 item to the top of the Java Applications list.
  2. It is best to run the -server version of the Java VM. The -server option is enabled on Linux and Mac OS X by default. It is only on Windows where this option is not enabled by default. To enable the -server version of the Java VM on Windows, do the following:
    1. Install the latest version of the Oracle Java JDK and be sure that the JAVA_HOME environment variable is pointing to this Java installation.
    2. Edit the [install-dir]/bin/setenv.bat file to add the -server option to the startup scripts. For example:
      Code:
      set JAVA_OPTS=%JAVA_OPTS% -server
      Note: Affects both Windows Standalone and Windows Service, uncomment line 7.
  3. The default Java heap size for Windows is set to 768MB, and for Linux is set to 1200MB, which is great for development, but not large enough for high volume production use. If you are running the 64-bit version of the Java VM and have 4GB or more of RAM in your machine, we suggest a Java heap size of between 3000 MB to 5000 MB. If you have 16 GB or more RAM, we suggest a heap size of 8000 MB. We do not suggest a heap size above 10 GB as it can lead to long GC cycles/pauses. If you are running the 32-bit version of the Java VM or have less than 3GB of RAM in your machine, we suggest a Java heap size of 1500MB. Do not try to set a heap size greater than 1800MB when using the 32-bit VM. On many Linux platforms the server will start but will fail with an OutOfMemory error after a short period of time. Memory settings can be adjusted in the following script files (based on platform):
    • [install-dir]/bin/setenv.sh (Linux, Mac OS X and Solaris, around line 4)
      Code:
      JAVA_OPTS="-Xmx3000M"
    • [install-dir]/bin/setenv.bat (Windows Standalone and Windows Service, around line 4)
      Code:
      set JAVA_OPTS=-Xmx3000M
  4. Garbage collection (GC) tuning in Java is tricky. What works best in one server setup may not work in another. Through trial-and-error and customer feedback, we have several suggested approaches:Garbage Collection Options:

    We strongly recommend No Additional Settings. The default -server tuning (see step #2 above) works well for many streaming situations, so in most cases this tuning works great without additional settings.

    Only if you are experiencing problems with the Java Heap, such as a build-up of memory usage, should you try implementing one of the following Garbage Collection options:

    1. Concurrent Collector: The concurrent collector is designed for applications that prefer shorter garbage collection pauses and that can afford to share processor resources with the garbage collector while the application is running. The suggested additional settings are:If heap size is 5000 MB or greater, NewSize=512m
      If heap size is 3000 MB – 5000 MB, NewSize=256m
      If heap size is less than 3000 MB, NewSize=128m

      For example, with 64-bit OS, 8 GB RAM, and heap size of 6000 MB

      Code:
      -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:NewSize=512m
    2. Experimental: Garbage-First garbage collector (G1): In the Sun Java 6 (Update 14 or greater) release, there is a new garbage collector that is in the experimental stage. It is designed for low pause time, high-throughput applications such as Wowza Media Server. It is an option to explore. There is more information below. To enable this garbage collector, the additional settings are:
      Code:
      -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC

    To change the garbage collection settings, modify the following scripts:

    • [install-dir]/bin/setenv.sh (Linux, Mac OS X, and Solaris, uncomment line 10). For example:
      Code:
      JAVA_OPTS="$JAVA_OPTS -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:NewSize=512m"
    • [install-dir]/bin/setenv.bat (Windows Standalone and Windows Service, uncomment line 10). For example:
      Code:
      set JAVA_OPTS=%JAVA_OPTS% -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:NewSize=512m

    There is more detailed information here:

    Java SE 6 HotSpot[tm] Virtual Machine Garbage Collection Tuning
    Java SE 6 Performance White Paper
    The Garbage-First Garbage Collector (G1)

  5. For low-latency chat applications, it is best to use smaller socket buffer sizes (16000 bytes for read and write). The socket buffer sizes are configured in [install-dir]/conf/VHost.xml:
    Code:
    <ReceiveBufferSize>16000</ReceiveBufferSize>
    <SendBufferSize>16000</SendBufferSize>
  6. On Linux, increase the maximum number of file descriptors. This will address the Too many files open error message. To do this, edit the following two files:/usr/local/WowzaMediaServer/bin/wms.sh

    from:

    Code:
    #ulimit -n 20000

    to:

    Code:
    ulimit -n 20000

    /usr/local/WowzaMediaServer/bin/startup.sh

    from:

    Code:
    #ulimit -n 20000

    to:

    Code:
    ulimit -n 20000
    Note: This may fail on some versions of Linux or if you do not have permission to change the descriptor limit. If after making this change Wowza Media Server will not start, consult the documentation for your Linux distribution to see how to increase the descriptor limit.
    Note: On some versions of Linux, there is also a limit in the kernel that may need to be increased. Consult the documentation for your distribution. You may need to add the following line to your /etc/sysctl.conf file:

    Code:
    fs.file-max=20000
  7. On Linux, switch to using the Anticipatory elevator (as) elevator algorithm. It is described here:Choosing an I/O Scheduler for Red Hat
  8. On Linux, mount your disk with the noatime option. This operation will differ based on your Linux distribution. Here is a basic description of the setting:Using noatime Attribute
  9. To tune your server based on the available CPU resources of your server, use the following guidelines:The [total-core-count] refers to the total number of CPU cores in your server. For example, if you have dual quad core processors (two quad core processors), the [total-core-count] is:
    Code:
    2 (processor) x 4 (cores) = 8

    If your server supports hyper-threading, then use the total number of threads. In the above example, if hyper-threading is available, then the total number of threads is:

    Code:
    2 (processor) x 4 (cores) x 2 (threads per core) = 16

    With the number of cores and threads per physical processor continually growing, we suggest a maximum number of threads for each value below:

    In the configuration file [install-dir]/conf/VHost.xml:

    Code:
    HostPort/ProcessorCount: 2x[total-core-count] (maximum of 24) Note: The HostPort/ProcessorCount field in the Admin HostPort (/Port "8086") should not be modified.
    IdleWorkers/WorkerCount: 2x[total-core-count] (maximum of 24)
    
    NetConnections/ProcessorCount: 2x[total-core-count]  (maximum of 24)
    
    RTP/UnicastIncoming/ProcessorCount: [total-core-count]  (maximum of 12)
    RTP/UnicastOutgoing/ProcessorCount: 2x[total-core-count]  (maximum of 24)
    
    RTP/MulticastIncoming/ProcessorCount: [total-core-count]  (maximum of 12)
    RTP/MulticastOutgoing/ProcessorCount: [total-core-count]  (maximum of 12)
    
    HandlerThreadPool/PoolSize: (60x[total-core-count]) (maximum of 480)
    TransportThreadPool/PoolSize: (40x[total-core-count]) (maximum of 320)

    This assumes you have at least 1GB of memory per core and that in the case you have 4 or more total cores you are running the 64-bit Java VM using the suggested memory settings above.

  10. Running Multiple Virtual Hosts:If you are running more than one virtual host, the resource allocations must be distributed between each VHost. The simplest approach is to divide the settings listed above (which are intended for a single VHost) and distribute the resources across each VHost on your system. The settings do not have to be evenly divided, however, the total should equal what you would allocate if you were configuring for asingle VHost. If one of your VHosts will be idle most of the time, you may allocate more memory than the combined total. Be careful with this setting because excessive allocations are risky. An outOfMemory error will occur in the event both VHosts exceed the combined, available resources.

    Alternatively, in [install-dir]/conf/VHost.xml, you can set each VHost/HandlerThreadPool/PoolSize to “0” and VHost/TransportThreadPool/PoolSize to “0” which will cause the [install-dir]/conf/Server.xml settings for these properties to be used instead. This will instruct Wowza Media Server to manage the PoolSize amongst VHosts.

    A mixed approach can also be used with the [install-dir]/conf/VHost.xml file by setting the PoolSize to “0” for idle/minimal-use VHosts while using higher values for busy/high-performance VHosts with higher resource requirements.

  11. If you are not doing low latency streaming and you have a client side buffer of 3 or more seconds (NetStream.bufferTime), you can reduce the CPU load on the machine and handle more concurrent sessions by editing [install-dir]/conf/VHost.xml and changing the following two values:
    Code:
    IdleWorkers/CheckFrequency: 100
    Client/IdleFrequency: 500
  12. If you are having problems with multiple incoming multicast streams interfering with each other on Linux you may need to set the Java property java.net.preferIPv4Stack to true. To do this, edit [install-dir]/bin/setenv.sh and uncomment the following line (line 13):
    Code:
    JAVA_OPTS="$JAVA_OPTS -Djava.net.preferIPv4Stack=true"
  13. This really isn’t tuning but it seems like a good place… When streaming to the Adobe Flash player, it is important to try and avoid RTMPT (tunneling version of RTMP) as much as possible. RTMPT uses a polling mechanism which is very chatty and CPU intensive. We suggest employing a protocol rollover strategy so that only connections that need RTMPT use RTMPT. Is is described here:http://www.wowzamedia.com/forums/content.php?50
  14. On Windows 7, Server 2003 or 2008, it is probably best to turn off TCP auto tuning. There is information about how to do it here:How to disable Windows Vista TCP/IP auto-tuning