{"action":"created","issue":{"url":"https://api.github.com/repos/google/shaka-player/issues/1232","repository_url":"https://api.github.com/repos/google/shaka-player","labels_url":"https://api.github.com/repos/google/shaka-player/issues/1232/labels{/name}","comments_url":"https://api.github.com/repos/google/shaka-player/issues/1232/comments","events_url":"https://api.github.com/repos/google/shaka-player/issues/1232/events","html_url":"https://github.com/google/shaka-player/issues/1232","id":289389774,"number":1232,"title":"Regression in segment time calculation - presentationTimeOffset is added when it should not be","user":{"login":"sandersaares","id":9914262,"avatar_url":"https://avatars1.githubusercontent.com/u/9914262?v=4","gravatar_id":"","url":"https://api.github.com/users/sandersaares","html_url":"https://github.com/sandersaares","followers_url":"https://api.github.com/users/sandersaares/followers","following_url":"https://api.github.com/users/sandersaares/following{/other_user}","gists_url":"https://api.github.com/users/sandersaares/gists{/gist_id}","starred_url":"https://api.github.com/users/sandersaares/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sandersaares/subscriptions","organizations_url":"https://api.github.com/users/sandersaares/orgs","repos_url":"https://api.github.com/users/sandersaares/repos","events_url":"https://api.github.com/users/sandersaares/events{/privacy}","received_events_url":"https://api.github.com/users/sandersaares/received_events","type":"User","site_admin":false},"labels":[{"id":159144976,"url":"https://api.github.com/repos/google/shaka-player/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"closed","locked":false,"assignee":{"login":"TheModMaker","id":2141118,"avatar_url":"https://avatars2.githubusercontent.com/u/2141118?v=4","gravatar_id":"","url":"https://api.github.com/users/TheModMaker","html_url":"https://github.com/TheModMaker","followers_url":"https://api.github.com/users/TheModMaker/followers","following_url":"https://api.github.com/users/TheModMaker/following{/other_user}","gists_url":"https://api.github.com/users/TheModMaker/gists{/gist_id}","starred_url":"https://api.github.com/users/TheModMaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheModMaker/subscriptions","organizations_url":"https://api.github.com/users/TheModMaker/orgs","repos_url":"https://api.github.com/users/TheModMaker/repos","events_url":"https://api.github.com/users/TheModMaker/events{/privacy}","received_events_url":"https://api.github.com/users/TheModMaker/received_events","type":"User","site_admin":false},"assignees":[{"login":"TheModMaker","id":2141118,"avatar_url":"https://avatars2.githubusercontent.com/u/2141118?v=4","gravatar_id":"","url":"https://api.github.com/users/TheModMaker","html_url":"https://github.com/TheModMaker","followers_url":"https://api.github.com/users/TheModMaker/followers","following_url":"https://api.github.com/users/TheModMaker/following{/other_user}","gists_url":"https://api.github.com/users/TheModMaker/gists{/gist_id}","starred_url":"https://api.github.com/users/TheModMaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheModMaker/subscriptions","organizations_url":"https://api.github.com/users/TheModMaker/orgs","repos_url":"https://api.github.com/users/TheModMaker/repos","events_url":"https://api.github.com/users/TheModMaker/events{/privacy}","received_events_url":"https://api.github.com/users/TheModMaker/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/google/shaka-player/milestones/15","html_url":"https://github.com/google/shaka-player/milestone/15","labels_url":"https://api.github.com/repos/google/shaka-player/milestones/15/labels","id":2812197,"number":15,"title":"v2.4.0","description":"Focus areas:\r\n  - Apple products: desktop Safari, iOS browsers, FairPlay support, etc.\r\n  - Smoother transition for legacy broadcast technologies: CEA 608/708, etc.\r\n  - Adopt modern web APIs: Fetch, add background fetch to PWA, Network information API, etc.\r\n  - Regressions: AdaptationSetSwitching support in DASH, etc.","creator":{"login":"joeyparrish","id":6843156,"avatar_url":"https://avatars0.githubusercontent.com/u/6843156?v=4","gravatar_id":"","url":"https://api.github.com/users/joeyparrish","html_url":"https://github.com/joeyparrish","followers_url":"https://api.github.com/users/joeyparrish/followers","following_url":"https://api.github.com/users/joeyparrish/following{/other_user}","gists_url":"https://api.github.com/users/joeyparrish/gists{/gist_id}","starred_url":"https://api.github.com/users/joeyparrish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joeyparrish/subscriptions","organizations_url":"https://api.github.com/users/joeyparrish/orgs","repos_url":"https://api.github.com/users/joeyparrish/repos","events_url":"https://api.github.com/users/joeyparrish/events{/privacy}","received_events_url":"https://api.github.com/users/joeyparrish/received_events","type":"User","site_admin":false},"open_issues":38,"closed_issues":31,"state":"open","created_at":"2017-10-03T20:29:12Z","updated_at":"2018-02-12T18:01:59Z","due_on":"2018-02-15T08:00:00Z","closed_at":null},"comments":18,"created_at":"2018-01-17T19:44:57Z","updated_at":"2018-02-12T19:05:39Z","closed_at":"2018-02-01T17:58:31Z","author_association":"NONE","body":"https://github.com/google/shaka-player/commit/20750504fecd4855f2997dcd2eb92a7024dc2bdc appears to have introduced a regression, with the key line in question being https://github.com/google/shaka-player/blame/master/lib/dash/segment_template.js#L324. Possibly more of the logic is suspect - I did not dig deeper beyond finding why the first numbers with my video were off.\r\n\r\nAs far as I can tell, the function `find` appears to be there to determine the ~MPD start time in seconds~ segment position of the segment containing `periodTime`, which is an offset from the start of the period in seconds.\r\n\r\nUsing `presentationTimeOffset` in this calculation is incorrect. PTO does not determine anything about the MPD timeline, it says what media timestamp (PTS) corresponds to periodTime = 0. You should only use it for aligning the media timeline with the MPD timeline.\r\n\r\nThe referenced commit causes any segmentTemplate-using streams with presentationTimeOffset to have segments scheduled at the wrong moments in time.\r\n\r\nStill working on getting playable URL for you but I thought I would post immediately as it seemed pretty clear cut to me. Let me know if you want more supporting material and evidence and I am happy to provide.\r\n\r\nExample MPD:\r\n\r\n```\r\n<MPD type=\"dynamic\" availabilityStartTime=\"1970-01-01T00:07:00Z\" profiles=\"urn:mpeg:dash:profile:isoff-live:2011,http://dashif.org/guidelines/dash264\" timeShiftBufferDepth=\"PT15M\" minimumUpdatePeriod=\"PT15S\" minBufferTime=\"PT2S\" publishTime=\"2018-01-17T14:49:04.237755Z\" xmlns=\"urn:mpeg:dash:schema:mpd:2011\">\r\n  <!--availabilityStartTime is adjusted to add a delay of 00:07:00 to the availability timeline compared to the authoring timeline. Timestamps in period/segment paths indicate authoring time (UTC), not availability time (UTC+delay). Playback uses availability time.-->\r\n  <Period id=\"p_1516198946762\" start=\"P17548DT14H22M26.762S\">\r\n    <!--Starts 2018-01-17 14:21:59.762Z (1,516,198,946,762 ms from epoch) on the authoring timeline.-->\r\n    <!--Starts 2018-01-17 14:28:59.762Z (1,516,199,366,762 ms from epoch) on the availability timeline.-->\r\n    <AdaptationSet segmentAlignment=\"true\" group=\"1\">\r\n      <SegmentTemplate timescale=\"1000\" duration=\"4000\" media=\"p_1516198946762/$RepresentationID$/$Number%06d$.m4s\" initialization=\"p_1516198946762/$RepresentationID$/init.mp4\" presentationTimeOffset=\"1516198946762\" />\r\n      <Representation id=\"Track0\" mimeType=\"audio/mp4\" startsWithSAP=\"1\" bandwidth=\"64000\" audioSamplingRate=\"48000\" codecs=\"mp4a.40.2\" />\r\n    </AdaptationSet>\r\n    <AdaptationSet segmentAlignment=\"true\" group=\"2\" par=\"16:9\" maxHeight=\"720\" maxWidth=\"1280\" frameRate=\"30\">\r\n      <SegmentTemplate timescale=\"1000\" duration=\"4000\" media=\"p_1516198946762/$RepresentationID$/$Number%06d$.m4s\" initialization=\"p_1516198946762/$RepresentationID$/init.mp4\" presentationTimeOffset=\"1516198946762\" />\r\n      <Representation id=\"Track1\" mimeType=\"video/mp4\" startsWithSAP=\"1\" bandwidth=\"3000000\" sar=\"1:1\" width=\"1280\" height=\"720\" codecs=\"avc1.640032\" />\r\n    </AdaptationSet>\r\n  </Period>\r\n  <UTCTiming schemeIdUri=\"urn:mpeg:dash:utc:http-head:2014\" value=\"Manifest.mpd\" />\r\n</MPD>\r\n```\r\n\r\nThe period starts at some point on 2018-01-17. Both the MPD timeline zero point and the media timeline zero point are in 1970. The latter is indicated by presentationTimeOffset. The first segment to be played at period start is number 1.\r\n\r\nHowever, because of the problematic commit, Shaka adds PTO to the first segment, trying to play back something from 2066 instead (it tries to play segment number 379054268 as I post this)."},"comment":{"url":"https://api.github.com/repos/google/shaka-player/issues/comments/365028042","html_url":"https://github.com/google/shaka-player/issues/1232#issuecomment-365028042","issue_url":"https://api.github.com/repos/google/shaka-player/issues/1232","id":365028042,"user":{"login":"stroemlund","id":13052,"avatar_url":"https://avatars1.githubusercontent.com/u/13052?v=4","gravatar_id":"","url":"https://api.github.com/users/stroemlund","html_url":"https://github.com/stroemlund","followers_url":"https://api.github.com/users/stroemlund/followers","following_url":"https://api.github.com/users/stroemlund/following{/other_user}","gists_url":"https://api.github.com/users/stroemlund/gists{/gist_id}","starred_url":"https://api.github.com/users/stroemlund/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stroemlund/subscriptions","organizations_url":"https://api.github.com/users/stroemlund/orgs","repos_url":"https://api.github.com/users/stroemlund/repos","events_url":"https://api.github.com/users/stroemlund/events{/privacy}","received_events_url":"https://api.github.com/users/stroemlund/received_events","type":"User","site_admin":false},"created_at":"2018-02-12T19:05:39Z","updated_at":"2018-02-12T19:05:39Z","author_association":"NONE","body":"Yes plenty of times. And they simply refers to the stream working in every other players except shaka due to shaka handling the timestamps differently.\n\n\n> On 12 Feb 2018, at 19.46, Joey Parrish <notifications@github.com> wrote:\n> \n> I don't know, but it could be a bug in the Elemental encoder. Have you talked to Elemental support?\n> \n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub, or mute the thread.\n> \n"}}
{"actor":{"display_login":"stroemlund"}}