Live Stream media_servers.ini


I have successfully installed Kaltura CE 11 + Wowza Media Server. I have been able to Stream adding a new server Node via the API console. I added a hostname and a playbackdomain and Wowza is able to register the media server.

Everything works but I haven’t been able to change the Stream default port (1935) to the normal http port (80) or the https port (443). I tried setting them via media_servers.ini but it doesn’t work.

Has anybody been able to set this config file and make it work ?

My actual config is the following:

application = kLive
port = 80
port-https = 433

Thanks in advance for any help.

David Eusse


By default, Wowza listens on 1935. To change it, you need to start with the Wowza config itself, look at:
Specifically, this part:
Setting keystore.jks:

Create a self-signed SSL certificate or use existing one.
Copy the certificate file to @WOWZA_DIR@/conf/keystore.jks

Edit @WOWZA_DIR@/conf/VHost.xml:

Uncomment /Root/VHost/HostPortList/HostPort with port 443 for SSL.
/Root/VHost/HostPortList/HostPort/SSLConfig/KeyStorePassword - set the password for your certificate file.

Only then should you change media_servers.ini so the Kaltura side knows to make the requests over these ports, instead of 1935.

Thank you,

It almost worked ! I was lazy and did not configure the Wowza SSL service before :frowning:

It changes the media servers names and ports for all delivery types except hls and apple_http !.

All my Kaltura live delivery_profiles are the default provided by the distro.

Any ideas ?



The kaltura delivery profiles are kept in the delivery_profile table.
# mysql -h$DB1_HOST -u$DB1_USER -p$DB1_PASS

mysql> select id,name,url,host_name from delivery_profile;

And then update according to your own setup.

Hi Jess,

I already tried adding new Live delivery profiles to the the specific partner via the API console and inserting them via the DB (for partner 0 and the test partner 101). Same result

I also have double checked my Wowza and Kaltura setup against the instructions.

I have this questions:

  • Which partner should the live delivery_profiles be assigned to (partner 0, for instance) ?
  • If Kaltura is able to change the Media_servers URL for the dash,sl and hds protocols, what do you think should I look for for the applehttp and hls delivery_profiles in order the have the same behavior ?

Thanks again for your help

Hi David,

Partner 0 is a template partner for various profiles, including delivery. When a new partner is created, these profiles are “cloned” to the new partner.

Can you please describe the exact issue you’re currently seeing and also post the output for:
mysql> select * from delivery_profile\G

Of course, be sure to mask any sensitive info.

Hi Jess,

Thank you for your patience and let me explain what I’m trying to do:

We have been long time users of Wowza and Kaltura. We have provided VOD services for some customers with Kaltura but not Live services. We used to provision our Wowza livestreams manually but now we want to integrate them with the Kaltura VOD platform.

The aim is to serve a relatively high volume traffic (more than 600 TB/month). We have setup our own frontend/delivery (CDN) mainly because of traffic cost issues. Akamai or any other alternatives are simply to expensive.

I have a production and a staging environments that are almost identical. Right now I have just upgraded to Kaltura 12 + latest Wowza (4.x) and installed the kaltura Wowza libs according to the instructions (in the same server).

Provisioning the live streams was the easy part. Y create an entry in Kaltura and Wowza is able to authenticate and receive the broadcast (FMLE or Wirecast).

What I haven’t been able to do is to pass the correct delivery URL to the player. After debugging Kaltura, I noticed that Wowza was trying to register a media_server called localhost.localdomain. I went through the API console and added a server_node called localhost.localdomain with a mediaServerPlaybackDomainConfig called and Bingo ! Kaltura registered the stream and I was able to watch it with something live

The problem is that we need to serve all the http traffic via ports 80 and 443, something that is relatively easy to do with our own frontend without modifying Wowza.

After configuring the Wowza ssl service, I got stuck with the problem that the HLS/APPLEHTTP delivery URLs are not modified when the media server gets registered. I guess is something related to the URL parsing because it affects the expressions with the HLS manifest (playlist.m3u8). All other default protocols get the right media_server URL. I get something like this:





