Though the transcoder also supports the publication to itself, in the production environment the separate server for the publication of OTT outputs is required. This article explains how to use external servers for the publication. Encoder supports the output via WebDAV, Samba and FTP protocols.

1. Publishing via WebDAV

Web Distributed Authoring and Versioning (WebDAV) is an extension of the Hypertext Transfer Protocol (HTTP) that allows clients to perform remote Web content authoring operations. The WebDAV protocol makes the Web a readable and writable medium. It provides a framework to copy, change and delete files on a web server.

Publication via WebDAV is most popular and widely used. The main advantage of WebDAV that you can use the same Web server for the publishing and the delivering of OTT streams. The easiest and most popular way to setup WebDAV server is using Ubuntu server and Nginx. Nginx server is free and it has build-in WebDAV support, you just need to add several strings to its configuration file.

To install Nginx to Ubuntu server run the following commands:

"sudo apt-get update"

"sudo apt-get install nginx"

In the folder /etc/nginx/conf.d create a .conf file, for example webdav.conf, where WebDAV configuration will be located. Create a folder for the chunks. We strongly recommend to place this folder at the RAM-disk. Here is an example of the configuration file:

server {
server_name myoringin.mydomain.com;

add_header 'Access-Control-Allow-Origin' '*';

access_log /var/log/nginx/origin.log;
error_log /var/log/nginx/err.origin.log;
proxy_temp_path /data/temp;
root /data/live;
index index.html index.htm;

location / {

root /data/live;
client_body_temp_path /data/temp;
dav_methods PUT DELETE MKCOL COPY MOVE;
create_full_put_path on;
dav_access user:rw group:rw all:rw;
allow all; # comment for the access restriction by IP and using "limit_except GET OPTIONS HEAD" section

# limit_except GET OPTIONS HEAD { # uncomment this section for the access restriction by IP
# allow x.x.x.x/24;
# deny all;
# }
}
}

You should also add the following string to "http" section of the "nginx.conf" file:

client_max_body_size 100m;

We assume the folder /data/live is created. That folder should have full permissions on the filesystem for everyone.

Restart the Nginx server:

sudo service nginx restart

When WebDAV server is installed you can setup output streams to be publishing to it.

We assume you already setup a source stream and video and audio templates (otherwise you can read. for example "Broadcasting from UDP multicast input to HLS output" article for help).

To create new output stream click to the “Output streams” menu and then “Add New Output Stream”.

Choose for the output stream "source", "template" and "audio template" and one of OTT formats for the "format" drop-down list.

"Output" field defines the path and protocol for the publication. For the publication via WebDAV the path should begin from "http://" prefix. Enter here the URL of your WebDAV server with some name at the end, for example, http://myoringin.mydomain.com/fox_hd

Start the source from the "Sources" menu and make sure that it has "Started" state and the output stream is present. You should be able to download the playlist in a browser. In the example, your full output URL for HLS will be http://myoringin.mydomain.com/fox_hd/playlist.m3u8.

You can use built-in Web UI OTT player to check HLS or MpegDASH output streams. Go to "Output streams" in the menu and click on your running output URL.

You can use any OTT player to test your output stream, for example VLC.

2. Publishing via Samba

The Server Message Block (SMB) protocol is a network file sharing protocol that allows applications to read and write to files and to request services from server programs in a network. Simple SMB sever you can setup on any Windows or Linux server.

Her we provide an example how to setup Samba on Ubuntu server.

First install samba:

sudo apt-get install samba

Add the following to the configuration file /etc/samba/smb.conf:

[share_name]
path = /data/live
guest ok = yes
writeable = yes
oplocks = no
level2 oplocks = no

You should set full permissions for everyone to the folder /data/live. We strongly recommend to place that folder to RAM-disk.

Restart Samba server:

sudo service smbd restart

Now you can setup an output stream to publish to your Samba server.

We assume you already setup a source stream and video and audio templates (otherwise you can read. for example "Broadcasting from UDP multicast input to HLS output" article for help).

To create new output stream click to the “Output streams” menu and then “Add New Output Stream”.

Choose for the output stream "source", "template" and "audio template" and one of OTT formats for the "format" drop-down list.

For the publication via SMB the path in the "Output" field should begin from "\\" prefix, for example \\IP_address_or_server_name\share_name\fox_hd.

Save the output stream settings. Start the source from the "Sources" menu and make sure that it has "Started" state and the content is present at \\IP_address_or_server_name\share_name\fox_hd folder.

To be able play content from SMB server the share folder should be available via HTTP protocol. You will need an additional Web server also for the content delivery.

3. Publishing to FTP server

Noisypeak encoders support publishing to FTP server. There are many FTP servers for Windows and Linux OS, you can use any of them.

We assume that you already have FTP server with authorization, for example ftp://ftp.mydomain.com/.

Use "ftp://" prefix for "Output" field in an output stream to publish via FTP protocol, for example ftp://login:password@ftp.mydomain.com/fox_hd

Save the output stream settings. Start the source from the "Sources" menu and make sure that it has "Started" state and the content is present at ftp://ftp.mydomain.com/fox_hd.

To be able play content from FTP server the folder should be available via HTTP protocol. You will need an additional Web server also for the content delivery.

4. Setup the default publication path for OTT outputs.

You can set the default publication path for OTT outputs in the configuration file "state.dat", The file is usually located at the folder "C:\Program Files\Noisypeak Sarl\Connected\Transcoder\config".

The file may be edited in any text editor, such as Notepad. You should run the text editor with administrator rights.

When you save the changes to this file, the Noisypeak Connected service have to be stopped, otherwise your changes will not be saved.

To set the default publication path you should edit the parameter "OutputDir". By default it has value "http://localhost/output". That means, the encoder is publishing to itself via WebDAV protocol.

"OutputDir" path from the "state.dat" is always ignored for the output streams where "Output" field begins from a protocol prefix "http://", "\\" or "ftp://".

If "Output" field for an output stream has just a name, that name will be added to the path of "OutputDir" parameter, building the full publication path.

You can set "OutputDir" to "http://myoringin.mydomain.com",  "\\IP_address_or_server_name\share_name" or "ftp://login:password@ftp.mydomain.com". Then you do not need set full URL for the "Output" field in an output stream, it is enough to set just a name

Save the changes after the "state.dat" file editing and run Noisypeak Connected service.