NewPipe icon indicating copy to clipboard operation
NewPipe copied to clipboard

v0.21.15 Old regression returned: slow playback on LineageOS

Open FrostKiwi opened this issue 3 years ago • 22 comments

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: https://github.com/TeamNewPipe/NewPipe/issues/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

  • [x] I am using the latest version - 0.21.15
  • [x] I checked, but didn't find any duplicates (open OR closed) of this issue in the repo.
  • [x] I have read the contribution guidelines given at https://github.com/TeamNewPipe/NewPipe/blob/HEAD/.github/CONTRIBUTING.md.
  • [x] This issue contains only one bug. I will open one issue for every bug report I want to file.

Device info

  • Android version/Custom ROM version: Android 11, LineageOS 18.1
  • Device model: OnePlus One (A0001)

FrostKiwi avatar Dec 30 '21 01:12 FrostKiwi

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

Redirion avatar Dec 30 '21 11:12 Redirion

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]

FrostKiwi avatar Dec 30 '21 15:12 FrostKiwi

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

Redirion avatar Dec 30 '21 16:12 Redirion

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.

litetex avatar Dec 31 '21 14:12 litetex

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 https://github.com/TeamNewPipe/NewPipe/issues/6207#issuecomment-832025431, my guess for the reason was wrong.

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

The issue https://github.com/TeamNewPipe/NewPipe/issues/6207 was solved and kept open (https://github.com/TeamNewPipe/NewPipe/issues/6207#issuecomment-841611468) 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.

FrostKiwi avatar Dec 31 '21 15:12 FrostKiwi

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

Newpipe versions

  • latest version tested and affected: 0.21.16
  • Affected: >= 0.2.14
  • Last known unaffected version: 0.2.13
  • was affected by #6207 before it was fixed

Device info

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

fdutheil avatar Feb 06 '22 16:02 fdutheil

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.

Redirion avatar Feb 11 '22 08:02 Redirion

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.

opusforlife2 avatar Feb 12 '22 14:02 opusforlife2

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

FrostKiwi avatar Feb 12 '22 18:02 FrostKiwi

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.

https://github.com/google/ExoPlayer/issues/9565#issuecomment-978003084

Thanks to @TiA4f8R for pointing this out.

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

Redirion avatar Feb 13 '22 14:02 Redirion

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

litetex avatar Feb 13 '22 14:02 litetex

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

fdutheil avatar Feb 14 '22 13:02 fdutheil

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: https://github.com/TeamNewPipe/NewPipe/pull/7497#pullrequestreview-823304754

Redirion avatar Feb 14 '22 14:02 Redirion

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.

litetex avatar Feb 14 '22 20:02 litetex

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

AudricV avatar Aug 18 '22 17:08 AudricV

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[bot] avatar Sep 02 '22 00:09 github-actions[bot]

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.

fdutheil avatar Sep 05 '22 09:09 fdutheil

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

AudricV avatar Sep 08 '22 15:09 AudricV

@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: https://github.com/TeamNewPipe/NewPipe/issues/8890

fdutheil avatar Sep 13 '22 13:09 fdutheil

@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.

fdutheil avatar Sep 13 '22 13:09 fdutheil

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[bot] avatar Sep 15 '22 00:09 github-actions[bot]

@AudricV : erf, is there a way to prevent auto-close of this issue?

fdutheil avatar Sep 16 '22 11:09 fdutheil

@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.

AudricV avatar Oct 14 '22 19:10 AudricV

@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 👍

fdutheil avatar Oct 16 '22 12:10 fdutheil

@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.

AudricV avatar Feb 25 '23 15:02 AudricV

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 😉

fdutheil avatar Mar 03 '23 15:03 fdutheil

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 avatar Mar 03 '23 19:03 AudricV