___  _ _       _____
      /___\/ / |_   _|___ /
     //  //| | \ \ / / |_ \
    / \_// | | |\ V / ___) |
    \___/  |_|_| \_/ |____/

       O11 OTT streamer v3

		

Description

O11 purpose is to convert LIVE and VOD streams to a friendly protocol such as HLS and/or direct http MpegTS.

The following input formats are currently supported

Dependencies

Executing program

You can list command line options using ./o11 -h


Providers  Provider selection page


This page is the default one, it’s a clickable list of the available providers.

To setup a provider logo, create a png file in logos/ which must be named [providerid].png. The provider Id is the provider name with lower case, no space and only alphanumericable chars (example: My Provider becomes myprovider). It is stored as "Id" in the provider config file.


Streams  Streams page


The FILTER select box allows to select the type of streams to filter.

Click on a stream to display it in the internal player (it must be already in running state or the OnDemand option should be selected). Note that playback will mostly fail under Chrome is the audio track is AC3 or the video track is not H264.

You can also start/stop stream and enter the configuration and logs pages.


Events  Events schedule and replay


You will find on this page the Schedule list for events and the available recorded events (Replays). The list of events is retrieved using the provider script, please look at section below.

Schedule can also be accessed using the -epgport command line option and going to http://ip:epgport/providerid. An XMLEPG version is also accessible at http://ip:epgport/providerid.xml or http://ip:epgport/providerid.xml.gz.

Each new event gets a "eventN" id. N is an unique incremental number. If you want to access on air events, you should use the special id "onairN", where N will never exceed the number of events running simultaneously. This "onairN" id is only valid during the live window of the event.

The second table is the list of replays (recorded events). They are accessible trough the given link or will be automatically played using their original event link when finished.


Vod  Static media files


You will find on this page the list of VOD available in the selected provider.

Recordings  Recordings page


In this page you can setup stream recordings.


Monitoring  Clients monitoring page


You will find on this page all active connections and some informations about the system status.


Logs  Per channel logging


In this page, you will be able to access logs for each channel as well as the main log. The channel logging verbosity can be configured on the configuration page.


Users  Users configuration page


This page is used to manage users access.

When adding a new user, the following options are available:

Config  Providers and streams configuration page


Providers

O11 supports multiple providers. Each provider will have its own set of streams and its own network configuration.

The list of available providers can be found in the top navigation bar. 3 type of streams are available: Channels (live), Events and VOD.

Go to Config tab, select a provider name and click on NEW PROVIDER. Provider configuration files will be stored into providers/ by default. This path can be changed using -providers [path] from command-line.

Clicking on RESCAN PROVIDERS will trigger a full scan of the providers/ directory for new provider configuration files.

The DELETE button will delete the selected provider (it cannot be reverted).

You can export a selection of streams or a full provider’s configuration using EXPORT SELECTION or EXPORT.

You can also import a new proviser using the IMPORT button. You can input a provider name or let it use the one from the config file you import. The format is either a text file, a m3u or a O11 cfg file.

Running/Output Mode

O11 supports 5 running modes:

O11 supports 4 output modes when Internal Remuxer or Resident FFmpeg running modes are selected:

Script