I tried adding different delivery__profiles via the admin console and mysql console but it doesn’t work either. Right now I have just the default kaltura live delivery profiles:
mysql> select * from delivery_profile where partner_id=0;

| id | partner_id | created_at | updated_at | name | type | system_name | description | url | host_name | recognizer | tokenizer | status | media_protocols | streamer_type | is_default | parent_id | custom_data | priority |
| 1 | 0 | 2016-05-15 15:51:07 | 2016-05-15 15:51:07 | Default HTTP Delivery Profile | 10 | Default_Akamai_HLS_direct | Default Akamai HLS direct | | | NULL | NULL | 0 | NULL | applehttp | 1 | 0 | NULL | 0 |
| 2 | 0 | 2016-05-15 15:51:07 | 2016-05-15 15:51:07 | Default HTTP Delivery Profile | 14 | Default HTTP Delivery Profile | Default HTTP Delivery Profile | | | NULL | NULL | 0 | NULL | http | 1 | 0 | NULL | 0 |
| 3 | 0 | 2016-05-15 15:51:07 | 2016-05-15 15:51:07 | Default HLS Live Delivery Profile | 1001 | Default_HLS_Live_Delivery_Profile | Default HLS Live Delivery Profile | | NULL | NULL | NULL | 0 | NULL | applehttp | 1 | 0 | NULL | 0 |
| 4 | 0 | 2016-05-15 15:51:07 | 2016-05-15 15:51:07 | Default HLS Network Live Delivery Profile | 1001 | Default_HLS_Network_Live_Delivery_Profile | Default HLS Nework Live Delivery Profile | NULL | NULL | NULL | NULL | 0 | NULL | hls | 1 | 0 | NULL | 0 |
| 5 | 0 | 2016-05-15 15:51:07 | 2016-05-15 15:51:07 | Default HLS To Multicast Live Delivery Profile | 1006 | Default_HLS_To_Multicast_Live_Delivery_Profile | Default HLS To Multicast Live Delivery Profile | | NULL | NULL | NULL | 0 | NULL | applehttp_to_mc | 1 | 0 | NULL | 0 |
| 301 | 0 | 2016-05-15 15:51:07 | 2016-05-15 15:51:07 | Default MPEG-DASH Live Delivery Profile | 1003 | Default MPEG-DASH Live Delivery Profile | Default MPEG-DASH Live Delivery Profile | NULL | NULL | NULL | NULL | 0 | NULL | mpegdash | 1 | 0 | NULL | 0 |
| 302 | 0 | 2016-05-15 15:51:07 | 2016-05-15 15:51:07 | Default HD Network Live Delivery Profile | 1002 | Default_HD_Network_Live_Delivery_Profile | Default HD Network Live Delivery Profile | NULL | NULL | NULL | NULL | 0 | NULL | hdnetworkmanifest | 1 | 0 | NULL | 0 |
| 303 | 0 | 2016-05-15 15:51:07 | 2016-05-15 15:51:07 | Default HDS Live Delivery Profile | 1002 | Default_HDS_Live_Delivery_Profile | Default HDS Live Delivery Profile | NULL | NULL | NULL | NULL | 0 | NULL | hds | 1 | 0 | NULL | 0 |
| 304 | 0 | 2016-05-15 15:51:07 | 2016-05-15 15:51:07 | Default RTMP Live Delivery Profile | 1005 | Default_RTMP_Live_Delivery_Profile | Default RTMP Live Delivery Profile | NULL | NULL | NULL | NULL | 0 | NULL | rtmp | 1 | 0 | a:1:{s:12:“enforceRtmpe”;s:1:“0”;} | 0 |
| 1001 | 0 | 2016-05-15 15:51:07 | 2016-05-15 15:51:07 | Kaltura HLS segmentation | 61 |

That’s it. Sorry for the long post but I think it’s easier to understand what I’m doing.The kaltura documentation does not explain clearly how the media server registration works so I’m stuck in that point.



Hi David,

Indeed, things are clearer now:)
What does:
mysql> select * from media_server;

HI Jess,

the media_server table is empty, even when I broadcast.




Can you explain how did you add the media_server ? When I go through the test console I only find server_node API calls.

