• How to stream using HEVC/H.265 transcoding

    This article will help you create applications to stream video using the HEVC/H.265 video format, which is a preview feature in Wowza Streaming Engine™ software versions 4.1 and later.

    Note: Check back for updates and new workflows as additional tools and players support HEVC. This article was updated on October 7, 2015.

    Contents


    About HEVC/H.265
    Transcode to H.265
    Prepare the player

    About HEVC/H.265


    High Efficiency Video Coding (HEVC), also called H.265, is a video format that was developed as a successor to the H.264/MPEG-4 AVC ISO standard. HEVC enables more compression than H.264 with comparable image quality. As a result, HEVC encoding can provide substantially better video quality at lower bitrates. Targeted at next-generation HDTV displays, HEVC supports 8K ultra-high-definition video and resolutions up to 8192 x 4320 pixels.

    The HEVC/H.265 video format hasn't been widely adopted yet by encoding technologies or player vendors. Wowza Streaming Engine 4.1 and later, however, introduces preview support for the HEVC/H.265 format.

    Transcode to H.265


    This section explains how to configure Wowza Streaming Engine software to transcode a live video stream to H.265 for MPEG-DASH playback in DivX Web Player and Apple HLS playback in VLC media player.

    Configure the live application

    To configure the default live application to deliver MPEG-DASH and Apple HLS video and to transcode using the new H.265 template in Wowza Streaming Engine software, do the following:

    1. In Wowza Streaming Engine Manager, click the Applications tab, and select the live application in the contents panel.

    2. Under Playback Types, confirm that MPEG-DASH is enabled for MPEG-DASH playback in DivX Web Player and that Apple HLS is enabled for Apple HLS playback in VLC media player.



    3. Click Transcoder in the contents panel and, if necessary, click Enable Transcoder.



      Note: Wowza Streaming Engine must be properly licensed to enable the Transcoder. For details, see Licensing requirements for Wowza Transcoder.
    4. When Transcoder is enabled, click Edit on the Setup tab of the Transcoder page.

    5. From the Fallback Template menu, choose the Transcode H265 Divx (Default) transcoder preview template.



    6. Deselect Match incoming stream name to template name.

      Note: If you leave Match incoming stream name to template name selected, the fallback template isn't always used. When Match incoming stream name to template name is selected, if the name of a transcoder template and the name of a stream are the same, the stream uses the corresponding transcoder template, not the fallback template.
    7. Click Save, and then click Restart Now.

      Now, all incoming streams will be processed by the H.265 preview template.


    Configure the H.265 transcoder template

    Configure H.265 transcoding by editing the H.265 transcoder template XML file in a text editor.

    Important: Editing the H.265 template in Wowza Streaming Engine Manager is NOT supported. You must configure the H.265 template by editing the XML file in a text editor.
    1. In your operating system, navigate to [install-dir]/transcoder/templates/transcode-h265-divx.xml and open the file in a text editor.

    2. Edit the <Encode> and <Decode> blocks as desired.

      The H.265 transcoder template provides three encode profiles:

      • A 720p high-definition, medium-bandwidth profile at 5,000,000 bits per second (approximately 4.8 Mbps). This encode is enabled by default.

      • A 1080p full high-definition, high-bandwidth profile at 8,000,000 bits per second (approximately 7.6 Mbps), disabled by default.

      • A 4K ultra-high-definition, high-bandwidth profile at 12,000,000 bits per second (approximately 11.4 Mbps), also disabled by default.

    3. Save your changes to transcode-h265-divx.xml.

    Adjust CPU resources

    By default, Wowza Transcoder is configured to use fewer CPU resources than H.265 encoding may require. To address this discrepancy, add the following parameter to the <Encode/Video/Parameters> block in the transcode-h265-divx.xml transcoder template file.
    <Parameter>
        <Name>mainconcept-h265.performance_level</Name>
        <Value>1</Value>
        <Type>Long</Type>
    </Parameter>
    The value can range from 1 (lowest quality, lowest CPU usage) to 30 (highest quality, highest CPU usage). The default value is 1. If you set this parameter higher than your available CPU resources can handle, real-time encoding will lag and eventually stop. When this happens, you'll see SKIPFRAME messages in the logs.

    Save your changes to the transcode-h265-divx.xml file and then return to Wowza Streaming Engine Manager.

    Add custom properties for playback in the DivX Web Player

    After the transcoder template is configured, you must add custom properties to the application to enable HEVC playback in the DivX Web Player.

    Note: Access to the Properties tab is limited to administrators with advanced permissions. For more information, see Manage credentials.
    1. In the live application detail page, click the Properties tab.

    2. In the Quick Links bar, click Custom.

    3. In the Custom properties section, click Edit and then click the Add Custom Property button.

    4. In the Add Custom Property dialog box, enter the following values, and then click Add:

      Path - /Root/Application/HTTPStreamer
      Name - httpOriginMode
      Type - String
      Value - on

    5. Repeat steps 3 - 4 and create the following two additional properties:

      Path - /Root/Application/HTTPStreamer
      Name - mpegdashCacheControlPlaylist
      Type - String
      Value - max-age=1

      Path - /Root/Application/HTTPStreamer
      Name - mpegdashCacheControlMediaChunk
      Type - String
      Value - max-age=3600

    6. Click Save and then restart the application.


    Alternatively, you can add the properties directly to the Application.xml file located at [install-dir]/conf/live/. Open Application.xml in a text editor and add the following code to the <HTTPStreamer>/<Properties> properties container:
    <Property>
        <Name>httpOriginMode</Name>
        <Value>on</Value>
        <Type>String</Type>
    </Property>
    <Property>
        <Name>mpegdashCacheControlPlaylist</Name>
        <Value>max-age=1</Value>
        <Type>String</Type>
    </Property>
    <Property>
        <Name>mpegdashCacheControlMediaChunk</Name>
        <Value>max-age=3600</Value>
        <Type>String</Type>
    </Property>

    Prepare the player


    This section explains how to configure the DivX Web player and VLC media player to play the transcoded 720p (default) rendition of the HEVC stream.

    Prepare the DivX Web Player

    1. Download DivX Web Player from http://www.divx.com/en/software/web-player and install it.

      Important: Be sure to install the HEVC option.
    2. Include player embed code such as the following in the HTML webpage that will host the player:

      Note: This sample code presumes you're using the default 720p encoding profile. If you changed the encode or decode properties in the H.265 transcoder template to enable a different encode, adjust the [stream-name]_[profile-name] value in the embed code to match. If you enabled multiple encodes, set up adaptive bitrate (ABR) streaming with Stream Name Groups before continuing.
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
      <html>
      <head>
      <title></title>
      </head>
      
      <body bgcolor="#ffffff" text="#000000" link="#ff0000" vlink="#800000" alink="#ff00ff" background="?">
      <object classid="clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616" width="640" height="380" codebase="http://go.divx.com/plugin/DivXBrowserPlugin.cab">
      
      <param name="custommode" value="none" />
      <param name="autoPlay" value="true" />
      <param name="src" value="http://[wowza-ip-address]:1935/live/[stream-name]_720p/manifest.mpd" />
      
      <embed type="video/divx" src="http://[wowza-ip-address]:1935/live/[stream-name]_720p/manifest.mpd" custommode="none" width="640" height="380" autoPlay="true"  pluginspage="http://go.divx.com/plugin/download/">
      </embed>
      </object>
      <br />No video? <a href="http://www.divx.com/software/divx-plus/web-player" target="_blank">Download</a> the DivX Plus Web Player.
      
      </body>
      </html>
      Where the [wowza-ip-address] placeholder is the IP address of your Wowza Streaming Engine media server instance and the [stream-name] placeholder is the name of your stream published to the live application.

    3. Open the webpage in a browser to make sure it's configured properly.

    Now Wowza Streaming Engine is ready for you to publish a stream to the live application, and the H.265 video should play in DivX Web Player.

    Prepare VLC media player

    1. Download the VLC media player from http://www.videolan.org/vlc/index.html and install it.

    2. On the VLC media player Media menu, click Open Network Stream.

    3. Enter the URL of the stream that you want to play in the Please enter a network URL field and then click Play. The stream URL for the default 720p encoding profile should have the following format:

      http://[wowza-ip-address]:1935/live/[stream-name]_720p/playlist.m3u8

      Where the [wowza-ip-address] placeholder is the IP address of your Wowza Streaming Engine media server and the [stream-name] placeholder is the name of your stream published to the live application.

      Note: The instructions in this section will only play the default 720p encode of the HEVC stream. If you changed the encode or decode properties in the H.265 transcoder template to enable a different encode, adjust the [stream-name]_[profile-name] value in your stream URL to match. If you enabled multiple encodes, set up adaptive bitrate (ABR) streaming with Stream Name Groups before continuing.
    By default, VLC media player is configured with a very small caching buffer. This can lead to choppy playback initially but it will eventually smooth out over time as VLC automatically increases the size of this buffer. You can increase the size of this buffer by using the Caching property in the Open Media dialog box.


    Originally Published: For Wowza Streaming Engine 4.1 on 09-11-2014.
    Updated: For Wowza Streaming Engine 4.3 on 10-07-2015.

    If you're having problems or want to discuss this article, post in our forum.