Script name (without it's extension, so example.py becomes example), followed that parameters that will be passed to that script). Other parameters like the action, the network config, ... are automatically passed as parameters too. Check the Scripts paragraph for more details.

UPDATE CHANNELS (R button next to stream type selection in nav-bar)

Call the script to udpate the channels list. If you select auto refresh, channels that are not in the list sent by the script will be removed unless the Ignore Update option is checked.

REFRESH EVENTS (R button next to stream type selection in nav-bar)

Call the script to udpate the events list. It can be automated by clicking on auto refresh. If you select auto refresh, channels that are not in the list sent by the script will be removed unless the Ignore Update option is checked.

NETWORK PARAMETERS (R button next to stream type selection in nav-bar)

Network options can be configured globally for a provider and then overriden per stream.

All these network parameters can be overriden per channel, selecting the NetworkOverride option.

Don't forget to press APPLY NETWORK for the changes to take effect. If you set global network parameters while streams are running, it could crash some of them...

You can select individually a network connection for Scripts/Manifests/Media calls. You can also set a Worker host for each of them, every request will use this host. The real host is passed as an extra header Original-Host.

ADDITIONAL PARAMETERS

A bunch of additioanl parameters can be set here. For more info, put your cursor on the parameter to bring the tooltip.

SCRIPT ACCOUNTS

A list of accounts to use with the script. If the account is enabled and selected (next to the script field or per channel next to the script params field), it's info will be passed when calling the script. For instance, user=john@mail.com password=mypassword device=123456 pin=1234. The login button can be used to call the script with the login action, to test if the account works. The script must print 'logged in' to validate the login. The pair

button can be used to call the script with the pair action.

Channels

To add a new channel to a provider, ho to Config tab and press ADD STREAM after entering its name in the field.

To delete a stream, click on its checkbox and press DELETE SELECTION. If the stream was running, it will be stopped first, then deleted.

Stream configuration

Stream options

Several options can be selected for each stream.

Scripts

Scripts play a big role for O11. Each provider should have each own script. It can be either a shell script (.sh) or a python3 script (.py).
An example of script can be found here example.py. It uses o11.py. When a script is configured, only it’s name body must be specify. O11 will first try to start the .sh extension and then .py one if not available.
Scripts must be stored in the scripts/ directory.

Let say we have a provider called Provider 1which script name is provider1.py, stored in scripts/provider.py.
This script must then be referenced as provider1 in the Script field. Some script extra parameters can be specified.

Depending on the type of script, it will automatically receive the following parameters, additionnaly to the ones configured by user.

Manifest script specifics

A manifest script should return a json formatted as followed:

{
    "ManifestUrl" : [manifest url],
    "Cdn" : [
	{
	    'Name': 'akamai',
	    'ManifestUrl': 'http://...'
	},
	...
    },
    "Headers": {
	"manifest": {
	    'user-agent': 'mozilla/5.0 (macintosh; intel mac os x 10_15_7) applewebkit/537.36 (khtml, like gecko) chrome/107.0.0.0 safari/537.36',
	    'custom-header': 'it's me',
	    ...
	},
	"media": {
	    'user-agent': 'mozilla/5.0 (macintosh; intel mac os x 10_15_7) applewebkit/537.36 (khtml, like gecko) chrome/107.0.0.0 safari/537.36'
	    'custom-header': 'it's me',
	    ...
	}
    },
    "Heartbeat": {
	"Url" : [heartbeat url],
	"Params": [param1,param2,...],
	"PeriodMs" : 5*60*1000
    }
}
		

Cdm script specifics

A CDM script should return a list of kid:key formatted as followed:

kid1:key1
kid2:key2
...
		

Events/Channels script specifics

A events or channels script should return a list of streams following the same format as the config files:

{
  "[Channels or Events]": [
    {
      // Name of the channel or the title of the event
      "Name": "[name]",
      // Mode: live or vod
      "Mode": "live",
      // Use session manifest
      "SessionManifest": true,
      // Script parameters to use to retrieve the manifest or keys
      "ScriptParams": "id=123 country=fr",
      // CDM type (widevine, playread or verimatrix)
      "CdmType": "widevine",
      // Use cdm script to get keys
      "UseCdm": true,
      // Script parameters to use to retrieve keys
      "Video": "best",
      // Set the audio stream which desc includes 'en'
      "Audio": "desc:en",
      // Enable On Demand
      "OnDemand": false,
      // Enable fragments download speed up (download all required fragments simultaneously to speed up start)
      "SpeedUp": true,
      // Autostart stream. For events, this will autostart the stream when in the on air range (time >= Start and time <= End)
      "Autostart": true,
      // For events, define UTC start and stop timestamp. They will be autostarted in the onAir window if Autostart or RecordEvent is true
      "Start": 1682631577,
      "End": 1682632577,
      // For events, define if the event must be recorded and become a replay (only works in direct/hls mode with internal remuxer)
      "RecordEvent": true
    },
    ...
   ]
}
		

Playlist  Playlist including channels available to user