HTTP Live Streaming (HLS) Task Configuration

Table of contents

  1. FAQ
  2. Task creation
  3. Minimal configuration
    1. Source settings
    2. Video/Audio encoding settings (TS/SDI input modes only)
    3. HLS publication settings
  4. Akamai publication
  5. Edgeware WTV Server support
  6. Multi-audio support
  7. Audio-only track
  8. Subtitling
    1. DVB Subtitles passthrough
    2. DVB Subtitles burnin
    3. DVB Teletext passthrough
    4. DVB Teletext burnin
    5. DVB Teletext to WebVTT
    6. Closed caption EIA-608/708 passthrough
    7. Closed caption EIA burnin
    8. Closed caption EIA-608 to WebVTT
  9. Encryption
  10. Ad insertion (TS input mode only)
  11. Advanced features
    1. Audio/Video/Text combination
    2. Atomic upload
    3. Notification
    4. DVR recovery
    5. Unpublished content reference
    6. m3u8 playlists post processing
    7. COMPANY_NAME HLS mezzanine format
  12. Optimize HLS output for both iDevices and Set Top Boxes
  13. Magic variables explained
  14. Troubleshooting
  1. FAQ

  2. Supported features

    Video codecs Audio codecs Subtitles Ad insertion
    H.264
    HEVC
    Pass-through
    MPEG-1 Layer II
    AAC-LC (ADTS)
    HE-AAC v1/v2
    Dolby Digital/Dolby Digital Plus
    Teletext passthrough
    Teletext to WebVTT
    DVB-Subtitle passthrough
    Closed caption EIA-608 to WebVTT
    Closed Caption 608/708 passthrough
    SCTE35
  3. Task creation

    1. Click on "Live Tasks" button, select "Tasks Map" in the list and click on "New" button.

    2. Give a name to the task.

    3. Select the task. In "Output" panel, set "Output mode" to "OTT" and "Packaging mode" to "HLS".
  4. Minimal configuration

    1. Source settings

    2. Video/Audio encoding settings (TS/SDI input modes only)

      • Recommended video encoding settings for iDevices

        Resolution Framerate H264 Profile/Level iPod Touch Gens 2,3,4 iPod Touch Gens 5 iPhone 3G, 3GS, 4 iPhone 4S, 5, 5C, 5S iPad 1,2 iPad 3,4,5 Apple TV Gen 2 Apple TV Gen 3
        416x234 12 Baseline 3.0 x x x x x x x x
        480x270 15 Baseline 3.0 x x x x x x x x
        640x360 25/29,97 Baseline 3.0 x x x x x x x x
        640x360 25/29,97 Baseline 3.1 x x x x x x
        690x540 25/29,97 Main 3.1 x x x x x x
        1280x720 25/29,97 Main 3.1 x x x x x x
        1920x1080 25/29,97 High 4.0 x x x x
      • Video encoding and preprocessing settings

        • Configure video codec to H.264 or HEVC and enable desired number of video profiles. Set codec profile, level, output size, framerate and resolution.
        • For all profiles, set "Key-Frame Alignment" to "On".
        • Frame/Field mode:
          • For all profiles that are to be displayed by an interlaced player such as a TV set-top box, set "Frame/Field mode" to "Field mode" or "Adaptative frame/field".
          • For all profiles that are to be displayed by a progressive player such as a PC, tablet or smartphone, set "Frame/Field mode" to "Frame mode".
        • De-interlacing:
          • For all profiles that are to be displayed by an interlaced player such as a TV set-top box, disable "De-interlace".
          • For all profiles that are to be displayed by a progressive player such as a PC, tablet or smartphone, enable "De-interlace".

        iDevices are not able to deinterlace interlaced content.

      • Audio encoding settings

        In "Audio" panel, enable audio track and select desired audio codec, mode, sampling rate and bitrate.

        MPEG1-LayerII, Dolby Digital and Dolby Digital Plus codecs are not supported by iDevices.

    3. HLS publication settings

      • Local publication mode

        In "Local" publication mode, chunks and m3u8 playlists are stored locally. m3u8 playlists and chunks are reachable from an embedded HTTP server.

        Local publication information are available from Origin Server configuration documentation.

        • Publishing server settings
          In "Output" > "Publishing Points" panel, create a new publishing server. Set "Publishing protocol" to "SMB", configure "Address" to "${localWebServerRoot}" and desired "Base directory".
        • Map publishing server to a publishing point
          In "Output" > "Packaging" > "Publishing" panel, set "Chunk publishing point" to "${localWebServerRoot}".
      • Push mode

        In Push mode, HLS chunks and playlists are published to a FTP/Webdav server.

        Supported publication servers: see Interoperability table

        • Publishing servers settings
          In "Output" > "Publishing Points" panel, create new publishing servers.
          • Publishing protocol:
            • Webdav
              • Compatibility modes
                • Generic: Generic mode with full Webdav commands set (HEAD, PROPFIND, MKCOL, PUT, DELETE...)
                • Akamai: Dedicated Webdav mode for Akamai CDN
                • Level3: Dedicated Webdav mode for Level3 CDN
                • Huawei: Dedicated Webdav mode for Huawei CDN (HEAD, PUT and DELETE commands only)
            • FTP Passive/Active
          • Login/Password
          • Base directory: Base path can be composed of static characters chain and/or magic variables. Magic variables are declared with ${variable_name} syntax.
            • ${channelId}: Channel identification: channel_name.channels.channelX (where X is the channel number)
            • ${outputId}: Output number (1 to 4)
            • ${sessionId}: A random 16-character alphanumeric string generated for each streaming session.
          • Enable TLS (HTTPS/SFTP)
            • Verify publishing point's certificate: When negotiating TLS connection, the server sends a certificate indicating its identity. This certificate is verified. The connection succeeds regardless of the names in the certificate.
            • Verify publishing point's certificate name against host: This certificate must indicate that the server is the server to which the device meant to connect, or the connection fails.
          • Cleaning mode
            • Disabled: Media files in base path are not deleted when task is started
            • Remove media files: Media files in base path are deleted when task is started
            • Erase base directory: Base directory and all its files, sub-folders are deleted when task is started
          • Poxy server configuration
        • Map publishing server to a publishing point
          In "Output" > "Packaging" > "Publishing" panel, select Publication server and configure chunks/playlists paths.
  5. Akamai publication

  6. Edgeware WTV Server support

    To handle HLS streams, Edgeware WTV server collects small files in archives. Files located in the same subdirectory will be saved in the same archive and will get the same expire time.
    Because of this, encoder must be configured to use subdirectories. Playlists must not be located in same directory as TS chunks.
  7. Multi-audio support

    1. HLS publication settings

      There are two ways to generate multi-audio streams :

      • Audio tracks in TS chunks :
        All audio track are included in TS chunks of each video profile. This practice is not in accordance with Apple HLS specification.

        In "Output" > "Packaging" > "Multiplexing" panel, disable "Audio in audio Groups".

        m3u8 main playlist structure :
        #EXTM3U
        
        #EXT-X-STREAM-INF:CODECS="avc1.640015,mp4a.40.2",BANDWIDTH=467028
        profile1/playlist.m3u8
        
        #EXT-X-STREAM-INF:CODECS="avc1.64001e,mp4a.40.2",BANDWIDTH=977898
        profile2/playlist.m3u8
        
        #EXT-X-STREAM-INF:CODECS="avc1.64001f,mp4a.40.2",BANDWIDTH=2203985
        profile3/playlist.m3u8
        
      • Audio groups
        Each audio track is an audio-only profile (chunked audio elementary stream). Video profiles have no audio (TS video-only). This practice is in accordance with Apple HLS specification.

        Multi-audio is supported since iOS 6 only.

        In "Output" > "Packaging" > "Multiplexing" panel, enable "Audio in audio Groups".

        m3u8 main playlist structure :
        #EXTM3U
        
        #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="A1.1+A2.1+A3.1",NAME="audio-eng",LANGUAGE="eng",DEFAULT=YES,URI="profile4/playlist.m3u8"
        #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="A1.1+A2.1+A3.1",NAME="audio-deu",LANGUAGE="deu",URI="profile5/playlist.m3u8"
        #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="A1.1+A2.1+A3.1",NAME="audio-fra",LANGUAGE="fra",URI="profile6/playlist.m3u8"
        
        #EXT-X-STREAM-INF:CODECS="avc1.640015,mp4a.40.2",BANDWIDTH=459263,AUDIO="A1.1+A2.1+A3.1"
        profile1/playlist.m3u8
        
        #EXT-X-STREAM-INF:CODECS="avc1.64001e,mp4a.40.2",BANDWIDTH=970132,AUDIO="A1.1+A2.1+A3.1"
        profile2/playlist.m3u8
        
        #EXT-X-STREAM-INF:CODECS="avc1.64001f,mp4a.40.2",BANDWIDTH=2196219,AUDIO="A1.1+A2.1+A3.1"
        profile3/playlist.m3u8
        

        In "HLS Output" panel, set "Video/Audio/Text combination" to "all" or a semi-colon separated list of tracks. (see Audio/Video/Text combination part)

    2. Multi-audio playback on iPad (audio group only)

      Select desired audio language in navigation bar.
  8. Audio-only track

    Audio-only track at 64 kbps is recommended as alternative content for delivery over slow cellular connections.
  9. Subtitling

    1. DVB Subtitle passthrough

      See DVB Subtitle passthrough.
    2. DVB Subtitles burnin (encoder/transcoder products only)

      See DVB Subtitle burnin.
    3. DVB Teletext passthrough

      See DVB Teletext passthrough.
    4. DVB Teletext burnin (encoder/transcoder products only)

      See DVB-Teletext burnin.
    5. DVB Teletext to WebVTT

      • Configuration

      • m3u8 root playlist structure with one WebVTT track

        #EXTM3U
        
        #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="A1.1+A2.1",NAME="audio-eng",LANGUAGE="eng",DEFAULT=YES,URI="profile4/playlist.m3u8"
        #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="A1.1+A2.1",NAME="audio-deu",LANGUAGE="deu",URI="profile5/playlist.m3u8"
        
        #EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="T1",NAME="sub-deu",LANGUAGE="deu",DEFAULT=YES,AUTOSELECT=YES,URI="profile6/playlist.m3u8"
        
        #EXT-X-STREAM-INF:CODECS="avc1.640015,mp4a.40.2",BANDWIDTH=555263,AUDIO="A1.1+A2.1",SUBTITLES="T1"
        profile1/playlist.m3u8
        
        #EXT-X-STREAM-INF:CODECS="avc1.64001e,mp4a.40.2",BANDWIDTH=1066132,AUDIO="A1.1+A2.1",SUBTITLES="T1"
        profile2/playlist.m3u8
        
        #EXT-X-STREAM-INF:CODECS="avc1.64001f,mp4a.40.2",BANDWIDTH=2292219,AUDIO="A1.1+A2.1",SUBTITLES="T1"
        profile3/playlist.m3u8
        
      • WebVTT subtitles playback on iPad

        Open HLS stream URL and select desired subtitles track in navigation bar.
    6. Closed caption EIA-608/708 passthrough

      See Closed caption EIA-608/708 passthrough.

      iDevices natively supports Closed Caption EIA-608/708 decoding.

    7. Closed caption EIA-608 burnin (encoder/transcoder products only)

      See Closed caption EIA-608 burnin.
    8. Closed caption EIA-608 to WebVTT

      See Closed caption EIA-608 to WebVTT.
  10. Encryption

    1. Introduction

      • Overview

        • video/audio/text chunks are encrypted with AES-128, using a given key.
        • Key length is 128 bits.
        • Initialization vector (IV) attribute is added to EXT-X-KEY tag to random encryption.
        • Key can change periodically (10 seconds to 1 hour) and could be different for each chunk.
        • Keys can be generated internally by the encoder itself (autogen/manual modes) or fetched from a third-party keys server.
        • Supported encryption modes:
          DRM Provider Protection Sheme Protection System Encryption Algorithm Key Rotation
          Manual AES-128 + Pantos Standard Signaling N/A AES-CBC 128 No
          AutoGen AES-128 + Pantos Standard Signaling N/A AES-CBC 128 Yes
          Verimatrix AES-128 + Pantos Standard Signaling N/A AES-CBC 128 Yes
          Secure Media AES-128 + Pantos Standard Signaling N/A AES-CBC 128 Yes
          Inside Secure AES-128 + Inside Secure Krypton PlayReady AES-CTR 128 Yes
          Irdeto AES-128 + Irdeto Specific Signaling PlayReady Scalable Licenses AES-CTR 128 Yes
      • Configuration

        • In "Output" > "Encryptions" panel, set encryption preset name, select "Encryption mode" and configure encryption settings.
        • In "Output" > "Packaging" > "Publishing" panel, select output, "Enable encryption" and select encryption preset.
  11. Ad insertion (TS input mode only)

  12. Advanced features

    1. Audio/Video/Text combination

      "Video/Audio/Text combination" allows to specify video/audio/text profile's assocation. It can be a semicolon separated list of audio/video/text profiles (V1A1.1T1;V2A1.1T1;V3A2.1T1;V4A2.1T1) or "all" keyword.
      • Video index

        "Video index" (Vx) is the video profile index in "Video" panel.
        • Encoder

        • Packager

      • Audio index

        "Audio index" (Ax.y) is the combination of:
        • x: Audio input track index in "Input PIDs" (TS input) or "Tracks Selection" (SDI input)
        • y: Audio encoding profile index in "Audio" panel
      • Text index

        "Text index" (Tx) is the text profile index in "Output" > "Packaging" > "Multiplexing" panel

      Examples :
      • V1A1.1T1;V2A1.1T1;V3A1.2T1

        #EXTM3U
        
        #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="A1.1",NAME="audio-eng",LANGUAGE="eng",DEFAULT=YES,URI="profile4/playlist.m3u8"
        #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="A1.2",NAME="audio-eng",LANGUAGE="eng",DEFAULT=YES,URI="profile5/playlist.m3u8"
        
        #EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="T1",NAME="sub-deu",LANGUAGE="deu",DEFAULT=YES,AUTOSELECT=YES,URI="profile6/playlist.m3u8"
        
        #EXT-X-STREAM-INF:CODECS="avc1.640015,mp4a.40.2",BANDWIDTH=555263,AUDIO="A1.1",SUBTITLES="T1"
        profile1/playlist.m3u8
        
        #EXT-X-STREAM-INF:CODECS="avc1.64001e,mp4a.40.2",BANDWIDTH=1066132,AUDIO="A1.1",SUBTITLES="T1"
        profile2/playlist.m3u8
        
        #EXT-X-STREAM-INF:CODECS="avc1.64001f,mp4a.40.2",BANDWIDTH=2228219,AUDIO="A1.2",SUBTITLES="T1"
        profile3/playlist.m3u8
        
    2. Atomic upload

      When channel is started, transcoder checks if m3u8 playlists upload can be an atomic transaction.
      If so, playlists are uploaded as temporary files, then renamed to their destination filenames. This process is automatic and can't be changed manually.
      In FTP publication mode, transcoder verifies that RNFR/RNTO commands are supported by the FTP server. If so, atomic upload is enabled.
      In WEBDAV publication mode, transcoder verifies that MOVE command is supported by the WEBDAV server. If so, atomic upload is enabled.
    3. Notification

      When chunk upload is finished, a notification can be sent in the form of an HTTP POST command to a specified URL.
      The URL can be configured from "Output" > "Packaging" > "Publishing" panel.
    4. DVR recovery

      DVR recovery feature is designed to prevent DVR loss and chunks numbering reset when encoding process is interrupted.

      Operating conditions:
      • Chunk publication path is constant ie. every HLS segment of a profile is published in the same (remote) directory
      • Encoder has a read access to publication path, through publication protocol (FTP, WebDav)
      • In case of sparing, output publication must not be local
    5. Unpublished content reference

      When chunks cannot be published, then the media playlist shall stop being published. When resuming:

      • If "Do not reference unpublished content" is enabled: the media playlist will resume chunk numbering from where it was before the interruption. This is useful when players need to see the HLS output stream as if the input stream had been continuous, with no missing content.
      • If "Do not reference unpublished content" is disabled: the media playlist will resume chunk numbering as if it had continued publishing chunks during the interruption. As a side effect, it will reference non-existing chunk files for the missing content. This is useful in 1+1 redundancy scenarios, when 1 publishing point may be temporarily down, but both publishing points shall still receive the same data (hence, the same media playlists) as much as can be.
    6. m3u8 playlist post processing

      Post processing can be applied to customize m3u8 root and sub-playlists syntax.
      Post processing parameters ("Find" and "Replace") have the form of regular expressions following ECMAScript syntax.


      Examples:
      • Add customized tag with chunk file extension

        • Default sub-playlist syntax
          #EXTM3U
          #EXT-X-VERSION:3
          #EXT-X-TARGETDURATION:10
          #EXT-X-MEDIA-SEQUENCE:1
          #EXT-X-PROGRAM-DATE-TIME:2015-05-05T13:38:24,000Z
          #EXTINF:10.000,
          chunk1.ts
          #EXT-X-PROGRAM-DATE-TIME:2015-05-05T13:38:34,000Z
          #EXTINF:10.000,
          chunk2.ts
          
        • Desired sub-playlist syntax
          #EXTM3U
          #EXT-X-FORMAT:ts
          #EXT-X-VERSION:3
          #EXT-X-TARGETDURATION:11
          #EXT-X-MEDIA-SEQUENCE:1
          #EXT-X-PROGRAM-DATE-TIME:2015-05-05T13:38:24,000Z
          #EXTINF:10.000,
          chunk1.ts
          #EXT-X-PROGRAM-DATE-TIME:2015-05-05T13:38:34,000Z
          #EXTINF:10.000,
          chunk2.ts
          
        • Configuration
          • Find: #EXTM3U
          • Replace: #EXTM3U\n#EXT-X-FORMAT:${ext}
      • Express #EXT-X-PROGRAM-DATE-TIME in seconds (ms by default)

        • Default sub-playlist syntax
          #EXTM3U
          #EXT-X-VERSION:3
          #EXT-X-TARGETDURATION:10
          #EXT-X-MEDIA-SEQUENCE:1
          #EXT-X-PROGRAM-DATE-TIME:2015-05-05T13:38:24,050Z
          #EXTINF:10.000,
          chunk1.ts
          #EXT-X-PROGRAM-DATE-TIME:2015-05-05T13:38:34,050Z
          #EXTINF:10.000,
          chunk2.ts
          
        • Desired sub-playlist syntax
          #EXTM3U
          #EXT-X-VERSION:3
          #EXT-X-TARGETDURATION:10
          #EXT-X-MEDIA-SEQUENCE:1
          #EXT-X-PROGRAM-DATE-TIME:2015-05-05T13:38:24Z
          #EXTINF:10.000,
          chunk1.ts
          #EXT-X-PROGRAM-DATE-TIME:2015-05-05T13:38:34Z
          #EXTINF:10.000,
          chunk2.ts
          
        • Configuration
          • Find: (#EXT-X-PROGRAM-DATE-TIME:\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d),\d\d\d(Z)
          • Replace: \$1\$2
      • Add customized tag with session ID

        • Default sub-playlist syntax
          #EXTM3U
          #EXT-X-VERSION:3
          #EXT-X-TARGETDURATION:10
          #EXT-X-MEDIA-SEQUENCE:1
          #EXT-X-PROGRAM-DATE-TIME:2015-05-05T13:38:24,000Z
          #EXTINF:10.000,
          chunk1.ts
          #EXT-X-PROGRAM-DATE-TIME:2015-05-05T13:38:34,000Z
          #EXTINF:10.000,
          chunk2.ts
          
        • Desired sub-playlist syntax
          #EXTM3U
          #EXT-X-VERSION:3
          #EXT-X-TARGETDURATION:11
          #EXT-X-MEDIA-SEQUENCE:1
          #EXT-X-SESSION: a218022a0559010e7ddad2b0c15546ff
          #EXT-X-PROGRAM-DATE-TIME:2015-05-05T13:38:24,000Z
          #EXTINF:10.000,
          chunk1.ts
          #EXT-X-PROGRAM-DATE-TIME:2015-05-05T13:38:34,000Z
          #EXTINF:10.000,
          chunk2.ts
          
        • Configuration
          • Find: (#EXT-X-MEDIA-SEQUENCE:\d*)
          • Replace: \$1\n#EXT-X-SESSION: ${sessionId}
    7. COMPANY_NAME HLS mezzanine format

      • Introduction

        COMPANY_NAME HLS Mezzanine output mode is a proprietary format designed to handle very large DVR (up to 7 days) for recording application.
        Specific syntax was developed to reduce size of m3u8 sub-playlists.
        COMPANY_NAME HLS Mezzanine format is not compatible with HLS devices such as iPhone/iPad or OTT Set Top Boxes. It's a mezzanine format for COMPANY_NAME recording solutions.
      • m3u8 sub-playlist syntax

        #EXTM3U
        #EXT-X-AL-MEZZANINE
        #EXT-X-TARGETDURATION:1
        #EXT-X-MEDIA-SEQUENCE:2
        #EXT-X-AL-TEMPLATE: SEQU=2, REPEAT=5031,
        #EXT-X-PROGRAM-DATE-TIME:2015-05-06T11:53:11,060Z
        #EXTINF:2.000,
        segment<$NUMBER>.ts
        
      • Configuration

        In "Output" > "Packaging" > "Multiplexing" panel, change "Packaging mode" to "Proprietary mezzanine".
  13. Optimize HLS output for both iDevices and Set Top Boxes

    This part explains how to get best video quality on iDevices and Set Top Boxes with only one HLS channel.

    1. Video encoding and preprocessing settings

      In "Video" panel, enable desired number of video profiles. Set codec profile and level, output size, framerate and resolution. Set "rate control" to CBR
      Enable "Key-Frame Alignement" on all video profiles and set "Frame/Field mode" to "Frame mode" on profiles 1,2 and 3. Set "Frame/Field mode" to "Field mode" on profile 4.
      Enable "De-interlace" on profiles 1,2 and 3 (not on profile 4 that will be interlaced)
    2. HLS publication settings

      In "Publishing" panel, configure the device to deliver two different m3u8 root playlists :
      The first one for iDevices (with video profile 1,2 and 3)

      The second one for Set Top Box (with video profiles 1,2,3 and 4)

  14. Magic variables explained

    Publication paths are composed of static characters chain and magic variables.

    • ${sessionId} : A random 16-character alphanumeric string generated for each streaming session.
    • ${profileId} : Video profile number
    • ${chunkId} : Segment number
    • ${chunkDateTime} : Segment upload date in YYYY-mm-dd_hh-mm-ss format
    • ${chunkUnixDateTime} : Segment upload date in UNIX date time format
    • ${chunkYear} : Segment upload year
    • ${chunkMonth} : Segment upload month
    • ${chunkDay} : Segment upload day
    • ${chunkHour} : Segment upload hour
    • ${chunkMinute} : Segment upload minute
    • ${chunkSecond} : Segment upload second
    • ${chunkMillisecond} : Segment upload millisecond
    • ${rollover} : A counter starting at "1" and incremented every 2000 segments. Required for Akamai publication
    • ${random} : A random 16-character alphanumeric string generated for each auto-generated encryption key
    • ${ext} : File extension preset
      • Playlist: *.m3u8
      • Video segment: *.ts
      • AAC audio segment: *.aac
      • MPEG1-LayerII audio segment: *.mp2
      • AC3 audio segment: *.ac3
      • EC3 audio segment: *.ec3
      • WebVTT subtitle segment: *.webvtt
  15. Troubleshooting