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

Possible solution to lagging issue on Amazon Fire Stick Gen 2 #13

Open
ACodingGenie opened this issue Aug 13, 2020 · 29 comments
Open

Possible solution to lagging issue on Amazon Fire Stick Gen 2 #13

ACodingGenie opened this issue Aug 13, 2020 · 29 comments
Assignees
Labels
Device bug Specific device bug

Comments

@ACodingGenie
Copy link

ACodingGenie commented Aug 13, 2020

I have just recently discovered your app and have used it on the Amazon Fire Stick Gen 2. Its an amazing, feature packed app but the only issue is the video lags a decent amount on 1080p 60FPS. The audio is fine and there are no frame drops from what I can tell, my network is also not the issue I believe but the video has a slight lag to it which makes it harder to watch. I have tried changing the bit rates to something lower and it doesn't help much. They continue to lag, this does not happen with another app I used called Twire on the firestick but it also doesn't support the abundance of features that this app does and its not built for smart tv's in general. I wasn't sure where to post this because I don't know if this is a bug or just something on my side. Any suggestions or fixes?

@auto-comment
Copy link

auto-comment bot commented Aug 13, 2020

Thank you for raising a issue.

Make sure you follow the issue templates for yours type of issue see bellow.

Bug report:
https://github.com/fgl27/SmartTwitchTV/blob/master/.github/ISSUE_TEMPLATE/bug_report.md

Etc issue that doesn't applies to features or bugs:
https://github.com/fgl27/SmartTwitchTV/blob/master/.github/ISSUE_TEMPLATE/etc-related.md

Feature request new app feature:
https://github.com/fgl27/SmartTwitchTV/blob/master/.github/ISSUE_TEMPLATE/etc-related.md

Feature request related to a problem:
https://github.com/fgl27/SmartTwitchTV/blob/master/.github/ISSUE_TEMPLATE/feature-request-related-to-a-problem.md

Issue that don't properly follow the templates can be close without any treatment.

I have sent an email to @fgl27 he will get back to you as soon as possible.

@fgl27
Copy link
Owner

fgl27 commented Aug 13, 2020

No suggestions... I have no data on how this app works on that device, if you can provide more into maybe we can solve it.

Does this app can be installed on firestick store? Or wherever is the name of the default app to install apps is called. How you installed it?

Does twitch app that doesn't lag is playing the same stream at the same resolution?
Have you forced 1080p preventing the Auto option from be used on the no lag app to be sure?

The app has in app skipped frame counter top right corner of the player information panel...
That doesn't show a accumulation of skipped frames? And you only knows there is skipped frames visually?

Provide those answers please thanks.

@fgl27 fgl27 self-assigned this Aug 13, 2020
@fgl27 fgl27 added Device bug Specific device bug Needs more info Not enough information provided yet labels Aug 13, 2020
@ACodingGenie
Copy link
Author

Thank you a fast response.
I did not install this app from the firestick store, I don't think Amazon allows that since they own Twitch. But anyways, I downloaded Aurora Store (Open source Google Play) through F-Droid and found "Smart Twitch TV" app on there. I have also downloaded "Twire" from F-Droid directly and there code is available on GitHub at "twireapp" if you're interested.
Twire is able to play all streams at 1080p 60FPS which I also have forced on without any lags. SmartTTV doesn't indicate any frame drops (shows 0 (0 today)) but the stream just lags when playing them, both on 1080p and 720 60FPS respectively.

@fgl27
Copy link
Owner

fgl27 commented Aug 14, 2020

OK
What is the android version?

The lag happens if chat isn't visible?

@ACodingGenie
Copy link
Author

ACodingGenie commented Aug 14, 2020

20-08-14 11-49-56 0024
So it doesn't show the Android version unfortunately but it only shows the FireOS version maybe because Amazon uses custom Android for the firestick. The image shows the two attributes. Oh yeah and the lag is visible regardless if chat is visible or not.

@fgl27
Copy link
Owner

fgl27 commented Aug 14, 2020

OK I need that info.

Close the app if is open even if is open but just on the background (hold key return with the app open must close it) and reopen so it can update then screenshot/take a picture of the about of the app.

I update that to included OS version "Sdk".

@ACodingGenie
Copy link
Author

Here you go. Apologies for the bad quality.
20-08-15 12-50-39 0025

@fgl27
Copy link
Owner

fgl27 commented Aug 15, 2020

Don't worry is all good.

SDK 22 is android 5.1 Lollipop...

On android 7 and lower the app will enable the PP old OS workaround in the settings by defaults

Screenshot from 2020-08-15 14-08-37

There is a know bug that the skipped frames counter will not work when that is enable...

So for testing disable that and see if there is a improve maybe that device need it to be disable... technically skipped frames counter will work after.