Did you manage to change the playback URL for hls and applehttp ?



Hi @david.eusse,

Please see:


Hi Jess,

I already have checked this file but I didn’t know where to put it. I know that I’m not using it now.

Does it have to go in /opt/kaltura/app/clients/php5/ ?



Hi Jess,

I thought this script was called every time a stream was published… I ran the script by hand ( php register_media_server.php) and got the same results I got when adding the media server via the test console. Everything changes but the hls and applehttp delivery protocols…

I’l probably take the long path of recompiling the java modules…


Hi David,

Before you run off to recompile the Java modules [which I don’t think will help]:
What does:
mysql> select * from media_server;
return now?

I suspect the script failed for you, it has a big bug which should be fixed.

It assumes that if an exception happened, it means the node is already registered, which is clearly wrong.
Please change:
logToFIle(‘The server [’.$sys_hostname.’] is already registered.’);
print PHP_EOL;
exit (0);

so it reads:

And rerun it. I trust you’ll see actual errors that need fixing.

Hi Jess,

I found a nasty error that was driving me mad. My /etc/hosts was pointing localhost.localdomain and to I changed to the external IP and now Wowza tries to register the correct host_name ( instead of localhost.localdomain.

I modified the script and reran it. I get some warnings and this error (if the server_node already exists):

PHP Fatal error: Uncaught exception ‘KalturaException’ with message ‘Missing parameter “serverNodeId”’ in /opt/kaltura/app/clients/php5/KalturaClientBase.php:894
Stack trace:
#0 /opt/kaltura/app/clients/php5/KalturaClient.php(6487): KalturaClientBase->throwExceptionIfError(Array)
#1 /root/livestreaming/media-server/KalturaWowzaServer/release/register_media_server.php(47): KalturaServerNodeService->enable(NULL)
#2 /root/livestreaming/media-server/KalturaWowzaServer/release/register_media_server.php(70): registerMediaServer(’/usr/local/Wowz…’, Object(KalturaClient))
#3 {main}
thrown in /opt/kaltura/app/clients/php5/KalturaClientBase.php on line 894

When I publish a record is created in entry_server_node but the media_server table is still empty.

So far, everything works as it should, except de applehttp and hls ports:


Just to make sure.

If I run register_media_server.php a record is created in the server_node table but not in the media_server table.


Hi David,

After looking at the code, I believe this comes from here:

DEFAULT_PORT is then used here:

And so, the final URL becomes:

The question is what it should be changed to in your case. The thread started with you asking about SSL, if you wish to serve over HTTPs, then you also need to update your delivery profile to use https as protocol, in addition to setting the port to 443, otherwise, try setting it to 80 and see what you get back.
You can also edit line 96 to read:

return "$url/$app";

and see if that works for you.

If it does work, then note this line:

broadcastConfig is a representation of /opt/kaltura/app/configurations/broadcast.ini, so, if you make sure it includes the port in the right section, it should work with the code as is.

Do let me know,

Hi Jess,

I spent the whole afternoon investigating the issue and found that the information you sent me applies to the broadcast service (source to wowza) but not for the Publish/delivery service (wowza to visitor).

I disabled all delivery profiles and changing the publish tcp port is OK for all protocols except HLS and applehttp. I even ran a grep script over the kaltura lib files and could not find any expressions with “1935”.

As far as I understand, this port setup comes from the Wowza Kaltura module publish call?

My aim is to have the stream content served via http (80) and https (443) ( through our CDN) without altering the standard Wowza and Kaltura settings.

Thanks anyway for all the time spent helping me.


Hi Jess,

I have just upgraded to 12.1 and was able to provision live delivery profiles and it works great ! That’s exactly what we needed.

I really appreciate all your help.

A little off-topic but the admin console has a bug with Safari/Mac. None of the partner windows opens on the admin console (configure, delivery_profile, etc.)



Hi David,

Delighted to hear we’re good and was happy to help:)
In regards to admin_console, indeed, the code can certainly use some work:) It’s FOSS however, so, if you’re interested in making contributions to fix it, the place to make a pull is here:

Thanks for taking the time to report and will be happy to get a pull request if you’re interested.