Description
Hi guys!
I am trying to get a local/mapped nginx-vod-module setup to run, pretty much according to your sample given here.
(cleaned) config looks like this
secure_token_akamai $token {
key 1234;
acl "$secure_token_baseuri*";
param_name __hdnea__;
}
server {
listen 6503;
listen 6502 ssl;
server_name my.domain.com;
ssl_certificate ...
ssl_certificate_key ...
vod_segments_base_url http://my.domain.com:1234;
vod_base_url https://my.domain.com:1235;
location /hls/ {
vod_mode mapped;
alias /var/hls/info/;
vod hls;
secure_token $token;
secure_token_avoid_cookies on;
secure_token_expires_time 100d;
secure_token_query_token_expires_time 1h;
secure_token_types application/vnd.apple.mpegurl;
secure_token_uri_filename_prefix index;
secure_token_uri_filename_prefix master;
secure_token_uri_filename_prefix encryption;
secure_token_tokenize_segments off;
akamai_token_validate $arg___hdnea__;
akamai_token_validate_key 1234;
akamai_token_validate_uri_filename_prefix encryption;
akamai_token_validate_uri_filename_prefix index;
akamai_token_validate_uri_filename_prefix master;
vod_secret_key "abcd";
vod_hls_encryption_method aes-128;
vod_align_segments_to_key_frames on;
vod_segment_duration 2000;
vod_live_window_duration 6000;
vod_max_mapping_response_size 4096;
}
}
I am trying to serve a stream with adaptive bitrates and multiple languages. A simplified version of my json looks like this
{ "playlistType": "live",
"segmentBaseTime": 1603022304000,
"firstClipTime": 1603022304000,
"expirationTime": 1603042304000,
"discontinuity": false,
"durations": [6960000],
"sequences": [
{ "clips": [ { "type": "source",
"path": "/var/media/1.mp4",
"tracks": "v1-a1"
} ],
"language": "ger" },
{ "clips": [ { "type": "source",
"path": "/var/media/2.mp4",
"tracks": "v1-a2"
} ],
"language": "eng" },
{ "clips": [ { "type": "source",
"path": "/var/media/1.mp4",
"tracks": "v1-a1" } ],
"language": "ger" },
{ "clips": [ { "type": "source",
"path": "/var/media/2.mp4",
"tracks": "v1-a2" } ],
"language": "eng" } ] }
Basically, I have one file per bitrate, each with multiple audio tracks. (Talking of it, maybe this confuses the server somehow?)
Requesting the master.m3u8, I retrieve a list of index m3u8s - I dont know all the details of HLS, but I can tell it contains first EXT-X-MEDIA entries pointing to playlists (matching the number of languages I have), and then #EXT-X-STREAM-INF entries - also pointing to playlists (matching the total number of streams).
My last remaining problem seems to be that #EXT-X-MEDIA playlist entries in the master file receive a token, but NOT the #EXT-X-STREAM-INF entries. This results in vlc not working and some Windows Store HLS player just playing audio.
I do not use any names based on vod_multi_uri_suffix - I tried that and it resulted in 404. My current theory is that its rather meant for mpag-dash.
Any help appreciated! If there are any syntax errors in my config files, thats because of my simplifications...