How can I use my own CDN?

my cdn url = http://mycdn.url
my kaltura url = http://mykaltura.url

I was written in HTML with the contents of the following.

<script src="http://mycdn.url/p/102/sp/10200/embedIframeJs/uiconf_id/23448266/partner_id/102"></script>
<div id="kaltura_player_1476754070" style="180px;background-color: #000F80;;" align="center"></div>
<script>
kWidget.embed(
"LeadWithHLSOnJs":"true",
"LeadWithHLSOnFlash":"true",
"kaltura.CdnUrl":"http://mycdn.url",
'Kaltura.ServiceUrl': 'http://mycdn.url'

}, "cache_st": 147675407, "entry_id": "0_0zzh0dmk" });
</script>

Certainly it was sending a request from the browser to the URL of the CDN.:smiley:
However…!

requestURL=>
http://mycdn.url/p/102/sp/10200/playManifest/entryId/0_0zzh0dmk/flavorIds/0_fh1q3ek5,0_2ergybl4,0_1ncbq9sr/format/applehttp/protocol/http/a.m3u8?referrer=aHR0cDovL2FvY2hpLnVuaXYuenhjdi5qcA==&playSessionId=4e3c3a60-599a-e8cc-f3a2-2424f7870cd8&clientTag=html5:v2.46&uiConfId=23448311&responseFormat=jsonp&callback=jQuery1111032274580567578637_1476761644543&_=1476761644544&fda

However,:sob: I will check the response and, the contents of the response does not describe the URL of the CDN.

response=>

jQuery1111032274580567578637_1476761644543({“entryId”:“0_0zzh0dmk”,“duration”:6284.8,“baseUrl”:"",“flavors”:[{“url”:“http://mykaltura.url:88/hls/p/102/sp/10200/serveFlavor/entryId/0_0zzh0dmk/v/2/flavorId/0_fh1q3ek5/name/a.mp4/index.m3u8”,“ext”:“mp4”,“bitrate”:471,“width”:640,“height”:360,“audioLanguage”:null,“audioLanguageName”:null},{“url”:“http://mykaltura.url:88/hls/p/102/sp/10200/serveFlavor/entryId/0_0zzh0dmk/v/2/flavorId/0_2ergybl4/name/a.mp4/index.m3u8”,“ext”:“mp4”,“bitrate”:973,“width”:640,“height”:360,“audioLanguage”:null,“audioLanguageName”:null},{“url”:“http://mykaltura.url:88/hls/p/102/sp/10200/serveFlavor/entryId/0_0zzh0dmk/v/2/flavorId/0_1ncbq9sr/name/a.mp4/index.m3u8”,“ext”:“mp4”,“bitrate”:1628,“width”:1024,“height”:576,“audioLanguage”:null,“audioLanguageName”:null}]})

How can I use my own CDN?:cold_sweat:

By add delivery profile, has been improved is part of the problem.

Kaltura_Client_Enum_DeliveryProfileType::VOD_PACKAGER_HLS Kaltura_Client_Enum_PlaybackProtocol::APPLE_HTTP

But [.ts] files path not been improved.

Look like this.

#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-ALLOW-CACHE:YES
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:1
#EXTINF:2.000,
http://mykaltura.url:88/hls/p/102/sp/10200/serveFlavor/entryId/0_0zzh0dmk/v/2/flavorId/0_1ncbq9sr/name/a.mp4/seg-1-v1-a1.ts
#EXTINF:2.000,
http://mykaltura.url:88/hls/p/102/sp/10200/serveFlavor/entryId/0_0zzh0dmk/v/2/flavorId/0_1ncbq9sr/name/a.mp4/seg-2-v1-a1.ts

Hello,

By default, CE uses kaltura-nginx which is compiled with the nginx-vod-module to serve entries in HLS, HDS and DASH formats.
You are prompted about the hostname to use for Nginx during the configuration phase, in the manifest example you posted, Nginx listens on port 88 with the servername mykaltura.url.

If you wish to use your own CDN instead, you need to go to Admin Console->your partner->profiles->delivery profiles and input the relevant params, also, to push the entries to your own CDN, you need to configure a remote storage profile, again from Admin Console->your partner->profiles->Remote Storage.

The profiles, including the default ones to be used with kaltura-nginx, are stored in the kaltura.delivery_profile.
# mysql -h$DB1_HOST -u$DB1_USER -p$DB1_PASS $DB1_NAME

mysql> select id, partner_id,name,url,host_name from delivery_profile;
The profiles that belong to partner_id 0 are the default ones and are shared between all partners, if you create a profile for a specific partner and set it as default, it will be used instead of the profiles that belong to partner ID 0.

Hope this helps,

Dear jess.
Thank you very much for you help.

If use the kaltura via a revers proxy server, what I should do how settings?

In networks environment that does not open the 88port, can not access to the [*.ts] files.
Ι need to think of a solution for that.

Hi,

You can use any port you’d like for Nginx, of course 80 is probably taken by your Apache so I imagine you’ll want something like 8080 for Nginx.
You will need to edit /opt/kaltura/nginx/conf/nginx.conf [on deb based machines] or /etc/nginx/nginx.conf [on RPM based machines]

        server {
                listen 88;

and also update the delivery_profile table, changing 88 to 8080 [or any other port you end up using].

Dear jess.
Thank you very much for you help.

I am set to set the delivery_profile as follows, it is read from the kaltura system.
*************************** 14. row ***************************
id: 1005
partner_id: 102
name: HLS CDN
type: 21
system_name: HLS CDN
description: HLS CDN
url: http://mycdn.url/hls
host_name: mycdn.url
recognizer: NULL
tokenizer: NULL
status: 0
media_protocols: NULL
streamer_type: hls
is_default: 0
parent_id: 0
custom_data: NULL
priority: 0

a.m3u8 and index.m3u8 files refer to mycdn.url.
But all [*.ts] file refer to my kaltura url.

For example)
The path of the [*.ts] files that are listed in all of index.m3u8 file is the following.

EXTM3U
EXT-X-TARGETDURATION:10
EXT-X-ALLOW-CACHE:YES
EXT-X-PLAYLIST-TYPE:VOD
EXT-X-VERSION:3
EXT-X-MEDIA-SEQUENCE:1
EXTINF:2.000,
http://mykaltura.url:88/hls/p/102/sp/10200/serveFlavor/entryId/0_0zzh0dmk/v/2/flavorId/0_1ncbq9sr/name/a.mp4/seg-1-v1-a1.ts

I need to set to refer to [my kaltura url] even ts files.

I would appreciate it if I could get your advice in regards to that matter.

Hello,

For streamer_type, use applehttp and also set is_default to 1.
Then it should use your profile over the default HLS profile, which is profile ID 1001.
Run this query to see the default active profiles:

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

hello, jess.

For streamer_type, use applehttp and also set is_default to 1.
Then it should use your profile over the default HLS profile, which is profile ID 1001.
Run this query to see the default active profiles:

I update the mysql record, tried a plurality of patterns.

mysql> select * from delivery_profile where streamer_type = “applehttp”\G
*************************** 1. row ***************************
id: 1
partner_id: 0
name: Default HTTP Delivery Profile
type: 10
system_name: Default_Akamai_HLS_direct
description: Default Akamai HLS direct
url: http://mykaltura.url
host_name: mykaltura.url
recognizer: NULL
tokenizer: NULL
status: 0
media_protocols: NULL
streamer_type: applehttp
is_default: 1
parent_id: 0
custom_data: NULL
priority: 0
*************************** 2. row ***************************
id: 3
partner_id: 0
name: Default HLS Live Delivery Profile
type: 1001
system_name: Default_HLS_Live_Delivery_Profile
description: Default HLS Live Delivery Profile
url: NULL
host_name: NULL
recognizer: NULL
tokenizer: NULL
status: 0
media_protocols: NULL
streamer_type: applehttp
is_default: 1
parent_id: 0
custom_data: NULL
priority: 0
*************************** 3. row ***************************
id: 1001
partner_id: 0
name: Kaltura HLS segmentation
type: 61
system_name: Kaltura HLS segmentation
description: Kaltura HLS segmentation
url: http://mykaltura.url:88/hls
host_name: mykaltura.url
recognizer: NULL
tokenizer: NULL
status: 0
media_protocols: NULL
streamer_type: applehttp
is_default: 1
parent_id: 0
custom_data: NULL
priority: 0
*************************** 4. row ***************************
id: 1004
partner_id: 102
name: HLS my cdn url
type: 61
system_name: HLS my cdn url
description: HLS my cdn url
url: http://my cdn url/hls
host_name: my cdn url
recognizer: NULL
tokenizer: NULL
status: 0
media_protocols: NULL
streamer_type: applehttp
is_default: 0
parent_id: 0
custom_data: NULL
priority: 0


mysql> update delivery_profile set url=“http://my cdn url/hls” , host_name=“my cdn url” ,is_default = false where id IN(1,1001);
mysql> update delivery_profile set is_default = 1 where id = 1004;
mysql> update delivery_profile set type=1004 where type=1001;


But all [*.ts] file refer to my kaltura url.
The problem does not improve.:sweat:

Hi @aoko,

Not sure I understand… I assume we want to use profile ID 1004? if so, you need to set is_default to 1. Right now, I see it is set to 0.
Also, you shouldn’t touch the profile type manually. It should be 61, same as profile ID 1001.
You basically need exactly the same values as ID 1001 has, only with your own url and hostname.
Also, you can try to set is_default to 0 for ALL but the profile you want to make sure that one is selected.

hi jess. Thank you very much for you help.

I tried the following:
mysql> update delivery_profile set is_default=false;
mysql> update delivery_profile set is_default=true where id IN(1004);

But all [*.ts] file refer to my kaltura url.
The problem does not improve.:sweat:

Am I wrong, “[Publisher Specific Delivery Settings]”?
Delivery profile ids (JSON) is
{“hls”:[4],“applehttp”:[1004],“http”:[2],“hds”:[303],“mpegdash”:[301]}

hummmm :sob:

For profile ID 1004, is_default should be set to 1, not true. For the rest, set it to 0.
If it still does not work, please post all profiles again so I can see what the records look like post all your changes.

jess thanks.

Please confirm the following information.

ysql> select * from delivery_profile\G
*************************** 1. row ***************************
id: 1
partner_id: 0
created_at: 2016-08-27 00:23:07
updated_at: 2016-08-27 00:23:07
name: Default HTTP Delivery Profile
type: 10
system_name: Default_Akamai_HLS_direct
description: Default Akamai HLS direct
url: http://my_kaltura_url
host_name: my_kaltura_url
recognizer: NULL
tokenizer: NULL
status: 0
media_protocols: NULL
streamer_type: applehttp
is_default: 0
parent_id: 0
custom_data: NULL
priority: 0
*************************** 2. row ***************************
id: 2
partner_id: 0
created_at: 2016-08-27 00:23:07
updated_at: 2016-08-27 00:23:07
name: Default HTTP Delivery Profile
type: 14
system_name: Default HTTP Delivery Profile
description: Default HTTP Delivery Profile
url: http://my_kaltura_url
host_name: my_kaltura_url
recognizer: NULL
tokenizer: NULL
status: 0
media_protocols: NULL
streamer_type: http
is_default: 0
parent_id: 0
custom_data: NULL
priority: 0
*************************** 3. row ***************************
id: 3
partner_id: 0
created_at: 2016-08-27 00:23:07
updated_at: 2016-08-27 00:23:07
name: Default HLS Live Delivery Profile
type: 1001
system_name: Default_HLS_Live_Delivery_Profile
description: Default HLS Live Delivery Profile
url: NULL
host_name: NULL
recognizer: NULL
tokenizer: NULL
status: 0
media_protocols: NULL
streamer_type: applehttp
is_default: 0
parent_id: 0
custom_data: NULL
priority: 0
*************************** 4. row ***************************
id: 4
partner_id: 0
created_at: 2016-08-27 00:23:07
updated_at: 2016-08-27 00:23:07
name: Default HLS Network Live Delivery Profile
type: 1001
system_name: Default_HLS_Network_Live_Delivery_Profile
description: Default HLS Nework Live Delivery Profile
url: NULL
host_name: NULL
recognizer: NULL
tokenizer: NULL
status: 0
media_protocols: NULL
streamer_type: hls
is_default: 0
parent_id: 0
custom_data: NULL
priority: 0
*************************** 5. row ***************************
id: 5
partner_id: 0
created_at: 2016-08-27 00:23:07
updated_at: 2016-08-27 00:23:07
name: Default HLS To Multicast Live Delivery Profile
type: 1006
system_name: Default_HLS_To_Multicast_Live_Delivery_Profile
description: Default HLS To Multicast Live Delivery Profile
url: NULL
host_name: NULL
recognizer: NULL
tokenizer: NULL
status: 0
media_protocols: NULL
streamer_type: applehttp_to_mc
is_default: 0
parent_id: 0
custom_data: NULL
priority: 0
*************************** 6. row ***************************
id: 301
partner_id: 0
created_at: 2016-08-27 00:23:07
updated_at: 2016-08-27 00:23:07
name: Default MPEG-DASH Live Delivery Profile
type: 1003
system_name: Default MPEG-DASH Live Delivery Profile
description: Default MPEG-DASH Live Delivery Profile
url: NULL
host_name: NULL
recognizer: NULL
tokenizer: NULL
status: 0
media_protocols: NULL
streamer_type: mpegdash
is_default: 0
parent_id: 0
custom_data: NULL
priority: 0
*************************** 7. row ***************************
id: 302
partner_id: 0
created_at: 2016-08-27 00:23:07
updated_at: 2016-08-27 00:23:07
name: Default HD Network Live Delivery Profile
type: 1002
system_name: Default_HD_Network_Live_Delivery_Profile
description: Default HD Network Live Delivery Profile
url: NULL
host_name: NULL
recognizer: NULL
tokenizer: NULL
status: 0
media_protocols: NULL
streamer_type: hdnetworkmanifest
is_default: 0
parent_id: 0
custom_data: NULL
priority: 0
*************************** 8. row ***************************
id: 303
partner_id: 0
created_at: 2016-08-27 00:23:07
updated_at: 2016-08-27 00:23:07
name: Default HDS Live Delivery Profile
type: 1002
system_name: Default_HDS_Live_Delivery_Profile
description: Default HDS Live Delivery Profile
url: NULL
host_name: NULL
recognizer: NULL
tokenizer: NULL
status: 0
media_protocols: NULL
streamer_type: hds
is_default: 0
parent_id: 0
custom_data: NULL
priority: 0
*************************** 9. row ***************************
id: 304
partner_id: 0
created_at: 2016-08-27 00:23:07
updated_at: 2016-08-27 00:23:07
name: Default RTMP Live Delivery Profile
type: 1005
system_name: Default_RTMP_Live_Delivery_Profile
description: Default RTMP Live Delivery Profile
url: NULL
host_name: NULL
recognizer: NULL
tokenizer: NULL
status: 0
media_protocols: NULL
streamer_type: rtmp
is_default: 0
parent_id: 0
custom_data: a:1:{s:12:“enforceRtmpe”;s:1:“0”;}
priority: 0
*************************** 10. row ***************************
id: 1001
partner_id: 0
created_at: 2016-08-27 00:23:07
updated_at: 2016-08-27 00:23:07
name: Kaltura HLS segmentation
type: 61
system_name: Kaltura HLS segmentation
description: Kaltura HLS segmentation
url: http://my_kaltura_url:88/hls
host_name: my_kaltura_url
recognizer: NULL
tokenizer: NULL
status: 0
media_protocols: NULL
streamer_type: applehttp
is_default: 0
parent_id: 0
custom_data: NULL
priority: 0
*************************** 11. row ***************************
id: 1002
partner_id: 0
created_at: 2016-08-27 00:23:07
updated_at: 2016-08-27 00:23:07
name: Kaltura HDS segmentation
type: 63
system_name: Kaltura HDS segmentation
description: Kaltura HDS segmentation
url: http://my_kaltura_url:88/hds
host_name: my_kaltura_url
recognizer: NULL
tokenizer: NULL
status: 0
media_protocols: NULL
streamer_type: hdnetworkmanifest
is_default: 0
parent_id: 0
custom_data: NULL
priority: 0
*************************** 12. row ***************************
id: 1003
partner_id: 0
created_at: 2016-08-27 00:23:07
updated_at: 2016-08-27 00:23:07
name: Kaltura DASH segmentation
type: 68
system_name: Kaltura DASH segmentation
description: Kaltura DASH segmentation
url: http://my_kaltura_url:88/dash
host_name: my_kaltura_url
recognizer: NULL
tokenizer: NULL
status: 0
media_protocols: NULL
streamer_type: mpegdash
is_default: 0
parent_id: 0
custom_data: NULL
priority: 0
*************************** 13. row ***************************
id: 1004
partner_id: 102
created_at: 2016-10-18 18:41:26
updated_at: 2016-10-19 22:34:46
name: HLS MY_CDN_URL
type: 61
system_name: HLS MY_CDN_URL
description: HLS MY_CDN_URL
url: http://MY_CDN_URL/hls
host_name: MY_CDN_URL
recognizer: NULL
tokenizer: NULL
status: 0
media_protocols: NULL
streamer_type: applehttp
is_default: 1
parent_id: 0
custom_data: NULL
priority: 0

OK, looks fine. And what does the manifest look like now?

thanks.

In the following order, there is a HTTP request.

http://MY_CDN_URL/crossdomain.xml
http://MY_CDN_URL/p/102/sp/10200/playManifest/entryId/0_ja2c0ls3/flavorIds/0_82jpj4fk,0_ir6xhg9s,0_nx4sbzsy/format/applehttp/protocol/http/a.m3u8?referrer=aHR0cDovL2FvY2hpLnVuaXYuenhjdi5qcA==&playSessionId=6787268b-1843-317b-77c4-55f770aa123e&clientTag=html5:v2.46&uiConfId=23448312
http://MY_CDN_URL/hls/p/102/sp/10200/serveFlavor/entryId/0_ja2c0ls3/v/2/flavorId/0_82jpj4fk/name/a.mp4/index.m3u8
http://MY_CDN_URL/hls/p/102/sp/10200/serveFlavor/entryId/0_ja2c0ls3/v/2/flavorId/0_ir6xhg9s/name/a.mp4/index.m3u8
http://MY_CDN_URL/hls/p/102/sp/10200/serveFlavor/entryId/0_ja2c0ls3/v/2/flavorId/0_nx4sbzsy/name/a.mp4/index.m3u8
http://MY_KALTURA_URL/p/102/sp/10200/thumbnail/entry_id/0_ja2c0ls3/version/100002/acv/122/width/100/vid_slices/100
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
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
http://MY_KALTURA_URL:88/hls/p/102/sp/10200/serveFlavor/entryId/0_ja2c0ls3/v/2/flavorId/0_nx4sbzsy/name/a.mp4/seg-2-v1-a1.ts
http://MY_KALTURA_URL:88/hls/p/102/sp/10200/serveFlavor/entryId/0_ja2c0ls3/v/2/flavorId/0_nx4sbzsy/name/a.mp4/seg-2-v1-a1.ts
http://MY_KALTURA_URL:88/hls/p/102/sp/10200/serveFlavor/entryId/0_ja2c0ls3/v/2/flavorId/0_nx4sbzsy/name/a.mp4/seg-3-v1-a1.ts

Please try editing profile 1001, setting the url to the CDN you want to use and is_default to 1.

hi jess.

As a result of editing profile 1001, did not improve…

Profile 1001 has been set as follows.

id: 1001
partner_id: 0
created_at: 2016-08-27 00:23:07
updated_at: 2016-08-27 00:23:07
name: Kaltura HLS segmentation
type: 61
system_name: Kaltura HLS segmentation
description: Kaltura HLS segmentation
url: http://mycdn.url/hls
host_name: mykaltura.url
recognizer: NULL
tokenizer: NULL
status: 0
media_protocols: NULL
streamer_type: applehttp
is_default: 1
parent_id: 0
custom_data: NULL
priority: 0

Publisher Specific Delivery Settings Delivery profile ids (JSON) is following.

{"hls":[4],"applehttp":[1001],"http":[2],"hds":[303],"mpegdash":[301]}

all [*.ts] file refer to MY_KALTURA_URL:88.

http://MY_CDN_URL/p/102/sp/10200/playManifest/entryId/0_ja2c0ls3/flavorIds/0_82jpj4fk,0_ir6xhg9s,0_nx4sbzsy/format/applehttp/protocol/http/a.m3u8
http://MY_CDN_URL/crossdomain.xml
http://MY_CDN_URL/hls/p/102/sp/10200/serveFlavor/entryId/0_ja2c0ls3/v/2/flavorId/0_82jpj4fk/name/a.mp4/index.m3u8
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
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

Hi @aoko,

Something is off here… what does:

return?

hi! hess

3records return.

mysql> select * from delivery_profile where url like “%:88%”\G

*************************** 1. row ***************************
             id: 1001
     partner_id: 0
     created_at: 2016-08-27 00:23:07
     updated_at: 2016-08-27 00:23:07
           name: Kaltura HLS segmentation
           type: 61
    system_name: Kaltura HLS segmentation
    description: Kaltura HLS segmentation
            url: http://MY_KALTURA_URL:88/hls
      host_name: MY_KALTURA_URL
     recognizer: NULL
      tokenizer: NULL
         status: 0
media_protocols: NULL
  streamer_type: applehttp
     is_default: 1
      parent_id: 0
    custom_data: NULL
       priority: 0
*************************** 2. row ***************************
             id: 1002
     partner_id: 0
     created_at: 2016-08-27 00:23:07
     updated_at: 2016-08-27 00:23:07
           name: Kaltura HDS segmentation
           type: 63
    system_name: Kaltura HDS segmentation
    description: Kaltura HDS segmentation
            url: http://MY_KALTURA_URL:88/hds
      host_name: MY_KALTURA_URL
     recognizer: NULL
      tokenizer: NULL
         status: 0
media_protocols: NULL
  streamer_type: hdnetworkmanifest
     is_default: 1
      parent_id: 0
    custom_data: NULL
       priority: 0
*************************** 3. row ***************************
             id: 1003
     partner_id: 0
     created_at: 2016-08-27 00:23:07
     updated_at: 2016-08-27 00:23:07
           name: Kaltura DASH segmentation
           type: 68
    system_name: Kaltura DASH segmentation
    description: Kaltura DASH segmentation
            url: http://MY_KALTURA_URL:88/dash
      host_name: MY_KALTURA_URL
     recognizer: NULL
      tokenizer: NULL
         status: 0
media_protocols: NULL
  streamer_type: mpegdash
     is_default: 1
      parent_id: 0
    custom_data: NULL
       priority: 0
3 rows in set (0.00 sec)

Hi @aoko,

Now I do not understand the problem. Your 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?

The problem is “ts file URL” is described in index.m3u8 file.

Now I do not understand the problem. Your 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?

What do I me what settings. To refer to the “MY_CDN_URL” from index.m3u8?
I hope that the following result is returned.
“http://MY_CDN_URL/hls/p/102/sp/10200/serveFlavor/entryId/0_ja2c0ls3/v/2/flavorId/0_82jpj4fk/name/a.mp4/seg-1-v1-a1.ts”