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

v0.21.15 Old regression returned: slow playback on LineageOS #7599

Closed
4 tasks done
FrostKiwi opened this issue Dec 30, 2021 · 27 comments
Closed
4 tasks done

v0.21.15 Old regression returned: slow playback on LineageOS #7599

FrostKiwi opened this issue Dec 30, 2021 · 27 comments
Labels
bug Issue is related to a bug device/software specific Issues that only happen on some devices or with some specific hardware/software player Issues related to any player (main, popup and background)

Comments

@FrostKiwi
Copy link

FrostKiwi commented Dec 30, 2021

As previously with v0.21.2, updating to v0.21.15 regressed the playback performance to a 10fps slideshow on the OnePlus One with 1080p60 footage.
Previously reported and discussed indepth here with screen recordings and so on: #6207

Thus it is most likely in connection to ExoPlayer not properly detecting the hardware decoding features of the OnePlus One and thus falling back to a software decoded slideshow on 1080p60 footage.

I downgraded to v0.21.14 and the issue is gone.

Checklist

Device info

  • Android version/Custom ROM version: Android 11, LineageOS 18.1
  • Device model: OnePlus One (A0001)
@FrostKiwi FrostKiwi added the bug Issue is related to a bug label Dec 30, 2021
@Redirion
Copy link
Member

connect to your OnePlus One with adb.
"adb shell"
"getprop | grep build"
and paste the output here.
We should be able to reanable the media parser feature particularly for LinageOS as it seems to be working there

@FrostKiwi
Copy link
Author

Here it is:

Output of greprop | grep build
[build.version.extensions.r]: [0]
[ro.bootimage.build.date]: [Tue Aug 10 00:29:06 UTC 2021]
[ro.bootimage.build.date.utc]: [1628555346]
[ro.bootimage.build.fingerprint]: [oneplus/bacon/A0001:5.0.2/LRX22G/YNG1TAS0YL:user/release-keys]
[ro.build.characteristics]: [default]
[ro.build.date]: [Tue Aug 10 00:29:06 UTC 2021]
[ro.build.date.utc]: [1628555346]
[ro.build.description]: [bacon-user 5.0.2 LRX22G YNG1TAS0YL release-keys]
[ro.build.display.id]: [lineage_bacon-userdebug 11 RQ3A.210805.001.A1 eng.root.20210810.003107 dev-keys]
[ro.build.expect.trustzone]: [TZ.BF.2.0-2.0.0109|TZ.BF.2.0-2.0.0123|TZ.BF.2.0-2.0.0134]
[ro.build.fingerprint]: [oneplus/bacon/A0001:5.0.2/LRX22G/YNG1TAS0YL:user/release-keys]
[ro.build.flavor]: [lineage_bacon-userdebug]
[ro.build.host]: [16a25d94af44]
[ro.build.id]: [RQ3A.210805.001.A1]
[ro.build.product]: [bacon]
[ro.build.tags]: [release-keys]
[ro.build.type]: [user]
[ro.build.user]: [root]
[ro.build.version.all_codenames]: [REL]
[ro.build.version.base_os]: []
[ro.build.version.codename]: [REL]
[ro.build.version.incremental]: [eng.root.20210810.003107]
[ro.build.version.min_supported_target_sdk]: [23]
[ro.build.version.preview_sdk]: [0]
[ro.build.version.preview_sdk_fingerprint]: [REL]
[ro.build.version.release]: [11]
[ro.build.version.release_or_codename]: [11]
[ro.build.version.sdk]: [30]
[ro.build.version.security_patch]: [2021-08-05]
[ro.lineage.build.vendor_security_patch]: [2016-09-01]
[ro.lineage.build.version]: [18.1]
[ro.lineage.build.version.plat.rev]: [0]
[ro.lineage.build.version.plat.sdk]: [9]
[ro.odm.build.date]: [Tue Aug 10 00:29:06 UTC 2021]
[ro.odm.build.date.utc]: [1628555346]
[ro.odm.build.fingerprint]: [oneplus/bacon/A0001:5.0.2/LRX22G/YNG1TAS0YL:user/release-keys]
[ro.odm.build.id]: [RQ3A.210805.001.A1]
[ro.odm.build.tags]: [dev-keys]
[ro.odm.build.type]: [userdebug]
[ro.odm.build.version.incremental]: [eng.root.20210810.003107]
[ro.odm.build.version.release]: [11]
[ro.odm.build.version.release_or_codename]: [11]
[ro.odm.build.version.sdk]: [30]
[ro.product.build.date]: [Tue Aug 10 00:29:06 UTC 2021]
[ro.product.build.date.utc]: [1628555346]
[ro.product.build.fingerprint]: [oneplus/bacon/A0001:5.0.2/LRX22G/YNG1TAS0YL:user/release-keys]
[ro.product.build.id]: [RQ3A.210805.001.A1]
[ro.product.build.tags]: [dev-keys]
[ro.product.build.type]: [userdebug]
[ro.product.build.version.incremental]: [eng.root.20210810.003107]
[ro.product.build.version.release]: [11]
[ro.product.build.version.release_or_codename]: [11]
[ro.product.build.version.sdk]: [30]
[ro.system.build.date]: [Tue Aug 10 00:29:06 UTC 2021]
[ro.system.build.date.utc]: [1628555346]
[ro.system.build.fingerprint]: [oneplus/bacon/A0001:5.0.2/LRX22G/YNG1TAS0YL:user/release-keys]
[ro.system.build.id]: [RQ3A.210805.001.A1]
[ro.system.build.tags]: [dev-keys]
[ro.system.build.type]: [userdebug]
[ro.system.build.version.incremental]: [eng.root.20210810.003107]
[ro.system.build.version.release]: [11]
[ro.system.build.version.release_or_codename]: [11]
[ro.system.build.version.sdk]: [30]
[ro.system_ext.build.date]: [Tue Aug 10 00:29:06 UTC 2021]
[ro.system_ext.build.date.utc]: [1628555346]
[ro.system_ext.build.fingerprint]: [oneplus/bacon/A0001:5.0.2/LRX22G/YNG1TAS0YL:user/release-keys]
[ro.system_ext.build.id]: [RQ3A.210805.001.A1]
[ro.system_ext.build.tags]: [dev-keys]
[ro.system_ext.build.type]: [userdebug]
[ro.system_ext.build.version.incremental]: [eng.root.20210810.003107]
[ro.system_ext.build.version.release]: [11]
[ro.system_ext.build.version.release_or_codename]: [11]
[ro.system_ext.build.version.sdk]: [30]
[ro.vendor.build.date]: [Tue Aug 10 00:29:06 UTC 2021]
[ro.vendor.build.date.utc]: [1628555346]
[ro.vendor.build.fingerprint]: [oneplus/bacon/A0001:5.0.2/LRX22G/YNG1TAS0YL:user/release-keys]
[ro.vendor.build.id]: [RQ3A.210805.001.A1]
[ro.vendor.build.security_patch]: []
[ro.vendor.build.tags]: [dev-keys]
[ro.vendor.build.type]: [userdebug]
[ro.vendor.build.version.incremental]: [eng.root.20210810.003107]
[ro.vendor.build.version.release]: [11]
[ro.vendor.build.version.release_or_codename]: [11]
[ro.vendor.build.version.sdk]: [30]