Also do to how that is need to proper show multiple videos, you may need to disable the preview over the player and not use picture in picture mode or any mode that has more then one player showing.

Anyway let me know the result.

@fgl27
Copy link
Owner

fgl27 commented Aug 15, 2020

Also for testing...

Let me see this screen ... Settings -> blocked codecs

Screenshot from 2020-08-15 14-07-31

I just need the content of it...

After if there is more then one codec, try to block all but one codec, and test it individual codec and let me know the result with is better.

@ACodingGenie
Copy link
Author

20-08-15 13-18-29 0026
So the lag issue seems to have disappeared with the "Picture in Picture Workaround" turned off. However, it seems like this causes multi-streams to flicker like crazy. Flicking isn't as apparent when you have just two streams open but gets much worse if you have three or four streams. Whats weird is, the streams are playing fine (not lagging or anything) but there's a "layer" over them that flickers like crazy and blends into other streams that makes it unwatchable. As for the codecs I only have OMX.MTK.Video" one enabled. I tried enabling the other one before but it's not available on the firestick. As for the video, it skips frames sometimes (25 (245 today)) maybe because I was switching streams constantly and it had to load or something. It DOES NOT seem laggy however. I wouldn't be able to tell if I was watching on SmartTTV app or Twire, they feel the same now. I have also disabled preview mode for the little stream selection thing that pops up at the bottom when you're watching a stream. Thank you!

@fgl27
Copy link
Owner

fgl27 commented Aug 15, 2020

OK that is good at least some improves.

Most devices only have 2 codec, that screenshot I share the third codec is not real is just for testing, I add that on the test page as some device do have 3 codecs I wanna make sure the screen can show 3 or more codecs...

That behavior is very odd but old OS (Lollipop is from 2015) have odd behavior, I only tested the app on android 6 or newer and it works as expected even on 2014/2015 devices.

On some low end devices is normal to have some skipped frames at the start of a playback or right after a buffer, as the player uses that as a form to sync audio and video it will drop some frames until is all in sync, if you don't have a constant accumulation of skipped frames just on those moments that is normal.

I think I have enough info (if not I ask something else later), I will compile all the information and share this with google as this app use they player project https://github.com/google/ExoPlayer and the player is misbehaving, I think some of they developer may have access to a fire stick with can make easier for they to test.

I will also check that Twire app that you inform I didn't had time yet.

I will probably only do all that next weekend, I busy this weekend and start of next week, I'll update this when I have more.

If you find something else wort report let me know.

@ACodingGenie
Copy link
Author

Sounds good! Thank you!

@fgl27 fgl27 removed the Needs more info Not enough information provided yet label Aug 16, 2020
@fgl27
Copy link
Owner

fgl27 commented Sep 25, 2020

Only this week I had some time to work on somethings that are necessary to solve this problem I'm working on this branch https://github.com/fgl27/SmartTwitchTV/commits/playerUP making changes and improves

Once I finished that there may be some improves on the problem you reported before, also as I'm updating the player somethings will be needed to re-test just to be sure we have the proper info so we can address all player issue that remain with ExoPlayer team...

I'm also working on some other not related to this issue issues, that needed to be addressed with ExoPlayer team, so when I finish this update we start resolve it all.

I share a app to test in a few days.

@fgl27
Copy link
Owner

fgl27 commented Sep 27, 2020

The app I'm working on didn't had any improve on the issue you reported, so is not needed any test.

My first try in to improve this problem is this issue google/ExoPlayer#7999

If from that we don't have a improve, I will open another more specific to deal with the problems when the "PP old OS workaround" is enabled, and yours device lag.

@ACodingGenie
Copy link
Author

Gotcha thanks for updating me on the multi-steam issue!

@fgl27
Copy link
Owner

fgl27 commented Oct 1, 2020

I have a made a app with the changes recommended by Exoplayer team

https://drive.google.com/file/d/1DEQtiFWgyxiyXH5C8u_akfr7Nk7J9vCn/view?usp=sharing

That os a debug app of next app version, is a separated app in relation to the released one, this has a yellow icons.

On that is not needed to enable "PP old OS workaround" in the settings to have it all working, I tested on Android 7 and bellow on Android emulator.

Test that on the device and let me know the result.

@ACodingGenie
Copy link
Author

ACodingGenie commented Oct 3, 2020

I downloaded the app from the link you provided. The issue is still present as you said I disabled the "Picture in Picture Old OS Workaround" and this video shows the flickering is still there:
Multi-Stream Flickering.zip

@fgl27
Copy link
Owner

fgl27 commented Oct 3, 2020

Do all stream flicker?

Seems that the top left isn't

@ACodingGenie
Copy link
Author

You're correct in that. The top left video doesn't seem to be flickering. But when I have only three videos running, the bottom left one will "mash" on top of the top left one, kind of like glitching, which makes it seem like its flickering but its not. The other ones except for top left flicker like crazy no matter if I have three or four streams running. Also, when I press the down key on my remote to enter the big stream and chat on top with the other three at the bottom, it sometimes gives me a black screen for the main video when I try to cycle between the three streams. I hope I'm explaining this clearly, its kind of difficult to put this in words. Thanks.

@fgl27
Copy link
Owner

fgl27 commented Oct 4, 2020

Yes I understand all of that, is just a very odd behavior, unfortunately is not possible to replicate on another device...

I'm changing somethings on the next version of the app I'll probably finish it in a few days, will probably not help any of those issue, but then we use that as base to try again to address the device specific issue with Exoplayer team.

@fgl27
Copy link
Owner

fgl27 commented Oct 4, 2020

Trye this https://drive.google.com/file/d/1aF7FbMqsOjiQRwOLJE6BNEvAwdRSz4R0/view?usp=sharing

Let me know the result, also test Picture Picture mode, in this case:

Open PP mode after press down to change with is the PP video, and repeat the process a few times, here other then the visual glitch, I need to know if the PP the small player is always visible on top after the changes.

@ACodingGenie
Copy link
Author

Hey, I realize you asked us not to post anything unless it was to ask something or for clarification etc., and I'm sorry, but I wanted to let you know that I'll be busy this week and won't have time to test this until the weekend. So bear with me please and thank you for your continued support in this issue.

@fgl27
Copy link
Owner

fgl27 commented Oct 6, 2020

I already made a new release as you didn't tested the apk I made before I remove it, as the release doesn't have the changes needed to be tested I made the bellow.

https://drive.google.com/file/d/1wxouzg0RVFA3PTvIBEX2PGrb5QpYXSHm/view?usp=sharing

test as I ask before

Let me know the result, also test Picture Picture mode, in this case:

Open PP mode after press down to change with is the PP video, and repeat the process a few times, here other then the visual glitch, I need to know if the PP the small player is always visible on top after the changes.

Also test with and without the PP old OS workaround, I wanna to see if the lag when that is enabled is gone

@ACodingGenie
Copy link
Author

ACodingGenie commented Oct 6, 2020

@fgl27
Copy link
Owner

fgl27 commented Oct 6, 2020

What is in that file?

can't download.

Screenshot from 2020-10-06 19-04-19

@ACodingGenie
Copy link
Author

The files have videos that I took of different "tests" that I did but unfortunately I can't upload them properly because someone clicks the link before you do, downloads and the files get deleted. I don't use online storage services either. What is your email, I can send them to you that way if you don't mind? They are too large for GitHub or even File.io after zipping?

@fgl27
Copy link
Owner

fgl27 commented Oct 7, 2020

My email is on my github profile

https://github.com/fgl27

fglfgl27@gmail.com

You can upload a video to youtube keep private and share the link via email if private is something needed, or just share the link here if isn't private...

as long you have a google account is as simple as drag and drop click next next to upload a video to youtube

@fgl27
Copy link
Owner

fgl27 commented Oct 15, 2020

I saw all the videos, unfortunately NOK result, the issues are still present.

Other then using the recommendations from Exoplayer team I did the changes from Amazon repo more related the bellow

fgl27/ExoPlayer@5cae236#diff-560421c04028f7ac67cf5b8aedd4a2f0e565dd77eff713bcd7f0dbbab8e4e242

fgl27/ExoPlayer@52bd718#diff-560421c04028f7ac67cf5b8aedd4a2f0e565dd77eff713bcd7f0dbbab8e4e242

From all changes that Amazon did those are the only related to anything from the issue you have, but they don't seem to have any effect on this device.

I was checking the process Submitting Your Fire TV App to the Appstore, without applying to that process probably ins't possible to have any support from they, also the device is old so they may not help at all just because of that.

I will not apply to that process as I can't do any of the necessary test, also this be a Twitch app it may not be see as a OK app for they platform, even though this app be OK as it has the proper authorization from Amazon to be on play store I don't think is a good idea to try they store even if I could test the app on they platform, as the process of evaluated if this app can be there is probably different in relation to the play store.

So I will in a few days open a new issue with Exoplayer try to communicate and get some information regarding the dropped frames when using the workaround, as that is something that I didn't direct ask them to revise.

Thank you for all the testing.

@ACodingGenie
Copy link
Author

Hey man just wanted to say that if this issue requires you to jump through a lot of hoops or you're really busy then its COMPLETELY FINE if you closed this issue. You shouldn't have to worry about fixing something on a crappy fire stick because Amazon couldn't design something better. I will be fine not using the multi-steam option on my TV, so you can close this if you'd like. Thanks for all your help!

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

No branches or pull requests

2 participants