Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Delay in Playback on refresh rate change" not working on Shield TV #15912

Closed
1 of 7 tasks
xinseo opened this issue Apr 13, 2019 · 50 comments
Closed
1 of 7 tasks

"Delay in Playback on refresh rate change" not working on Shield TV #15912

xinseo opened this issue Apr 13, 2019 · 50 comments

Comments

@xinseo
Copy link

xinseo commented Apr 13, 2019

Bug report

Describe the bug

I have the latest Shield TV update along with the latest Kodi nightly installed.

Hooked the Shield to a Denon ATMOS receiver and from there to a Samsung 4K TV.

The problem:
There is a delay of about 4 seconds when refresh rate is changed and the setting "Delay in Playback on refresh rate change" does not work whether I set it to 1 second or 8. The same setting works fine on MrMC. On Kodi, audio starts after like 0.5 seconds when i click on play, however, the screen stays black; as it is switching refresh rates.

Passthrough is ON and Refresh rate switching is ON.

Other people are facing this issue as well:
https://forum.kodi.tv/showthread.php?tid=342877

Expected Behavior

Here is a clear and concise description of what was expected to happen:

Media playback should be paused for the duration that I set while refresh rate switching occurs (it takes up to 4-5 seconds on my setup)

Actual Behavior

Media playback starts instantly without honoring the DELAY that I set.

Possible Fix

Delay the playback for the amount that the user sets.

To Reproduce

Steps to reproduce the behavior:

  1. Set a "Delay in Playback on refresh rate change"
  2. Play any video

Debuglog

The debuglog can be found here:
http://paste.kodi.tv/ebomajikac

(updated 26-11-2019)

Your Environment

Used Operating system:

  • Android

  • iOS

  • Linux

  • OSX

  • Raspberry-Pi

  • Windows

  • Windows UWP

  • Operating system version/name: Kodi version: 18.2-RC1 Git:20190412-36bf9e04a3). Platform: Android ARM 64-bit

note: Once the issue is made we require you to update it with new information or Kodi versions should that be required.
Team Kodi will consider your problem report however, we will not make any promises the problem will be solved.

@xbmc-gh-bot xbmc-gh-bot bot added the Triage: Needed (managed by bot!) issue that was just created and needs someone looking at it label Apr 13, 2019
@DaVukovic DaVukovic added Component: Video Platform: Android v18 Leia and removed Triage: Needed (managed by bot!) issue that was just created and needs someone looking at it labels Apr 14, 2019
@xinseo
Copy link
Author

xinseo commented Apr 16, 2019

Latest Kodi update didn't fix the issue.

@xinseo
Copy link
Author

xinseo commented Apr 25, 2019

Issue still exists.

@fritsch
Copy link
Member

fritsch commented Apr 25, 2019

No one is working on this issue. You are informed if that changes.

@justinhow
Copy link

Still exists under 18.5. Dragging on and on....

@xinseo
Copy link
Author

xinseo commented Nov 20, 2019

Wish someone could just copy the code from MrMC :(

It's so annoying having to rewind every video because i get no video for the first 4-6 seconds.

@justinhow
Copy link

I guess none of the devs involved have a NVIDIA Shield TV ;-)

@peak3d
Copy link
Contributor

peak3d commented Nov 26, 2019

Can someone pls. attach a new kodi log file, or update the one from initial post? Thx!

Edit: and, if possible, do the same with a amazon fireTV stick. Interesting would be how it behaves (differnt / same) and a debug kodi log, too

@xinseo
Copy link
Author

xinseo commented Nov 26, 2019

Can someone pls. attach a new kodi log file, or update the one from initial post? Thx!

Edit: and, if possible, do the same with a amazon fireTV stick. Interesting would be how it behaves (differnt / same) and a debug kodi log, too

Original post updated.

I don't own a firetv.

@fritsch
Copy link
Member

fritsch commented Nov 26, 2019

We are currently fiddleing out things internally and have different approaches. Sadly I current don't get logfiles from Shield.

Could you backup your kodi files and produce a debuglog with: http://mirrors.kodi.tv/test-builds/android/arm64-v8a/kodi-20191126-d134baf1-androidtimer-arm64-v8a.apk

Try different delays: e.g. 5, 10, 15.
Thanks much in advance.

@xinseo
Copy link
Author

xinseo commented Nov 26, 2019

We are currently fiddleing out things internally and have different approaches. Sadly I current don't get logfiles from Shield.

Could you backup your kodi files and produce a debuglog with: http://mirrors.kodi.tv/test-builds/android/arm64-v8a/kodi-20191126-d134baf1-androidtimer-arm64-v8a.apk

Try different delays: e.g. 5, 10, 15.
Thanks much in advance.

Can confirm that the wait feature is working now. I tried the same file around 7-8 times with different wait times and all of them worked fine. However, one time, I did experience a Shield crash (system reboot) when I tried playing the same file with delay of 7 seconds. The file played fine after Shield rebooted. Everything should have been captured in the debug log:

