How can I use my own CDN?

Uh-oh. it is just transmitted a result,
The following contents have been tested.

Also
manifest request returns “http://MY_KALTURA_URL:88/hls/p/102/sp/10200/serveFlavor/entryId/0_ja2c0ls3/v/2/flavorId/0_82jpj4fk/name/a.mp4/seg-1-v1-a1.ts” which complies perfectly with the ‘url’ column in delivery_profile id 1001… What is the issue?

Hi,

Sorry but I still don’t understand… your delivery profile had:
url: http://MY_KALTURA_URL:88/hls
so the manifest points there. If your CDN does not work over port 88, just update the record and remove the port.

Is there another problem I am missing?

The path to the TS files in any combination of delivery_profile, it will be set [MY_KALTURA_URL 88]. . .
I want to know [index.m3u8 file] is generated by any program. And, I’ll make sure the logic of the program.

Sorry but I still don’t understand what you want to accomplish.

By default, CE makes use of nginx-vod-module to serve files in HLS, HDS and DASH formats.

The first relevant service in that regard is playManifest, the code of which is here:
/opt/kaltura/app/alpha/apps/kaltura/modules/extwidget/actions/playManifestAction.class.php

Then, as I explained before, the following default profile IDs are used to serve HLS, HDS and DASH, respectfully:
mysql> select id,name,streamer_type from delivery_profile where id in (1001,1002,1003)\G
*************************** 1. row ***************************
id: 1001
name: Kaltura HLS segmentation
streamer_type: applehttp
url: http://CE_NGINX_HOST/hls
*************************** 2. row ***************************
id: 1002
name: Kaltura HDS segmentation
streamer_type: hdnetworkmanifest
url: http://CE_NGINX_HOST/hds
*************************** 3. row ***************************
id: 1003
name: Kaltura DASH segmentation
streamer_type: mpegdash
url: http://CE_NGINX_HOST/dash

By default, the url for each record points to the CE_NGINX_HOST, which has the vod-module loaded.
There is documentation for nginx-vod-module in its repo’s README.

Dear Jess.
Thank for very much for your support.

Problem was improved in there way for the moment.


This was a hint.

  1. Configure the proxy server to replace example.com/hls with example.com/video/hls by using

thanks

Hi @aoko

Not sure I understand where we stand at the moment but I just answered another post with a step by step walk through of all needed configurations.
You can see that here:

I just did a setup of a basic caching reverse proxy in front of Kaltura. I used this thread, among others, to make it work. I thought I’d share how it was done and my understanding of it.

I use two servers:
kalturacdn.com = reverse proxy.
kalturaserver.com = kaltura server.

I did the setup for a single partner. As Jess writes above, the default delivery_profiles used when playing an entry can be inspected using:

mysql>select * from delivery_profile where id in (1001,1002,1003)\G

Kaltura configuration

In admin console, in the Profiles column for my partner, I choose Delivery Profile.
I created a profile with these settings:

type = VOD_PACKAGER_HLS
Streamer Type = APPLE_HTTP
url = http://kalturacdn.com:88/hls 	
Delivery status = active

It results in the following row in the database (I stripped some irrelevant columns):

             id: 1004
     partner_id: 102
           type: 61
            url: http://kalturacdn.com:88/hls
      host_name: kalturacdn.com
         status: 0
media_protocols: NULL
  streamer_type: applehttp
     is_default: 0

Next step, in Admin console in the Actions column i choose Configure.
Under Publisher Specific Delivery Settings in the Add format drop-down list, I choose APPLE_HTTP and click the Add button. I can see my newly created delivery profile. I select it and click the OK button.

Nginx configuration

This is a very basic nginx configuration that I will use as a starting point:

http {
        proxy_cache_path /data/nginx/cache_static keys_zone=kaltura_static:100m inactive=10s max_size=1g;
        proxy_cache_path /data/nginx/cache_vod keys_zone=kaltura_vod:100m inactive=10s max_size=1g;

server {
        listen 88 default_server;
        server_name kalturacdn.com;
        add_header Access-Control-Allow-Origin *;
        proxy_cache kaltura_vod;
        location / {
                proxy_set_header Host $http_host;
                proxy_pass http://kalturaserver.com:88;
        }
}
server {
        listen 80 default_server;
        server_name kalturacdn.com;
        proxy_cache kaltura_static;
        location / {
                proxy_set_header Host $http_host;
                proxy_pass http://kalturaserver.com;
        }
}

The proxy_set_header directive is important. It seems the host attribute in the request headers from the reverse proxy will impact what url will be in the index.m3u8 file generated before playback.

Hello @pnts-se ,

We have been using our own CDN for years and here are my suggestions:

1-For kaltura server/api just configure the zzzkaltura.ssl.conf withe a wildcard (*) and a local certificate. Your CDN will do the SSL offloading but calling everything from kaltura con port 80.
This will make things easier.
2- For kaltura-ngninx, I suggest creating a different domain (ie, cdn.mykaltura.com) and adding this name to the nginx server/virtual domain. You need to configure each partner to use this particular delivery profile.
3- In order to avoid problems with your hls segments and manifests, add these lines to your kaltura.conf nginx file:

serve flavor HLS

            location ~ ^/hls/p/\d+/(sp/\d+/)?serveFlavor/ {
                 vod hls;

---- Add this—

   vod_segments_base_url $http_x_forwarded_proto://$http_x_forwarded_host;
    vod_base_url $http_x_forwarded_proto://$http_x_forwarded_host;
     .
     .

Using a CDN is more than imperative, I would say. A custom CDN will allow kaltura to scale at a reasonable cost.

I hope this helps,

David