Fix support dash.js >= 2.1
As mentioned in https://github.com/sergey-dryabzhinsky/nginx-rtmp-module/pull/121#issuecomment-221043812
Pull #121 broke dash.js support.
Seems like we need to return availabilityEndTime back.
Or don't. May be just need right times in playlist.
Use fix-121-dash-availabilityEndTime branch to test fixes and improvements.
Strange, otherwise, its better to have UTCTiming element in MPD
It's recommended. And if you needed it you must use link to the streaming server. And you should expire file by link:
# HTTP virt-host config
location /time.txt {
expire -1;
open_file_cache off;
}
@ArhiChief Can you test latest code from fix-121-dash-availabilityEndTime branch with dash.js ~= 2.0.0 and shaka-player?
Just add into rtmp config:
dash_clock_compensation http_head;
dash_clock_helper_uri http://your-rtmp-server/any-static-file-like-robots.txt;
And add forced expiration for that file in http config section.
ok, I'll test it today
I have just tested this branch and with the Dash.js 2.1 player the livestream stops after 3 seconds.
I have tested http_head and ntp, both methods work fine.
It can be closed now and merge fix-121-dash-availabilityEndTime branch to dev.
@arition I waiting response from @ArhiChief
@zydronium and dev branch working fine? Can you provide you config option for dash, stream encoding options like keyframe interval/GOP?
@Iratu I wonder what is error was: Debug.js:108[40318] [object MediaError].
It may be video/audio decode error. Or playlist chunk download error.
Or even chunk index desynchronization.
And maybe we need msec precision in times.
Can someone provide MPD-playlist from other software, like Wowza?
Seems like we can add some precision to buffer/period times. And probably fix some roundup for int values.
Updated fix-121-dash-availabilityEndTime branch.
Please, check it with Dash 2.0 and 2.1.
Freezes after 2 seconds of playback with 2.1.1 and all lower versions
Debug for 2.1.1: http://pastebin.com/F7qndhEV
Using the nightly, it doesn't load at all: http://pastebin.com/LcPjhpGd
The MPD that was used: http://pastebin.com/YpeuscSR
@TimIsOverpowered It seems like your encoder has GOP/key_frame_interval option more than 2s. Or it produce keyframes not by 2s interval.
@sergey-dryabzhinsky I have set dash_fragment to 2s and dash_playlist_length to 8s.
OBS' keyframe interval is set to 2 as well.
What could be the problem?
Have same problem with Shaka player 2.0 beta2 in Firefox.
Player play 1 fragment (sometimes not) and hangs for about a minute, then video start playing normally. Seems like player out of sync. But player does sync request. Server provides Date header with proper CORS.
dash_fragment is default, 5s. publish_time_fix off.
Stream is h264 baseline with GOP 2/s and CBR,
I have no idea, what difference between Chromium and Firefox. In Chromium same playback starts fast and play without lags.
Any suggestions?
@sergey-dryabzhinsky When the keyframes are stable at 2s, it works great!
@skykohai May be this Shaka issue https://github.com/google/shaka-player/issues/377 is related.
Make sure that encoder GOP/keyframe is per 5s or less but dividable in terms of fps, playlist length dividable by 5s, wait_key on; in live app.
Merged with dev.