https://paste.kodi.tv/inemowasor

Most of my addons etc weren't working though. Had to reset Kodi to default and then work up from there. And even then most addons just weren't working. (I'm sure you were already expecting this but just a heads up)

@fritsch
Copy link
Member

fritsch commented Nov 26, 2019

Jep - you just upgraded to a v19 Alpha version.

From the log I see that the code works like I intended it. Though - there is an additional bug on the shield that needs special care.

Thanks very much for testing.

@xinseo
Copy link
Author

xinseo commented Nov 26, 2019

Jep - you just upgraded to a v19 Alpha version.

From the log I see that the code works like I intended it. Though - there is an additional bug on the shield that needs special care.

Thanks very much for testing.

No problem. Happy to help. Should I move back to the older version or will you be sharing a new version to try out?

@fritsch
Copy link
Member

fritsch commented Nov 26, 2019

Basically I wanted to see what works and what not. I see that Mediacodec Decoder is created while we are waiting. This thingy under the hood accesses / creates a Surface, while display is not properly configured. This is a problem for the Shield in certain Netflix scenarios.

If you just want a "working version" - I can create you a preliminary version ontop of Leia, which - obviously won't make this code here merged.

Thanks again for your debuglog.

So - what do you want? (Language Barrier: I mean: I can provide you whatever you like best)

@xinseo
Copy link
Author

xinseo commented Nov 26, 2019

Basically I wanted to see what works and what not. I see that Mediacodec Decoder is created while we are waiting. This thingy under the hood accesses / creates a Surface, while display is not properly configured. This is a problem for the Shield in certain Netflix scenarios.

If you just want a "working version" - I can create you a preliminary version ontop of Leia, which - obviously won't make this code here merged.

Thanks again for your debuglog.

So - what do you want? (Language Barrier: I mean: I can provide you whatever you like best)

Not sure if I understand :)

If you can make a Leia version with this delay on playback code working, I would love to try it out!

@fritsch
Copy link
Member

fritsch commented Nov 26, 2019

Will post it here later. It has "fritschfiretv" in name - don't be confused, it won't do anything unwanted on your setup - it's just the device I currently have.

@fritsch
Copy link
Member

fritsch commented Nov 26, 2019

Mirror is refreshing. Give it 20 minutes.

@justinhow
Copy link

Good news that headway is being made on this big and thanks to all those involved - will this bugfix eventually roll into Kodi 18.6 - if there is going to be one?

@Hitcher
Copy link
Contributor

Hitcher commented Nov 28, 2019

will this bugfix eventually roll into Kodi 18.6

I believe that's the plan, yes.

@fritsch
Copy link
Member

fritsch commented Dec 1, 2019

Fix is in master. Please test it, if it works for you - backport is possible. Testing can be done by installing a recent nightly.

@xinseo
Copy link
Author

xinseo commented Dec 1, 2019

Fix is in master. Please test it, if it works for you - backport is possible. Testing can be done by installing a recent nightly.

Would that be on Leia?

@fritsch
Copy link
Member

fritsch commented Dec 1, 2019

No - but if it works (as said above) - backport possible

@fritsch
Copy link
Member

fritsch commented Dec 1, 2019

I will create you a Leia build. As the fix included in above builds is not the one that was merged - give me some minutes.

@fritsch
Copy link
Member

fritsch commented Dec 1, 2019

Result will end up here: http://mirrors.kodi.tv/test-builds/android/arm64-v8a/ and has "delay" in its name.

@xinseo
Copy link
Author

xinseo commented Dec 1, 2019

Result will end up here: http://mirrors.kodi.tv/test-builds/android/arm64-v8a/ and has "delay" in its name.

@xinseo xinseo closed this as completed Dec 1, 2019
@xinseo xinseo reopened this Dec 1, 2019
@xinseo
Copy link
Author

xinseo commented Dec 1, 2019

I will create you a Leia build. As the fix included in above builds is not the one that was merged - give me some minutes.

Has the issue that you mentioned a couple of posts above been fixed? Cause the older build that you linked (5days ago) crashes sometimes on opening a media file.

@fritsch
Copy link
Member

fritsch commented Dec 1, 2019

Reports with "crashes sometimes" and no debuglog is sadly worth absolutely nothing.

Please check this version which contains the official fix: http://mirrors.kodi.tv/test-builds/android/arm64-v8a/kodi-20191201-f1894772-delay-arm64-v8a.apk

If any further issue arrises, that does not happen with "normal" Leia, we cannot merge the backport and need you to verify with a master build.

@xinseo
Copy link
Author

xinseo commented Dec 1, 2019

Reports with "crashes sometimes" and no debuglog is sadly worth absolutely nothing.

