Android TV Audio Passthrough pause issues with DD/DD+/DTS/DTS-HD
#46
DTS : normal glitches in opening scene, pause/play at 3:03, 5:10 and 5:39.. issues for arond 10 sec to recover audio but was out of sync.
log: https://transfer.sh/wk6ebA/kodi_20230306...03-DTS.log

DD+ : pause/play at 1:52 audio faded in out and out of sync for about a minute. Jump to chapt6 out of sync etc as before.
log: https://transfer.sh/lS2sS0/kodi_20230306...35-DD+.log

Thanks!
Reply
#47
Great - we are coming somewhere. Still fiddleing with the pause mangement, will need some more iterations as getting it perfect is not so easy ...
In IEC things are way easier as you can tunnel pause packages as normal packages. That way the sink is always right.

With RAW you need to sleep out things, but still fake full buffer :-(

First test: https://jenkins.kodi.tv/view/Android/job...bi-v7a.apk <- does it get better?
Sorry, wrong link: https://jenkins.kodi.tv/view/Android/job...bi-v7a.apk <- that's the right one.

Let's focus on DD+ for now first:
1) Open a file, check if it starts playing okayish, e.g. no stuttering -> sync okayish
2) After 30 seconds, please short seek forward -> still okay?
3) Now long seek or double / triple press seek and does it recover?
4) Post the log, please. I log everything that I need in INFO level.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#48
DD+ plays okayish, but out of sync
10 sec seek, slight stutter but recovers quick and still out of sync
1 min seek, no stutter and still out of sync

log: https://paste.kodi.tv/pehoriqoro.kodi
Reply
#49
It won't really get better here - as I have to develop "broken" to simulate the Sony: https://jenkins.kodi.tv/view/Android/job...bi-v7a.apk ... worse or better?
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#50
This was better, it's no longer out of sync!

However, the fading in/out started as soon as I skipped 10 secs, skipped for 1 min fadinng in/out still there but when I jumped to next chapter audio was fine again!! Until I skipped 10 secs and it was back to fading!

log: https://paste.kodi.tv/ecizuzocos.kodi
Reply
#51
I have the feeling that when things work for you they will be broken for my devices :-) ...
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#52
https://jenkins.kodi.tv/view/Android/job...bi-v7a.apk <- still not there yet. But at least, as long you don't skip, stuff should work okayish.

Nope - forget it. helped marginally, but far away from a perfect solution.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#53
Sorry: https://jenkins.kodi.tv/view/Android/job...bi-v7a.apk - i have too many threads on going. This is worth a test ... curious if something works. Start and playback should be nice - seek most likely not so much.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#54
DD+ plays well, didn't like the pause/play, went out of sync as you expected.

log: https://paste.kodi.tv/dobuxetafu.kodi
Reply
#55
Okay. The other formats are also fine if you don't seek?
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#56
Correct plays fine till seek then out of sync.

That issue for DTS is still there on that opening scene, but I guess that's for another time.

Thanks for persevering!
Reply
#57
Maybe to describe the issue that is happening:

On stream start AE kindly asks Android to fill up the Sink with "Pause Data". As we are doing RAW Passthrough - AE is not generating Pause Bursts for this (it's an IEC container attribute) but kindly Calls Audiotrack with AddPause(20 millis). This Pause I receive and do like I would do something with it - but as I cannot generate PauseBurst for a RAW sink it is "assumed" that Android does that by itself under the hood. I therefore remember the 20 ms I got. Then I get 20 ms again, I remember them on top, etc. At a point I have 232 ms of Data remembered and tell to AE 232 ms as a Delay. Now the next AddPause call comes and I see that I already have 232 ms and don't add the new ones up, but rather "sleep for 20 mills" and report back to AE 232 ms. AE now knows: perfect the Sink is full and already in blocking mode - We can start.

AE now starts to deliver real audio packages. I put those onto the real sink. But - Android does not move right away, it might move after yet another 300 ms of real audio packages were added to the sink. After having real 232 ms audio packages - the "real sink" is full and might start moving. Therefore I have to return the new delay, which should at this point in time not be 232 ms but 232 ms (real payload) + the time I have rememberd as Pause bursts internally MINUS the time that has passed since then. So in short - I smooth that out in away that when I get 20 ms real payload but only need 2 ms to add them I sleep out another 8 ms to reduce my internal pause stuff .... at the end AE is still happy enough and we run with just the payload ... all good.

For Seek:
AE seeks in the video. But now needs to "feed out" the audio data on the sink. It's clear why: 200 ms in the sink, means 200 ms of "old audio" that does not fit to the new picture on screen. So AddPause starts again, but this time it's meant to "block out" the payload on the sink, meaning: every Pause I sleep away I also need to remember additionally as without the "faked payload" might go down and AE thinks: they have an issue moving the old stuff out.

So why is seek so hard. One needs to "transparently" distinguish both use-cases ... without knowing if seek has happened or warmup or something in the middle. And now combine this with "bad firmwares" and you have the mess Tongue and know why it works for me and not for you or the other way round. This RAW API was a real bad idea. I think it's much better if AE would just seek and reopen the sink entirely ... though ... that will break those firmwares which have an issue syncing in general.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#58
Thamks for the transparancy, I was actually wondering what was happening but was gonna wait for you to finish first before I asked what the issue and eventual fix was.
Reply
#59
What works here? https://jenkins.kodi.tv/view/Android/job...bi-v7a.apk
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#60
DD+ : This defintely looks liek a winner, didn't notice any issues like before after pause/play, skip 10 secs, skip 1min or even jumping to next chapter. Audio recovers almost instantly.
log: https://paste.kodi.tv/epanudunow

DTS : Same issue still with that 1 scene but the main issue of pause/play and skip seems to be fixed as above!

DD : There does seem to be a slight issue with DD where the audio continues from where u have just skipped from for a second. Tested with 2 different files to confirm.
log : https://paste.kodi.tv/ibagapegup


Thanks!
Reply

Logout Mark Read Team Forum Stats Members Help
Android TV Audio Passthrough pause issues with DD/DD+/DTS/DTS-HD0