(19:24) < BtbN> jani, fritsch: basicaly, hls is just like a dvb broadcast. Except that the stream is received by downloading a lot of single ts files, and appending them. (19:24) < BtbN> So audio sync works just like in any other format, via pts values associated with the frames and samples. (19:24) < BtbN> audio and video is interleaved in the same ts stream (19:25) < BtbN> So if it's out of sync, the one who made it messed up. (19:25) < fritsch> i thinkg that our "reduced" analysis time of ts might screw that up (19:25) < fritsch> as it seems to work on other players (19:25) < fritsch> or, if worse: dvdplayer is computing wrong pts values (19:25) < fritsch> buy guessing arround (19:26) < BtbN> yes, if the analyze duration is shorter than the time it takes for the first audio or video packet to arrive, that can also cause that. (19:26) < BtbN> But i think that's unlikely for hls, where a quite long chunk is available imediately. (19:27) < BtbN> The sender messing up the stream is much more likely imo (19:42) < BtbN> fritsch, is kodi using the hls demuxer from ffmpeg, or does it handle it itself and play it as ts stream? (19:43) < fritsch> BtbN: honestly I don't know exactly, but from a short grep - i think ffmpeg is used (19:44) < BtbN> yes, ffmpeg is definitely used. But in what way? (19:44) < BtbN> Cause it starts playing too early (19:47) < fritsch> BtbN: no idea, sorry - from what I see it is special cased in PlayListM3U to directly open the substream (19:47) < fritsch> BtbN: but, really no idea (19:48) < fritsch> if it goes directly to dvdplayer after that - the analyze time - that I said before - might be the issue (19:50) < BtbN> fritsch, the HLS spec requires a pre-buffer time of at least 3 segments. According to that log, it starts playing after the first one. (19:51) < BtbN> Which is "nice", as it reduces the delay, but it makes the stream unstable and can cause issues when metadata is missed (19:52) < fritsch> BtbN: then this might be the issue and it needs special handling - if you can add this information to the bugtracker, very welcome (21:48) < jani> btbn: im starting to think same (that its content issue) but then why it stream still works with vlc and web players. (21:51) < jani> also, if it makes sense to mention this: the lower the the video's bitrate is, the bigger the audio sync difference gets. (21:51) < jani> BtbN & fritsch ^ (21:52) < fritsch> if you play the ts directly? (21:52) < jani> i havent tried .. let me try that out. (21:52) < fritsch> or use ffmpeg to append them - same issue? (might be a dump question) (21:53) < BtbN> Try playing the stream via ffplay (21:53) < fritsch> jep, that's also a good idea (21:54) < jani> yes, if i play the ts file directly from the local fs, same issue .. (21:56) < jani> takes a while to install ffmpeg .. (21:57) < fritsch> jani: what does ffplay do? (21:57) < fritsch> also wrong? (21:57) < fritsch> i think vlc correct some misbehaving pts (22:10) < jani> ok, w/ ffplay, yes - there's audio lag there .. (22:10) < fritsch> oki, then try a latest master build (22:10) < fritsch> which has ffmpeg 2.7.x (22:10) < fritsch> jani: and file the bug with the ffmpeg people, please (22:11) < jani> but i compiled with gcc so just to be 100% sure, i'll make a new build of ffplay with proper compiler :) (22:11) < fritsch> "proper compiler" (22:11) < fritsch> hahaha (22:11) < fritsch> and also update the trac bugreport with your upstream ffmpeg link (22:12) < jani> fritsch: well, brew version of gcc provides shitty optimization compared to xcode's llvm .. (22:15) < jani> some sdl stuff i wrote few weeks ago ran constant 25 fps with clang(llvm?) compilation but gcc build managed to get 9-11 fps on average.. (22:17) < fritsch> jani: not really gpu accelerated? (22:17) < jani> nah, software .. (22:19) < jani> yeap still same .. ffmpeg version is 2.3.2 (22:21) < fritsch> this is ultra old (22:21) < fritsch> :-) (22:21) < fritsch> try 2.7.1 (22:21) < fritsch> the ffmpeg people won't take the bugreport serious (22:22) < jani> so beta2 should have ffmpeg 2.7 * ? (22:23) < fritsch> alpha1 (22:23) < fritsch> v16 (22:23) < fritsch> rc2 has 2.6.3 (22:24) < jani> http://mirrors.kodi.tv/nightlies/osx/x86_64/master/ ? (22:27) < fritsch> yes (22:27) < fritsch> master (22:27) < fritsch> "the master" build (22:28) < jani> yeap. tried that one, same result, audio is still out of sync =( (22:28) < fritsch> good (22:28) < fritsch> then trac.ffmpeg.org (22:29) < fritsch> next station (22:30) < jani> and apparently i had account there too =) (22:31) < fritsch> oki, please link that on our trac site too, then (22:31) < jani> yep. (22:31) < jani> not my first time on the rodeo . (13:42) < negge> fritsch: with a little bit of luck jani's efforts will fix some of those annoying pirate stream issues ;-) 13:49) < fritsch> negge: yes - problem: also the .ts on disk has the sync issues (13:49) < negge> yeah that's strange (13:50) < fritsch> negge: even with ffplay (13:59) < jani> pirate streams?! no! i must forfeit all of my reportings! :)