{"action":"created","issue":{"url":"https://api.github.com/repos/gpac/gpac/issues/190","labels_url":"https://api.github.com/repos/gpac/gpac/issues/190/labels{/name}","comments_url":"https://api.github.com/repos/gpac/gpac/issues/190/comments","events_url":"https://api.github.com/repos/gpac/gpac/issues/190/events","html_url":"https://github.com/gpac/gpac/issues/190","id":95313663,"number":190,"title":"MP4Box/onDemand Profile: Tiny Initial Audio Segment Breaks the DASHIF Reference Player","user":{"login":"misterkbar","id":5437128,"avatar_url":"https://avatars.githubusercontent.com/u/5437128?v=3","gravatar_id":"","url":"https://api.github.com/users/misterkbar","html_url":"https://github.com/misterkbar","followers_url":"https://api.github.com/users/misterkbar/followers","following_url":"https://api.github.com/users/misterkbar/following{/other_user}","gists_url":"https://api.github.com/users/misterkbar/gists{/gist_id}","starred_url":"https://api.github.com/users/misterkbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/misterkbar/subscriptions","organizations_url":"https://api.github.com/users/misterkbar/orgs","repos_url":"https://api.github.com/users/misterkbar/repos","events_url":"https://api.github.com/users/misterkbar/events{/privacy}","received_events_url":"https://api.github.com/users/misterkbar/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2015-07-15T23:49:41Z","updated_at":"2015-07-23T09:22:08Z","closed_at":"2015-07-23T09:22:07Z","body":"#### I have noticed that A/V assets transcoded with ```FFMPEG``` and boxed with ```MP4Box``` using the ```dashavc264:onDemand``` profile will have an  extremely short initial audio segment (in the range of 1/100th of a second), which will in turn cause the HTML 5 [DASHIF](http://dashif.org/reference/players/javascript/1.3.0/samples/dash-if-reference-player/) and [Akamai reference](http://mediapm.edgesuite.net/flash-client-dev-builds/nightly/dash/v1.0/dash-support-player/index.html) players to fail to play correctly.\r\n##### One must move the \"progress\" knob a second ahead to get it to play, *after which all is fine*.This issue only seems to occur on Chrome and Internet Exploder, and not the Firefox devkit.\r\n\r\nThis question [is likely related to this thread](http://sourceforge.net/p/gpac/discussion/287547/thread/b7337740/?limit=25). However, it is different enough to be it's own.\r\n\r\nMy guess here is the the runt initial audio segment is to preserve A/V sync when rate transcoding from variable input rate to a fixed frame rate of 30fps. It is unclear to me who is generating this initial audio segment: MP4Box or FFMPEG. It is also unclear to me if this is the fault of the ```FFMPEG```/```MP4Box``` toolchain, or the Media Extension toolkit on Chrome.\r\n\r\nHowever, this problem has been reproduced with a home-grown DASH player, leading one to believe that there may be an incompatibility with the FFMPEG/MP4Box suite and the Chrome and IE HTML 5 players.\r\n\r\n##### Thus:\r\n\r\n* If this an FFMPEG/MP4Box issue, does anyone know how to prevent the runt initial audio segment from being generated? Or is it a strict requirement?\r\n* If this is a bug in Chrome, is there any way to work around this, short of having one's homegrown player skipping 0.02 seconds into the stream (which is what is currently done)?\r\n\r\n#### Specifics: \r\n* HTML5/Media Extensions-based Player on Chrome\r\n\r\n* Reference DASH Players:\r\n```\r\n  http://mediapm.edgesuite.net/flash-client-dev-builds/nightly/dash/v1.0/dash-support-player/index.html\r\n  http://dashif.org/reference/players/javascript/1.3.0/samples/dash-if-reference-player/\r\n```\r\n\r\n* Files transcoded with:\r\n(Only one resolution shown here: other resolutions use different video bitrates)\r\n```\r\n  ffmpeg -i <file> \r\n         -vf <scale stuff>\r\n         -r 30  (fixed frame rate of 30FPS. Incoming framerate MAY be variable, and is likely NOT 30fps)\r\n         -c:v libx264 -b:v 3000k -profile:v high -pix_fmt yuv420p \r\n         -c:a aac -b:a  192k (perhaps using FFMPEG's aac encoder is a bad idea?)\r\n         -movflags +faststart \r\n         -fflags +genpts  (unsure if this is necessary, doesn't seem like a bad idea)\r\n         -x264opts keyint=150:min-keyint=150:scenecut=-1  (ensure a fixed 5 second GOP size)\r\n         <outfile.mp4>\r\n```\r\n\r\n* Files boxed with the following command. Note that I am I only generating a single audio stream:\r\n```\r\nMP4Box -out dash.mpd \r\n       -dash 5000\r\n       -frag 1000 -frag-rap\r\n       -rap\r\n       -bs-switching no\r\n       -dash-profile dashavc264:onDemand\r\n           1080.mp4#video:id=VIDEO-1080 \r\n           720.mp4#video:id=VIDEO-720\r\n           480.mp4#video:id=VIDEO-480\r\n           360.mp4#video:id=VIDEO-360\r\n           720.mp4#audio:id=AUDIO-192k\r\n```\r\n\r\n* Things that *didn't* work:\r\n  * turning genpts on or off \r\n  * turning frag and frag-rap on or off\r\n  * turning movflags on or off\r\n  * switching between ```dashavc264:onDemand``` and \"plain old\" ```onDemand``` profiles\r\n\r\n* A/V DASHd asset that DOES experience the problem:\r\n\r\n```\r\nhttp://pm1playscdntv-a.akamaihd.net/video/AKKxcjxr0AE/processed/dash.mpd\r\n```\r\n* Silent jellyfish video that does not experience the initial lockup:\r\n\r\n ```\r\nhttp://pm1playscdntv-a.akamaihd.net/video/AKKyfg0XkAE/processed/dash.mpd\r\n```\r\n\r\n#### Javascript console output [from the DASHIF reference player](http://dashif.org/reference/players/javascript/1.3.0/samples/dash-if-reference-player/) run on Chrome. \r\nOutput from the \"non-functional\" A/V asset run. Please see the \"LOOK HERE\" sections:\r\n```\r\nDebug.js:76 Parsing complete: ( xml2json: 3ms, objectiron: 1ms, total: 0.004s)\r\nDebug.js:76 Manifest has loaded.\r\nDebug.js:76 Manifest has been refreshed.\r\nhttp://sourceforge.net/p/gpac/discussion/287547/thread/b7337740/?limit=25\r\nDebug.js:76 MediaSource is open!\r\nDebug.js:76 [object Event]\r\nDebug.js:76 Added 0 inline events\r\nDebug.js:76 video codec: video/mp4;codecs=\"avc1.64001e\"\r\nDebug.js:76 ScheduleController video stop.\r\nDebug.js:76 Perform SIDX load: http://pm1playscdntv-a.akamaihd.net/video/AKKxcjxr0AE/processed/360_track1_dashinit.mp4\r\nDebug.js:76 Perform SIDX load: http://pm1playscdntv-a.akamaihd.net/video/AKKxcjxr0AE/processed/480_track1_dashinit.mp4\r\nDebug.js:76 Perform SIDX load: http://pm1playscdntv-a.akamaihd.net/video/AKKxcjxr0AE/processed/720_track1_dashinit.mp4\r\nDebug.js:76 audio codec: audio/mp4;codecs=\"mp4a.40.2\"\r\nDebug.js:76 ScheduleController audio stop.\r\nDebug.js:76 Perform SIDX load: http://pm1playscdntv-a.akamaihd.net/video/AKKxcjxr0AE/processed/720_track2_dashinit.mp4\r\nDebug.js:76 No text data.\r\nDebug.js:76 Duration successfully set to: 123.971\r\nDebug.js:76 Parsed SIDX box: 25 segments.\r\nDebug.js:76 ScheduleController video start.\r\nDebug.js:76 Parsed SIDX box: 25 segments.\r\nDebug.js:76 ScheduleController audio start.\r\n```\r\n**vvvvvvvvvvvvvvvvvvvvv LOOK HERE vvvvvvvvvvvvvvvvvv**\r\n```\r\nDebug.js:76 loaded video:Initialization Segment:NaN (206, 0ms, 21ms)\r\n```\r\n**^^^^^^^^^^^^^^^^^^^^^ LOOK HERE ^^^^^^^^^^^^^^^^^^**\r\n```\r\nDebug.js:76 Initialization finished loading: video\r\nDebug.js:76 Stalling video Buffer: video\r\nDebug.js:76 Waiting for more video buffer before starting playback.\r\nDebug.js:76 Stalling audio Buffer: audio\r\nDebug.js:76 Waiting for more audio buffer before starting playback.\r\n```\r\n**vvvvvvvvvvvvvvvvvvvvv LOOK HERE vvvvvvvvvvvvvvvvvv**\r\n```\r\nDebug.js:76 loaded audio:Initialization Segment:NaN (206, 0ms, 475ms)\r\n```\r\n**^^^^^^^^^^^^^^^^^^^^^ LOOK HERE ^^^^^^^^^^^^^^^^^^**\r\n```\r\nDebug.js:76 Initialization finished loading: audio\r\nDebug.js:76 Got loadmetadata event.\r\nDebug.js:76 Starting playback at offset: 0\r\nDebug.js:76 element loaded!\r\nDebug.js:76 Start Event Controller\r\nDebug.js:76 ScheduleController video start.\r\nDebug.js:76 Getting the request for time: 0\r\nDebug.js:76 Index for time 0 is 0\r\nDebug.js:76 SegmentBase: 0 / 123.971\r\nDebug.js:76 ScheduleController audio start.\r\nDebug.js:76 Getting the request for time: 0\r\nDebug.js:76 Index for time 0 is 0\r\nDebug.js:76 SegmentBase: 0 / 123.971\r\nDebug.js:76 loaded video:Media Segment:0 (206, 20ms, 63ms)\r\nDebug.js:76 Getting the request for time: 5\r\nDebug.js:76 Index for time 5 is 0\r\nDebug.js:76 SegmentBase: 0 / 123.971\r\nDebug.js:76 SegmentBase: 5 / 123.971\r\nDebug.js:76 Got enough video buffer to start.\r\nDebug.js:76 Buffered video Range: 0 - 4.999999\r\nDebug.js:76 Getting the request for time: 0\r\nDebug.js:76 Index for time 0 is 0\r\nDebug.js:76 SegmentBase: 0 / 123.971\r\nDebug.js:76 loaded audio:Media Segment:0 (206, 509ms, 44ms)\r\nDebug.js:76 Getting the request for time: 4.992289\r\nDebug.js:76 Index for time 4.992289 is 0\r\nDebug.js:76 SegmentBase: 0 / 123.971\r\nDebug.js:76 SegmentBase: 4.956009070294785 / 123.971\r\nDebug.js:76 Got enough audio buffer to start.\r\n```\r\n**vvvvvvvvvvvvvvvvvvvvv LOOK HERE vvvvvvvvvvvvvvvvvv**\r\n```\r\nDebug.js:76 loaded video:Initialization Segment:NaN (206, 0ms, 21ms)\r\nDebug.js:76 Buffered audio Range: 0 - 0.010158 <---- Here, what is this? 1 / 0.010158 = 94.44 :-)\r\nDebug.js:76 Buffered audio Range: 0.046439 - 4.992289\r\nDebug.js:76  InsufficientBufferRule requesting switch to index:  0 type:  video  Priority:  Strong\r\n```\r\n**^^^^^^^^^^^^^^^^^^^^^ LOOK HERE ^^^^^^^^^^^^^^^^^^**\r\n```\r\nDebug.js:76 Getting the request for time: 10\r\nDebug.js:76 Index for time 10 is 1\r\nDebug.js:76 SegmentBase: 5 / 123.971\r\nDebug.js:76 SegmentBase: 10 / 123.971\r\nDebug.js:76 Getting the request for time: 9.94829931972789\r\nDebug.js:76 Index for time 9.94829931972789 is 1\r\nDebug.js:76 SegmentBase: 4.956009070294785 / 123.971\r\nDebug.js:76 SegmentBase: 9.94829931972789 / 123.971\r\nDebug.js:76 loaded video:Media Segment:5 (206, 46ms, 5ms)\r\nDebug.js:76 Getting the request for time: 15\r\nDebug.js:76 Index for time 15 is 2\r\nDebug.js:76 SegmentBase: 10 / 123.971\r\nDebug.js:76 SegmentBase: 15 / 123.971\r\nDebug.js:76 Getting the request for time: 20\r\nDebug.js:76 Index for time 20 is 3\r\nDebug.js:76 SegmentBase: 15 / 123.971\r\nDebug.js:76 SegmentBase: 20 / 123.971\r\nDebug.js:76 Buffered video Range: 0 - 9.999999\r\nDebug.js:76 loaded video:Media Segment:10 (206, 21ms, 27ms)\r\nDebug.js:76 loaded audio:Media Segment:4.956009070294785 (206, 692ms, 15ms)\r\nDebug.js:76 Getting the request for time: 14.940589569160998\r\nDebug.js:76 Index for time 14.940589569160998 is 2\r\nDebug.js:76 SegmentBase: 9.94829931972789 / 123.971\r\nDebug.js:76 SegmentBase: 14.940589569160998 / 123.971\r\nDebug.js:76 Buffered audio Range: 0 - 0.010158\r\nDebug.js:76 Buffered audio Range: 0.046439 - 9.984579\r\nDebug.js:76 Getting the request for time: 19.932879818594106\r\nDebug.js:76 Index for time 19.932879818594106 is 3\r\nDebug.js:76 SegmentBase: 14.940589569160998 / 123.971\r\nDebug.js:76 SegmentBase: 19.932879818594106 / 123.971\r\nDebug.js:76 Buffered video Range: 0 - 14.999999\r\nDebug.js:76 loaded video:Media Segment:15 (206, 19ms, 5ms)\r\nDebug.js:76 Getting the request for time: 24.925170068027214\r\nDebug.js:76 Index for time 24.925170068027214 is 4\r\nDebug.js:76 SegmentBase: 19.932879818594106 / 123.971\r\nDebug.js:76 SegmentBase: 24.92517006802721 / 123.971\r\nDebug.js:76  ThroughputRule requesting switch to index:  2 type:  video  Priority:  Default Average throughput 406307 kbps\r\nDebug.js:76 Getting the request for time: 22.6\r\nDebug.js:76 Index for time 22.6 is 4\r\nDebug.js:76 SegmentBase: 20 / 123.971\r\nDebug.js:76 Getting the request for time: 29.917460317460318\r\nDebug.js:76 Index for time 29.917460317460318 is 5\r\nDebug.js:76 SegmentBase: 24.92517006802721 / 123.971\r\nDebug.js:76 SegmentBase: 29.917460317460318 / 123.971\r\nDebug.js:76 loaded video:Initialization Segment:NaN (206, 0ms, 21ms)\r\nDebug.js:76 Initialization finished loading: video\r\nDebug.js:76 Buffered video Range: 0 - 14.999999\r\nDebug.js:76 loaded audio:Media Segment:14.940589569160998 (206, 598ms, 3ms)\r\nDebug.js:76 Getting the request for time: 34.90975056689342\r\nDebug.js:76 Index for time 34.90975056689342 is 6\r\nDebug.js:76 SegmentBase: 29.917460317460318 / 123.971\r\nDebug.js:76 SegmentBase: 34.90975056689342 / 123.971\r\nDebug.js:76 Buffered audio Range: 0 - 0.010158\r\nDebug.js:76 Buffered audio Range: 0.046439 - 9.984579\r\nDebug.js:76 Buffered audio Range: 14.97687 - 19.96916\r\nDebug.js:76 Getting the request for time: 39.902040816326526\r\nDebug.js:76 Index for time 39.902040816326526 is 7\r\nDebug.js:76 SegmentBase: 34.90975056689342 / 123.971\r\nDebug.js:76 SegmentBase: 39.90204081632653 / 123.971\r\nDebug.js:76 Getting the request for time: 44.89433106575964\r\nDebug.js:76 Index for time 44.89433106575964 is 8\r\nDebug.js:76 SegmentBase: 39.90204081632653 / 123.971\r\nDebug.js:76 SegmentBase: 44.89433106575964 / 123.971\r\nDebug.js:76 loaded audio:Media Segment:19.932879818594106 (206, 657ms, 43ms)\r\nDebug.js:76 Buffered audio Range: 0 - 0.010158\r\nDebug.js:76 Buffered audio Range: 0.046439 - 9.984579\r\nDebug.js:76 Buffered audio Range: 14.97687 - 24.96145\r\nDebug.js:76 loaded audio:Media Segment:9.94829931972789 (206, 1002ms, 44ms)\r\nDebug.js:76 Getting the request for time: 49.88662131519274\r\nDebug.js:76 Index for time 49.88662131519274 is 9\r\nDebug.js:76 SegmentBase: 44.89433106575964 / 123.971\r\nDebug.js:76 SegmentBase: 49.88662131519274 / 123.971\r\nDebug.js:76 Buffered audio Range: 0 - 0.010158\r\nDebug.js:76 Buffered audio Range: 0.046439 - 24.96145\r\nDebug.js:76 loaded video:Media Segment:20 (206, 21ms, 420ms)\r\nDebug.js:76  ThroughputRule requesting switch to index:  2 type:  video  Priority:  Default Average throughput 281173 kbps\r\nDebug.js:76 Getting the request for time: 15\r\nDebug.js:76 Index for time 15 is 2\r\nDebug.js:76 SegmentBase: 10 / 123.971\r\nDebug.js:76 Getting the request for time: 17.6\r\nDebug.js:76 Index for time 17.6 is 3\r\nDebug.js:76 SegmentBase: 15 / 123.971\r\nDebug.js:76 Buffered video Range: 0 - 14.999999\r\nDebug.js:76 Buffered video Range: 20 - 24.999999\r\nDebug.js:76 loaded video:Media Segment:15 (206, 21ms, 40ms)\r\nDebug.js:76 Getting the request for time: 25\r\nDebug.js:76 Index for time 25 is 4\r\nDebug.js:76 SegmentBase: 20 / 123.971\r\nDebug.js:76 SegmentBase: 25 / 123.971\r\nDebug.js:76 Buffered video Range: 0 - 24.999999\r\nDebug.js:76 Getting the request for time: 30\r\nDebug.js:76 Index for time 30 is 5\r\nDebug.js:76 SegmentBase: 25 / 123.971\r\nDebug.js:76 SegmentBase: 30 / 123.971\r\nDebug.js:76 Getting the request for time: 35\r\nDebug.js:76 Index for time 35 is 6\r\nDebug.js:76 SegmentBase: 30 / 123.971\r\nDebug.js:76 SegmentBase: 35 / 123.971\r\nDebug.js:76  ThroughputRule requesting switch to index:  2 type:  video  Priority:  Default Average throughput 330954 kbps\r\nDebug.js:76 Getting the request for time: 40\r\nDebug.js:76 Index for time 40 is 7\r\nDebug.js:76 SegmentBase: 35 / 123.971\r\nDebug.js:76 SegmentBase: 40 / 123.971\r\nDebug.js:76 Getting the request for time: 54.878911564625845\r\nDebug.js:76 Index for time 54.878911564625845 is 10\r\nDebug.js:76 SegmentBase: 49.88662131519274 / 123.971\r\nDebug.js:76 SegmentBase: 54.87891156462585 / 123.971\r\nDebug.js:76 loaded audio:Media Segment:24.92517006802721 (206, 649ms, 43ms)\r\nDebug.js:76 Getting the request for time: 45\r\nDebug.js:76 Index for time 45 is 8\r\nDebug.js:76 SegmentBase: 40 / 123.971\r\nDebug.js:76 SegmentBase: 45 / 123.971\r\nDebug.js:76 Getting the request for time: 59.871201814058956\r\nDebug.js:76 Index for time 59.871201814058956 is 11\r\nDebug.js:76 SegmentBase: 54.87891156462585 / 123.971\r\nDebug.js:76 SegmentBase: 59.871201814058956 / 123.971\r\nDebug.js:76 Buffered audio Range: 0 - 0.010158\r\nDebug.js:76 Buffered audio Range: 0.046439 - 29.95374\r\nDebug.js:76 Getting the request for time: 50\r\nDebug.js:76 Index for time 50 is 9\r\nDebug.js:76 SegmentBase: 45 / 123.971\r\nDebug.js:76 SegmentBase: 50 / 123.971\r\nDebug.js:76 loaded video:Media Segment:25 (206, 37ms, 201ms)\r\nDebug.js:76 Buffered video Range: 0 - 29.999999\r\nDebug.js:76 loaded video:Media Segment:30 (206, 138ms, 26ms)\r\nDebug.js:76 Buffered video Range: 0 - 34.999999\r\nDebug.js:76  ThroughputRule requesting switch to index:  2 type:  video  Priority:  Default Average throughput 186863 kbps\r\nDebug.js:76 loaded audio:Media Segment:29.917460317460318 (206, 625ms, 10ms)\r\nDebug.js:76 Getting the request for time: 64.86349206349206\r\nDebug.js:76 Index for time 64.86349206349206 is 12\r\nDebug.js:76 SegmentBase: 59.871201814058956 / 123.971\r\nDebug.js:76 SegmentBase: 64.86349206349206 / 123.971\r\nDebug.js:76 Buffered audio Range: 0 - 0.010158\r\nDebug.js:76 Buffered audio Range: 0.046439 - 34.94603\r\nDebug.js:76 loaded video:Media Segment:35 (206, 65ms, 104ms)\r\nDebug.js:76 Buffered video Range: 0 - 39.999999\r\nDebug.js:76 loaded video:Media Segment:40 (206, 63ms, 116ms)\r\nDebug.js:76  ThroughputRule requesting switch to index:  2 type:  video  Priority:  Default Average throughput 219094 kbps\r\nDebug.js:76 loaded audio:Media Segment:34.90975056689342 (206, 668ms, 42ms)\r\nDebug.js:76 Buffered audio Range: 0 - 0.010158\r\nDebug.js:76 Buffered audio Range: 0.046439 - 39.938321\r\nDebug.js:76 Buffered video Range: 0 - 44.999999\r\nDebug.js:76 loaded video:Media Segment:45 (206, 51ms, 100ms)\r\nDebug.js:76 loaded audio:Media Segment:39.90204081632653 (206, 1088ms, 39ms)\r\nDebug.js:76 Buffered audio Range: 0 - 0.010158\r\nDebug.js:76 Buffered audio Range: 0.046439 - 44.930611\r\nDebug.js:76 Buffered video Range: 0 - 49.999999\r\nDebug.js:76 loaded video:Media Segment:50 (206, 51ms, 129ms)\r\nDebug.js:76 loaded audio:Media Segment:44.89433106575964 (206, 1214ms, 53ms)\r\nDebug.js:76 Buffered audio Range: 0 - 0.010158\r\nDebug.js:76 Buffered audio Range: 0.046439 - 49.922901\r\nDebug.js:76  ThroughputRule requesting switch to index:  2 type:  video  Priority:  Default Average throughput 179326 kbps\r\nDebug.js:76  BufferOccupancyRule requesting switch to index:  2 type:  video  Priority:  Strong\r\nDebug.js:76 Buffered video Range: 0 - 54.999999\r\nDebug.js:76 loaded audio:Media Segment:49.88662131519274 (206, 1136ms, 42ms)\r\nDebug.js:76 Buffered audio Range: 0 - 0.010158\r\nDebug.js:76 Buffered audio Range: 0.046439 - 54.915191\r\nDebug.js:76 loaded audio:Media Segment:59.871201814058956 (206, 984ms, 38ms)\r\nDebug.js:76 Buffered audio Range: 0 - 0.010158\r\nDebug.js:76 Buffered audio Range: 0.046439 - 54.915191\r\nDebug.js:76 Buffered audio Range: 59.907482 - 64.899772\r\nDebug.js:76 loaded audio:Media Segment:54.87891156462585 (206, 1162ms, 54ms)\r\nDebug.js:76 Buffered audio Range: 0 - 0.010158\r\nDebug.js:76 Buffered audio Range: 0.046439 - 64.899772\r\nDebug.js:76  ThroughputRule requesting switch to index:  2 type:  video  Priority:  Default Average throughput 179326 kbps\r\nDebug.js:76  BufferOccupancyRule requesting switch to index:  2 type:  video  Priority:  Strong\r\nDebug.js:76 loaded audio:Media Segment:64.86349206349206 (206, 2126ms, 52ms)\r\nDebug.js:76  ThroughputRule requesting switch to index:  2 type:  video  Priority:  Default Average throughput 179326 kbps\r\nDebug.js:76  BufferOccupancyRule requesting switch to index:  2 type:  video  Priority:  Strong\r\n```\r\n**####### Log stays here indefinitely, until the progress knob is \"goosed\"**\r\n**#### After this point, I'm pretty sure things are fine**\r\n```\r\nScheduleController video seek: 1.392337\r\nDebug.js:76 ScheduleController audio seek: 1.392337\r\nDebug.js:76 ScheduleController video seek: 1.634483\r\nDebug.js:76 ScheduleController audio seek: 1.634483\r\nDebug.js:76  ThroughputRule requesting switch to index:  2 type:  video  Priority:  Default Average throughput 53681 kbps\r\nDebug.js:76 ScheduleController video start.\r\nDebug.js:76 ScheduleController audio start.\r\nDebug.js:76  ThroughputRule requesting switch to index:  2 type:  video  Priority:  Default Average throughput 53681 kbps\r\n...etc...\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/gpac/gpac/issues/comments/124031257","html_url":"https://github.com/gpac/gpac/issues/190#issuecomment-124031257","issue_url":"https://api.github.com/repos/gpac/gpac/issues/190","id":124031257,"user":{"login":"cconcolato","id":1830314,"avatar_url":"https://avatars.githubusercontent.com/u/1830314?v=3","gravatar_id":"","url":"https://api.github.com/users/cconcolato","html_url":"https://github.com/cconcolato","followers_url":"https://api.github.com/users/cconcolato/followers","following_url":"https://api.github.com/users/cconcolato/following{/other_user}","gists_url":"https://api.github.com/users/cconcolato/gists{/gist_id}","starred_url":"https://api.github.com/users/cconcolato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cconcolato/subscriptions","organizations_url":"https://api.github.com/users/cconcolato/orgs","repos_url":"https://api.github.com/users/cconcolato/repos","events_url":"https://api.github.com/users/cconcolato/events{/privacy}","received_events_url":"https://api.github.com/users/cconcolato/received_events","type":"User","site_admin":false},"created_at":"2015-07-23T09:22:07Z","updated_at":"2015-07-23T09:22:07Z","body":"Looking at 720.mp4, this file has several characteristics:\r\n- the video stream uses B-frames and therefore CTS != DTS for some frames. The values for the first frames (as reported by ```MP4Box -dts 720.mp4```, sample means frame) is:\r\n```\r\nSample 1\tDTS 0\tCTS 1024\t\r\nSample 2\tDTS 512\tCTS 1536\t\r\nSample 3\tDTS 1024\tCTS 2048\r\n...\r\n```\r\nThese times are expressed in the track timescale which is 15360.\r\n\r\n- the video stream uses an edit list, ```MP4Box -diso 720.mp4``` shows:\r\n```\r\n<EditListEntry Duration=\"123967\" MediaRate=\"1\" MediaTime=\"1024\"/>\r\n```\r\nThis indicates that the presentation of the video track should start with the first video frame because MediaTime=CTS(sample1) (no blank before).\r\n\r\n- the audio stream also has an edit list (timescale 44100).\r\n```\r\n<EditListEntry Duration=\"123971\" MediaRate=\"1\" MediaTime=\"1600\"/>\r\n```\r\nand if you look at the DTS values for audio (CTS=DTS) you have:\r\n```\r\nSample 1\tDTS 0\tCTS 0\t\r\nSample 2\tDTS 1024\tCTS 1024\t\r\nSample 3\tDTS 2048\tCTS 2048\t\r\n```\r\nThe edit list means that the presentation of the audio stream should start in the middle of the second audio frame because 1024<1600<2048.\r\n\r\nSo this file looks perfectly correct to me. It's a bit unusual for a file to have two edit lists, one per track, and this file could have been built differently. For instance, sample 1 in the audio stream could be removed. Also, the track duration and the presentation duration for the audio track are different: 5468736/44100=124.007 != 123971/1000, so players have to be careful when reporting the media duration. Chrome here reports the wrong duration (124.008s), it should be fixed @wolenetz.\r\n\r\nAnyway, the file plays fine in MP4Client, ffplay, vlc and Chrome (no MSE), with lip sync.\r\n\r\nNow if you look at the DASH'd file, ```MP4Box -diso 720_track2_dashinit.mp4```, the edit list is still there (but with a duration of 0 as the init segment contains no data) and the first movie fragment has a tfdt of 0 with 215 samples:\r\n```<TrackFragmentBaseMediaDecodeTimeBox baseMediaDecodeTime=\"0\">```\r\nSame for the video stream, only the edit list entry duration is changed to 0.\r\n\r\nSo, for the record, I believe there is no issue from a GPAC point of view, as no \"Tiny Initial Audio Segment\" is generated in DASHing. I'm closing this issue.  \r\n\r\n\r\n"}}