@Redirion
Copy link
Member

Build.DISPLAY.contains("lineage") should do it then. Thanks

@litetex
Copy link
Member

litetex commented Dec 31, 2021

Am I understanding this correctly v0.21.15 has the bug and v0.21.14 does not have the bug?
That's weird because we didn't update ExoPlayer in v0.21.15 and just disabled the MediaParser.

Note: There is a issue open in the LineageOS issuetracker: https://gitlab.com/LineageOS/issues/android/-/issues/3475
Also note that the phone is now >7 years old; it's likely that such problems occur with that old hardware.

Btw I think we should either close this issue and keep the discussion in #6207 or vice versa.

@FrostKiwi
Copy link
Author

Am I understanding this correctly v0.21.15 has the bug and v0.21.14 does not have the bug?

Correct.

we didn't update ExoPlayer in v0.21.15 and just disabled the MediaParser.

Thus, even though the symptom is identical to the video demo in #6207 (comment), my guess for the reason was wrong.

either close this issue and keep the discussion in #6207 or vice versa

The issue #6207 was solved and kept open (#6207 (comment)) to track what happend to this issue from the lineageOS side.
This issue is unfixed and present in the current version and if one should be kept open, it's this one I think.

@litetex litetex added device/software specific Issues that only happen on some devices or with some specific hardware/software player Issues related to any player (main, popup and background) labels Dec 31, 2021
@AudricV AudricV mentioned this issue Jan 7, 2022
4 tasks
@AudricV AudricV changed the title v0.21.15 Old regression returned: slow playback on OnePlus One v0.21.15 Old regression returned: slow playback on LineageOS Jan 7, 2022
@fdutheil
Copy link

fdutheil commented Feb 6, 2022

Hi,
same issue here (constant stutters while playing 1060p60 videos), with different device and lineageOS version.

Newpipe versions

Device info

  • Android version/Custom ROM version: Android 9, LineageOS 16.0
  • Device model: Samsung Galaxy Tab S2 (SM-T713)

@Redirion
Copy link
Member

Redirion commented Feb 11, 2022

there is nothing that can be done at the moment @fdutheil
The workaround would only work on devices with Android 11 but as it was fixed in LineageOS 18.1 the workaround is not required at all.

Your device is not maintained anymore and won't get LinegeOS 18.1.

The fix could be applied to LineageOS 16.0 if you are on a LineageOS build that is supported by someone you can ask him to check the solution of this issue: https://gitlab.com/LineageOS/issues/android/-/issues/3475

If your LineageOS 16.0 is also not maintained anymore you can't do anything.

For me this issue is a won't fix. Affected devices with Lineage OS 18.1 can update while workaround for older devices is not applicable. The only "solution" would be to downgrade ExoPlayer which won't happen.

Maybe more recent versions of ExoPlayer do feature support to change the media extractor behaviour, we need to check that. At the current version that is used in NewPipe we don't have that flexibility as far as I know.

So please use 720p60 for the time being.

@opusforlife2
Copy link
Collaborator

opusforlife2 commented Feb 12, 2022

For me this issue is a won't fix.

Closing as resolved, then. The solution is to update to LineageOS 18.1.

Edit:

we need to check that

The issue could be reopened if that ever happens.

@FrostKiwi
Copy link
Author

Wanted to confirm the fix.
Updating to the newest Lineage OS 18.1 fixed this via the Nov 15 pull request https://review.lineageos.org/c/LineageOS/android_hardware_qcom_media/+/318268

@Redirion
Copy link
Member

Redirion commented Feb 13, 2022

looks like there is a solution to restore the behaviour of earlier ExoPlayer releases without downgrading ExoPlayer. We could apply this to only LineageOS devces that do not have version 18.1.

google/ExoPlayer#9565 (comment)

Thanks to @TiA4f8R for pointing this out.

@fdutheil
please test the apk here: https://github.com/Redirion/NewPipe/releases/tag/oldmediacodecselector

@Redirion Redirion reopened this Feb 13, 2022
@litetex
Copy link
Member

litetex commented Feb 13, 2022

Sorry, but I'm in favor of closing this issue and don't fixing it any further because

  • it's an OS problem (only LineageOS) that is fixed in the latest version
  • it only occurs on old, discontinued devices (>5 years)
    • the affected devices were never intended (by the manufacturer) for such a version / custom ROM
  • it would create a maintenance effort
  • there are very few people affected by the problem

@fdutheil
Copy link

fdutheil commented Feb 14, 2022

looks like there is a solution to restore the behaviour of earlier ExoPlayer releases without downgrading ExoPlayer. We could apply this to only LineageOS devces that do not have version 18.1.

google/ExoPlayer#9565 (comment)

Thanks to @TiA4f8R for pointing this out.

@fdutheil please test the apk here: https://github.com/Redirion/NewPipe/releases/tag/oldmediacodecselector

@Redirion : Awesome, I tested the debug APK and it's smooth @1080p60

@litetex : if a user or a device deserves a fix for an issue is not relevant (beyond being a non technical matter). Ratio effort/gain is the only relevant metrics to appreciate this, as you said. As for "who is affected", this is pretty much any current or future device with decoders not "correctly" specified (to ExoPlayer's eyes), if I understand correctly.
Which means it is not restricted to particular devices, and is likely to happen again.

As a side note, VLC is dealing with buggy or not correctly presented hardware decoders too, with an elegant solution: if I simplify, VLC hardware decoding setting presented to the user has 3 states:

  • Auto (by default): which could be seen as current NewPipe behaviour
  • On: forcing hardware decoders (even if the playback breaks)
  • Off: not really relevant here, but you get the idea

@Redirion
Copy link
Member

thanks for the feedback @fdutheil

@litetex as this seems to be a per device basis fixing thing we could take the opportunity to add two new video options with a new category:
"Experimental Options to fix stuttering video playback on old devices"

  • Disable Media Tunneling
  • Disable codec capability check

Both are completely different. While the first is about a device incorrectly reporting it supports offloading (aka hardware decoding) the other point here is that the device incorrectly claims to support less than it could.

For media tunneling you already suggested we should made it an option instead of adding all devices manually as soon as someone reports an issue:
#7497 (review)

@litetex
Copy link
Member

litetex commented Feb 14, 2022

if a user or a device deserves a fix for an issue is not relevant

Consider the following case (click to expand)
Disclaimer: may contain irony

You buy a car (=your phone).
You replace the hitch (for trailers) with a custom one that was not approved by the manufacturer or an agency (=custom OS or whatever).
You add a trailer (=NewPipe).

While you drive on the highway the hitch breaks down and your trailer is destroyed.

You blame the trailer manufacturer (=TeamNewPipe).

Seems right or?
Because of course when someone has messed up their car (=your phone/OS) now the trailer manufacturer(=TeamNewPipe) has to fix the trailer so that it's self-driving.
Then the next person shows up and requests that the trailer has to be waterproof because he has an amphibious vehicle...
This goes on for some time until the devs recreated the entire universe so that every user is satisfied.

As for "who is affected", this is pretty much any current or future device with decoders not "correctly" specified (to ExoPlayer's eyes), if I understand correctly.

If we specific that our trailer weights 2 tons and your custom hitch can only drag 1 ton...

TL;DR
Yes.
But (normally) every manufacturer supported device has the correct decoders specified... besides >5 year old, manufacturer-unsupported ones with a broken custom ROM that was installed by the user.


@Redirion
Sounds good (although the naming is a bit long) but I would be fine with that option.

@AudricV
Copy link
Member

AudricV commented Aug 18, 2022

Is it still an issue when using this debug build from the dev branch?

@AudricV AudricV added the waiting for author If the author doesn't respond, the issue will be auto-closed. Otherwise the label will be removed. label Aug 18, 2022
@github-actions
Copy link

github-actions bot commented Sep 2, 2022

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.

@github-actions github-actions bot closed this as completed Sep 2, 2022
@fdutheil
Copy link

fdutheil commented Sep 5, 2022

As the repo was locked, nobody could reply and the issue was auto-closed... quite as expected.
If this issue can't be re-opened, I'll have to create a duplicate.

Hello @AudricV.
Can you please rebase this dev build onto the v0.23.3? Because this current dev build is affected by the blocking bug #8876 and can't be tested.

@AudricV
Copy link
Member

AudricV commented Sep 8, 2022

@fdutheil You can see if the issue is fixed using the debug/release APK of the 0.24.0 release candidate.

@fdutheil
Copy link

fdutheil commented Sep 13, 2022

@fdutheil You can see if the issue is fixed using the debug/release APK of the 0.24.0 release candidate.

Where can I find it?

Edit: nvm, get another round of digging, found it: #8890

@fdutheil
Copy link

@AudricV : issue still present in the debug/release APK of the 0.24.0 release candidate, 1080p60 videos are still choppy with NewPipe internal player.

@AudricV AudricV reopened this Sep 14, 2022
@github-actions

This comment was marked as duplicate.

@fdutheil

This comment was marked as resolved.

@AudricV AudricV removed the waiting for author If the author doesn't respond, the issue will be auto-closed. Otherwise the label will be removed. label Sep 16, 2022
@AudricV AudricV reopened this Sep 16, 2022
@AudricV
Copy link
Member

AudricV commented Oct 14, 2022

@FrostKiwi @fdutheil Could you try the APK of #8875, enable the Use ExoPlayer's old codec selection in ExoPlayer settings and see if the issue is fixed for you in this case? Thank you in advance.

@fdutheil
Copy link

@FrostKiwi @fdutheil Could you try the APK of #8875, enable the Use ExoPlayer's old codec selection in ExoPlayer settings and see if the issue is fixed for you in this case? Thank you in advance.

Hi @AudricV : tested, playback is smooth again at 1080p60 with internal player 👍

@AudricV
Copy link
Member

AudricV commented Feb 25, 2023

@fdutheil Could you test the debug APK of #9847 and see if the issue persists? The newest ExoPlayer version made new changes about how codecs are selected (look at the changelog of ExoPlayer linked in the PR for more details), so this may have changed the codec ExoPlayer choose on your device (and so the setting in #8875 may be not needed). Thanks in advance.

@fdutheil
Copy link

fdutheil commented Mar 3, 2023

Hi @AudricV ,
Tested both APKs of #9847 and v0.25.1-rc1, playback smooth at 1080p60 with internal player 👍️

Thanks for the head up, "the day" is coming 😉

@AudricV
Copy link
Member

AudricV commented Mar 3, 2023

Thanks for the feedback! I am closing issue due to your comment, and I am also removing the addition of the old codec selection setting in #8875, as this issue only affects a few devices and is due to bad configuration of your ROM and not to an ExoPlayer bug.

@AudricV AudricV closed this as completed Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is related to a bug device/software specific Issues that only happen on some devices or with some specific hardware/software player Issues related to any player (main, popup and background)
Projects
None yet
Development

No branches or pull requests

6 participants