Please check this version which contains the official fix: http://mirrors.kodi.tv/test-builds/android/arm64-v8a/kodi-20191201-f1894772-delay-arm64-v8a.apk

If any further issue arrises, that does not happen with "normal" Leia, we cannot merge the backport and need you to verify with a master build.

It seems to be working fine so far. If any issues arise, I'll post debug logs.

@fritsch
Copy link
Member

fritsch commented Dec 1, 2019

Without kidding, please start a video for 50 times and turn on debug logging before. If that works 50 out of 50 times we can accept this fix into backport - else not.

I don't have a shield, therefore I cannot test.

@xinseo
Copy link
Author

xinseo commented Dec 1, 2019

Without kidding, please start a video for 50 times and turn on debug logging before. If that works 50 out of 50 times we can accept this fix into backport - else not.

I don't have a shield, therefore I cannot test.

I'll report back within 24 hours :)

@xinseo
Copy link
Author

xinseo commented Dec 2, 2019

Without kidding, please start a video for 50 times and turn on debug logging before. If that works 50 out of 50 times we can accept this fix into backport - else not.

I don't have a shield, therefore I cannot test.

I was doing as you suggested. On my 7th out of 50th attempt at playing a file using the delay option, my Shield crashed.

Debug logs:
https://paste.kodi.tv/mopowiquti

@fritsch
Copy link
Member

fritsch commented Dec 2, 2019

Do you still have the kodi.log.old file? The log you uploaded has no switch in it.

@xinseo
Copy link
Author

xinseo commented Dec 2, 2019

Do you still have the kodi.log.old file? The log you uploaded has no switch in it.

I have emailed you a copy at fritsch@xbmc

@fritsch
Copy link
Member

fritsch commented Dec 2, 2019

I have seen it. Please reproduce without plex, so that we can distinguish between different error cases.

@xinseo
Copy link
Author

xinseo commented Dec 2, 2019

I have seen it. Please reproduce without plex, so that we can distinguish between different error cases.

Tried without PlexKodiConnect addon. Crashed during second attempt.
Logs:
Kodi.log
https://paste.kodi.tv/ipanijukiv.kodi

Kodi old.log
https://paste.kodi.tv/apaminezir.kodi

@peak3d
Copy link
Contributor

peak3d commented Dec 2, 2019

@xinseo what is "Shield crashed" exactly?

@xinseo
Copy link
Author

xinseo commented Dec 2, 2019

@xinseo what is "Shield crashed" exactly?

Shield gets stuck at "Loading" with the loading circle for ~10 seconds and then the shield device restarts.

@peak3d
Copy link
Contributor

peak3d commented Dec 2, 2019

then we'll need to look into logcat:

launche kodi, select to the stream you are testing
adb logcat -c (to clear logcat)
adb logcat > logcat.txt

Then try to crash kodi / shield and provide the logcat pls.

@xinseo
Copy link
Author

xinseo commented Dec 9, 2019

then we'll need to look into logcat:

launche kodi, select to the stream you are testing
adb logcat -c (to clear logcat)
adb logcat > logcat.txt

Then try to crash kodi / shield and provide the logcat pls.

I'll try and do this in a couple of days. Not sure how to adb into shield though lol

@Hitcher
Copy link
Contributor

Hitcher commented Dec 9, 2019

Not sure how to adb into shield though lol

I use adblink.

@xinseo
Copy link
Author

xinseo commented Jan 28, 2020

I have seen it. Please reproduce without plex, so that we can distinguish between different error cases.

After checking for more than a month (after a complete database reset), I've faced zero crashes.

Think we can accept this fix.

@justinhow
Copy link

So this fix never got into 18.6?

@peak3d
Copy link
Contributor

peak3d commented Mar 4, 2020

You mean backporting the one we did for matrix?

@DaveTBlake
Copy link
Member

If there is a PR releated to this issue can someone link it please

@justinhow
Copy link

I was not sure whether the fix that was done for xinseo (see above) ever made it into the main Kodi 18.x build stream and therefore into the 18.6 just released today.

@xinseo
Copy link
Author

xinseo commented Mar 4, 2020

Reports with "crashes sometimes" and no debuglog is sadly worth absolutely nothing.
Please check this version which contains the official fix: http://mirrors.kodi.tv/test-builds/android/arm64-v8a/kodi-20191201-f1894772-delay-arm64-v8a.apk
If any further issue arrises, that does not happen with "normal" Leia, we cannot merge the backport and need you to verify with a master build.

It seems to be working fine so far. If any issues arise, I'll post debug logs.

This fix works but I'm not sure if it made it into the main builds.

@xinseo
Copy link
Author

xinseo commented Mar 4, 2020

The changelog shows the fix was baked in:
18.5-Leia...18.6-Leia

@justinhow
Copy link

That is great news. Thanks to all those that made this happen.

@DaveTBlake
Copy link
Member

Assuming that #16978 and backport #16989 for 18.6 fixed this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants