Hi @jess! Thanks for agreeing to help.
Here’s a file by file comparison:
nginx.conf ->
user kaltura;
worker_processes auto;
error_log /opt/kaltura/log/kaltura_nginx_errors.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
multi_accept on;
use epoll;
}
http {
upstream kalapi {
server server.ca;
add_header Access-Control-Allow-Origin server.ca
}
include mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $bytes_sent $request_time "$http_referer" "$http_user_agent" "-" - '
'"$sent_http_x_kaltura" "$http_host" $pid $sent_http_x_kaltura_session - '
'$request_length "$sent_http_content_range" "$http_x_forwarded_for" '
'"$http_x_forwarded_server" "$http_x_forwarded_host" "$sent_http_cache_control" '
'$connection ';
access_log /opt/kaltura/log/kaltura_nginx_access.log main;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 60;
keepalive_requests 1000;
client_header_timeout 20;
client_body_timeout 20;
reset_timedout_connection on;
send_timeout 20;
gzip on;
gzip_types application/vnd.apple.mpegurl video/f4m application/dash+xml text/xml;
# common vod settings
vod_mode mapped;
vod_upstream_location /kalapi_proxy;
vod_upstream_extra_args "pathOnly=1";
# shared memory zones
vod_metadata_cache metadata_cache 512m;
vod_mapping_cache mapping_cache 64m;
vod_response_cache response_cache 64m;
vod_performance_counters perf_counters;
# common file caching / aio
open_file_cache max=1000 inactive=5m;
open_file_cache_valid 2m;
open_file_cache_min_uses 1;
open_file_cache_errors on;
aio on;
vod_max_mapping_response_size 10m;
server {
listen 88;
server_name server.ca;
include /etc/nginx/conf.d/live.conf;
include /etc/nginx/conf.d/kaltura.conf;
}
include /etc/nginx/conf.d/ssl.conf;
}
# RTMP configuration
rtmp {
server {
listen 1935; # Listen on standard RTMP port
chunk_size 4000;
# This application is to accept incoming stream
application kLive {
live on; # Allows live input from above
# ADAPTIVE BITRATE SUPPORT
# Once the stream is alive, transcode for adaptive streaming
# This single ffmpeg command takes the input and transforms
# the source into 4 different streams with different bitrate
# and quality. The scaling done here respects the aspect
# ratio of the input.
# This is commented by default as it is CPU and RAM intensive
# If you opt to enable it, ensure you have sufficient resources.
#exec /opt/kaltura/bin/ffmpeg -i rtmp://dmz6.nurs.ualberta.ca:1935/$app/$name -async 1 -vsync -1
# -c:v libx264 -b:v 256k -b:a 32k -vf "scale=480:trunc(ow/a/2)*2" -tune zerolatency -preset veryfast -crf 23 -f flv rtmp://server.ca:1935/kLive/$name_low
# -c:v libx264 -b:v 768k -b:a 96k -vf "scale=720:trunc(ow/a/2)*2" -tune zerolatency -preset veryfast -crf 23 -f flv rtmp://server.ca:1935/kLive/$name_mid
# -c:v libx264 -b:v 1024k -b:a 128k -vf "scale=960:trunc(ow/a/2)*2" -tune zerolatency -preset veryfast -crf 23 -f flv rtmp://server.ca:1935/kLive/$name_high
# -c:v libx264 -b:v 1920k -b:a 128k -vf "scale=1280:trunc(ow/a/2)*2" -tune zerolatency -preset veryfast -crf 23 -f flv rtmp://server.ca:1935/kLive/$name_hd720
# -c copy -f flv rtmp://server.ca:1935/kLive/$name_src;
dash on;
dash_path /var/tmp/dashme;
hls on; # Enable HTTP Live Streaming
# Instruct clients to adjust resolution according to bandwidth
hls_variant _low BANDWIDTH=288000; # Low bitrate, sub-SD resolution
hls_variant _mid BANDWIDTH=448000; # Medium bitrate, SD resolution
hls_variant _high BANDWIDTH=1152000; # High bitrate, higher-than-SD resolution
hls_variant _hd720 BANDWIDTH=2048000; # High bitrate, HD 720p resolution
hls_variant _src BANDWIDTH=4096000; # Source bitrate, source resolution
hls_cleanup on;
hls_sync 100ms;
hls_fragment 2s;
hls_playlist_length 300m;
hls_path /var/tmp/hlsme/;
# Enable recording archived files of each stream
record all;
# This does not need to be publicly accessible since we'll convert and publish the files later
record_path /var/tmp/rec;
record_suffix _%Y-%m-%d_%H-%M-%S.flv;
record_lock on;
# Define the two scripts that will run when recording starts and when it finishes
exec_publish /opt/kaltura/bin/create_live_entry.php $args;
exec_record_done /opt/kaltura/bin/upload_live_recording.php $args $path;
}
}
}
I added the add_header directive (which isn’t part of the default) as mentioned in the other thread to try and help. I have a “vod_max_mapping_response_size 10m;” directive since I read it might help with my specific error. I have a bunch of extra directives in the rtmp part for live streaming, but I don’t suspect those would mess things up (happy to test though if you’d like).
kaltura.conf ->
# static files (crossdomain.xml, robots.txt etc.) + fallback to api
location / {
root /etc/nginx/static;
try_files $uri @api_fallback;
}
# nginx status page
location /nginx_status {
stub_status on;
access_log off;
}
# vod status page
location /vod_status {
vod_status;
access_log off;
}
# internal location for vod subrequests
location /kalapi_proxy/ {
internal;
proxy_pass http://kalapi/;
proxy_set_header Host $http_host;
}
# serve flavor progressive (clipFrom/To are not supported with 'vod none' so they are proxied)
location ~ ^/p/\d+/(sp/\d+/)?serveFlavor/((?!clipFrom)(?!clipTo).)*$ {
vod none;
add_header Last-Modified "Sun, 19 Nov 2000 08:52:00 GMT";
expires 100d;
}
# serve flavor HLS
location ~ ^/hls/p/\d+/(sp/\d+/)?serveFlavor/ {
vod hls;
vod_bootstrap_segment_durations 2000;
vod_bootstrap_segment_durations 2000;
vod_bootstrap_segment_durations 2000;
vod_bootstrap_segment_durations 4000;
add_header Last-Modified "Sun, 19 Nov 2000 08:52:00 GMT";
add_header Access-Control-Allow-Headers "*";
add_header Access-Control-Expose-Headers "Server,range,Content-Length,Content-Range";
add_header Access-Control-Allow-Methods "GET, HEAD, OPTIONS";
add_header Access-Control-Allow-Origin "*";
expires 100d;
}
# serve flavor DASH
location ~ ^/dash/p/\d+/(sp/\d+/)?serveFlavor/ {
vod dash;
vod_segment_duration 4000;
vod_bootstrap_segment_durations 3500;
vod_align_segments_to_key_frames on;
vod_dash_manifest_format segmenttemplate;
add_header Last-Modified "Sun, 19 Nov 2000 08:52:00 GMT";
add_header Access-Control-Allow-Headers "origin,range,accept-encoding,referer";
add_header Access-Control-Expose-Headers "Server,range,Content-Length,Content-Range";
add_header Access-Control-Allow-Methods "GET, HEAD, OPTIONS";
add_header Access-Control-Allow-Origin "*";
expires 100d;
}
# serve flavor HDS
location ~ ^/hds/p/\d+/(sp/\d+/)?serveFlavor/ {
vod hds;
vod_segment_duration 6000;
vod_align_segments_to_key_frames on;
vod_segment_count_policy last_rounded;
add_header Last-Modified "Sun, 19 Nov 2000 08:52:00 GMT";
add_header Access-Control-Allow-Origin "*";
expires 100d;
}
# serve flavor MSS
location ~ ^/mss/p/\d+/(sp/\d+/)?serveFlavor/ {
vod mss;
vod_segment_duration 4000;
vod_manifest_segment_durations_mode accurate;
add_header Last-Modified "Sun, 19 Nov 2000 08:52:00 GMT";
expires 100d;
}
# all unidentified requests fallback to api (inc. playManifest)
location @api_fallback {
proxy_pass http://kalapi;
proxy_set_header Host $http_host;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location /dashme {
open_file_cache off;
root /var/tmp;
add_header Cache-Control no-cache;
# To avoid issues with cross-domain HTTP requests (e.g. during development)
add_header Access-Control-Allow-Origin *;
}
location /hlsme {
open_file_cache off;
types {
application/vnd.apple.mpegurl m3u8;
}
root /var/tmp;
add_header Cache-Control no-cache; # Prevent caching of HLS fragments
add_header Access-Control-Allow-Origin *; # Allow web player to access our playlist
}
I have http://kalapi in a couple of places, since it’s http only as a test server. I think the two sections at the end are new (location /dashme, location /hlsme) relative to the old thread.
ssl.conf (probably not needed, since it’s http only, but I figured I would post)
server {
listen 8443 ssl;
server_name server.ca;
ssl_certificate /etc/ssl/certs/device.crt;
ssl_certificate_key /etc/pki/tls/private/device.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
include /etc/nginx/conf.d/kaltura.conf;
}
This appears to match the one in the other thread.
delivery_profiles ->
+------+------------+---------------------+---------------------+------------------------------------------------+------+------------------------------------------------+------------------------------------------------+--------------------------------------+-----------------------+------------+-----------+--------+-----------------+-------------------+------------+-----------+------------------------------------+----------+
| 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 |
+------+------------+---------------------+---------------------+------------------------------------------------+------+------------------------------------------------+------------------------------------------------+--------------------------------------+-----------------------+------------+-----------+--------+-----------------+-------------------+------------+-----------+------------------------------------+----------+
| 1001 | 0 | 2016-04-28 09:11:04 | 2016-04-28 09:11:04 | Kaltura HLS segmentation | 61 | Kaltura HLS segmentation | Kaltura HLS segmentation | http://server.ca:88/hls | server.ca | NULL | NULL | 0 | NULL | applehttp | 1 | 0 | NULL | 0 |
| 1002 | 0 | 2016-04-28 09:11:04 | 2016-04-28 09:11:04 | Kaltura HDS segmentation | 63 | Kaltura HDS segmentation | Kaltura HDS segmentation | http://server.ca:88/hds | server.ca | NULL | NULL | 0 | NULL | hdnetworkmanifest | 1 | 0 | NULL | 0 |
| 1003 | 0 | 2016-04-28 09:11:04 | 2016-04-28 09:11:04 | Kaltura DASH segmentation | 68 | Kaltura DASH segmentation | Kaltura DASH segmentation | http://server.ca:88/dash | server.ca | NULL | NULL | 0 | NULL | mpegdash | 1 | 0 | NULL | 0 |
+------+------------+---------------------+---------------------+------------------------------------------------+------+------------------------------------------------+------------------------------------------------+--------------------------------------+-----------------------+------------+-----------+--------+-----------------+-------------------+------------+-----------+------------------------------------+----------+
Those values all appear to be correct I think.
I did add: Header set Access-Control-Allow-Origin “*” in the kaltura.conf for apache as you mentioned in the other thread, but that didn’t seem to fix it either. I double checked to make sure port 88 is open (80, 88, 443, 1935, 1936, 2812) are all open.
I think that’s all that I could find in the other thread. If I missed anything, I’m happy to gather + post.