NewPipe 0.23.0 released: Behold the behemoth

post image

This release got delayed by quite a bit, and so it just grew and grew and grew. You’re getting a truly massive release to make up for the long wait. Be ready for a whopper of a blog post!

Wow. Where do we even start? Let’s see… new stream notifications! Now your phone can ping you even more frequently than before! Seamless transition to and from background! Now there is no pause in the audio when switching between apps! YouTube/YouTube Music Mixes! Now the app suggests you these in the related items so that you can binge curated content to your hearts’… content. And finally, the popup player is usable again on Android 12!

This post also contains all the changes from the 0.22.0 Extractor version, which we were forced to release early as part of the hotfix to fix YouTube playback breaking yet again.

New

  • @nv95 brings you a highly requested and anticipated feature: Notifications for new streams from subscribed channels! Now whenever your favourite YouTuber uploads a new video, NewPipe can send you a notification to let you know!

  • @TiA4f8R brings you a second frequently requested and really awesome feature. Seamless switch to and from background! Now when you select “Minimize to background” in settings and minimise the app, NewPipe will pause the video stream and continue the audio stream without interruption! When you switch back to the app, you will see a black screen for a couple of seconds, after which the video will resume playing. (Note: there are certain (usually very old) videos for which this won’t work. In those cases, the regular short pause in the audio will occur before playback resumes.)

  • @Stypox made it so that YouTube Mixes and YouTube Music Mixes show up in related videos section. You’re no longer forced to do the tedious job of having to share Mix URLs to NewPipe each time from another app to be able to play them! While the release was being prepared, YouTube removed mix suggestions in the EU unless cookies are accepted (which NewPipe does not), but they should still appear in other countries. For those who have discovered upon reading this that NewPipe can play Mixes, congrats, and have fun! :)

  • @haklc added a cool feature where you can change the audio pitch by semitones instead of percentage! This is a nifty tool for musically-inclined users, and also something fun to play with for everyone else. Don’t worry, you can toggle a checkbox to revert to the percentage way of doing things.

  • @ktprograms added a button to the queue menu in the main player which lets you add the current queue to a new or an existing playlist. Incidentally, this can also be used to ‘convert’ a remote playlist into a local NewPipe playlist, which you can then edit away to your heart’s content. Isn’t that such a nifty feature?

Improved

  • @XiangRongLin made the throttling decryption code more resistant to API changes on YouTube’s end. This means that there is now a lesser chance of videos slowing down to glacial, virtually unplayable, speeds in the future. Woohoo!

  • @TiA4f8R added some more parameters to the requests that the Extractor sends to YouTube so that NewPipe mimics official clients more closely. This yields some benefits like reduced probability of throttling, as well as reduced data use.

  • @TiA4f8R also made it so that separate video and audio streams are fetched for livestreams, instead of combined streams. And and and! You can now rewind livestreams back more than 30 seconds! How much you can rewind depends on the livestream in question. It’s not a fixed value. Also, please note that rewinding in livestreams can be disabled by individual creators on YouTube.

  • @ktprograms made the player remember the step size for the speed and pitch adjustment bars in the playback control dialog. Now the dialog doesn’t default to the 25% step size each time you open it. Rather, it shows you the last used step size.

  • @Stypox ensured that all the relevant dialogs in the app uniformly show the “OK” and “Cancel” buttons, which are the default on Android, instead of “Yes” and “No” buttons.

  • @Stypox also improved the player UI and navigability for Android TV. This fixed several problems: unreachable buttons in the main player queue, incorrect background theming of the main player menus, and the player controls intermittently showing up below the queue menu.

  • @SpinHit added a confirmation dialog when deleting all files in the Download menu.

  • @mauriciocolli noticed that the app used duplicated icons for the night theme, which caused visibility problems for a lot of them. Since the original icons are vector drawables, the duplicated icons were deleted en masse, and instead, color attributes were used to match the original icons to the active theme. We tried to catch every case where this breaks the icon, but it is likely we missed some. Feel free to report them in the repo (see the last header for more details on that).

  • In a surprise entry, @karyogamy, a former contributor, showed up out of the blue and did some major refactoring work on the player code, which was blocking further ExoPlayer updates! As a followup, ExoPlayer has now been updated from version 2.14.2 to version 2.17.1, the latest release, skipping two major releases. The code was also simplified a lot, and some custom code was dropped in favour of using ExoPlayer’s functionality directly.

  • @karyogamy also added an experimental setting to Video and Audio settings called “Playback Load Interval Size”. This setting is meant for users to experiment and see if changing it to something other than the default ExoPlayer value helps reduce the long buffer time (despite fast internet speed) before video playback starts for YouTube videos. NOTE: This is only meant for initial video playback, which is when a video is opened for the first time. It does not apply to reopened videos, or to the buffering that occurs when jumping to another timestamp within a video. For those who are interested in investigating and finding out the best value, you’re welcome to leave a comment on the PR with your findings.

Fixed

  • To start this list off, a very critical fix! Users on Android 12 had been unable to use the popup player (Picture-in-Picture) for most of a year, because it prevented interaction with the screen outside of the player. We spent a very long time investigating this, to no avail. It was @moneytoo, the developer of Just Video Player, who recently figured out that the problem was caused by the popup player’s close button. Shortly after that, it was our very own @TiA4f8R who realised that this longstanding bug was easily solved by reducing the opacity of the close button below a threshold value (which was essentially a single line of change to the code!). Phew! Rejoice, Android 12 users! The power of the popup is in your palms again!

  • @TiA4f8R fixed the extraction of videos from certain kinds of YouTube series playlists, and also fixed the playlist view count for learning playlists being mistakenly shown as the playlist stream count.

  • @Stypox fixed the extraction of YouTube Music Mixes, which was broken in certain countries.

  • @litetex fixed the extraction of YouTube Shorts, which don’t show the duration any longer after YouTube made a server-side change. Now the large number of “Not loaded” channels when refreshing the feed, as well as the annoyingly frequent error snackbar, won’t bother you anymore.

  • @TiA4f8R fixed the extraction of embeddable age-restricted videos on YouTube, as well as videos that provide a content warning and require user consent before playback. Keep in mind that YouTube can break the extraction of age-restricted videos again at any time, so enjoy it while it lasts.

  • As a follow-up, @TiA4f8R also ensured that subtitles are extracted for age-restricted videos.

  • The infamous ‘n’ parameter used by YouTube changed again, which caused throttling. That was fixed (again) by @Stypox.

  • If you used external buttons (like on a Bluetooth headphone or speaker) to resume playback, the player controls UI would remain on screen forever, instead of fading out after a few moments. @ktprograms fixed this.

  • The app’s update checking service would randomly fail while the app ran in the background, resulting in a crash. @TacoTheDank updated some deprecated code to fix this. Less crashes for you!

  • The new error notifications added by @Stypox in a previous release crashed the app on KitKat, which they have now fixed.

  • @karyogamy also fixed playback being reset to the beginning when the player type was changed (e.g. popup -> audio or audio -> main).

  • @mauriciocolli fixed the layout of the video resolution selection menu in the download dialogue, which earlier left space for a non-existent mute icon to the left of each option.

  • If you tried to rotate the screen while the “Add to playlist” dialogue was open, the app would crash, which has been fixed by @GGAutomaton. Thanks!

Nerd Talk

  • dependabot updates:
    • Bump actions/checkout from v2 to v3
    • Bump spotbugs-annotations from 4.5.3 to 4.6.0
    • Bump gson from 2.8.9 to 2.9.0
    • Bump actions/cache from 2 to 3
    • Bump rhino from 1.7.13 to 1.7.14
  • @litetex refactored the YoutubeCommentsExtractor class to use the Java 8 Stream API, which greatly simplifies the code and reduces potential bugs.

  • @FireMasterK added support for extracting the channel subscriber count in the StreamInfo class.

  • @FireMasterK fixed a PeerTube test, and also removed the need for a new CommentsInfo instance each time one of the methods of this class had to be called, reducing the RAM burden caused by the unneeded instances.

  • @litetex realised that our hardcoded SoundCloud ClientID went out of date pretty quickly after each release, so there was no point in updating it again and again. It has been removed completely. Now we don’t have to chase after a moving goalpost of an optimisation, which hardly benefited users. Thanks, litetex!

  • @Stypox added the MockOnly JUnit 5 extension so that a test can be instructed to only run when the downloader is mocked. This was needed for YouTube Mixes. Moreover, the DownloaderFactory class’s methods were made static, shaving off a little bit of CPU overhead each time that code is run.

  • @Stypox added the Checkstyle static code analysis tool to the NewPipe Extractor project, so that code formatting remains standardised throughout the repo. A bunch of code was also refactored along the way. (The Checkstyle mentioned in previous blog posts is part of the NewPipe repo.)

  • @TacoTheDank replaced the CircleImageView library with Google’s own Material implementation, ShapeableImageView. Taco dares you to find the difference between the old and new icons. (Hint for those who really want to try: look at circular image icons, like the channel avatars.) Aaanyway, that’s one less dependency! Less code is good code.

  • @Stypox made a lot of complicated changes that we don’t understand at all so that there is no raw use of parameterized classes in the code, which generates a Java warning. We’re assuming this is a good thing. Let us know in the comments.

  • @Stypox fixed another build warning, this time by AndroidX, about database queries returning unused columns. For this, AndroidX’s RewriteQueriesToDropUnusedColumns function was used.

  • @Atemu fixed the app failing to build on Macbooks with Apple’s in-house (M1, etc.) chips by updating the AndroidX Room version.

  • @TobiGr refactored the way InfoItemDialogs are generated, as the previous code was not up to par in terms of legibility, structure, consistency, code duplication, and separation of concerns.

  • @avently implemented a better equality check for queues, which ensures that going up the backstack via the Back button won’t result in duplicates.

  • @TacoTheDank, in their LibraryMan avatar:
    • Gradle (and wrapper): 7.3.3 -> 7.4.2
    • Android Gradle Plugin: 7.0.4 -> 7.1.3
    • buildTools: 30.0.3 -> 31.0.0
    • Kotlin: 1.5.31 -> 1.6.20
    • ktlint: 0.43.2 -> 0.44.0
    • Checkstyle: 9.2.1 -> 9.3
    • Google Material: 1.4.0 -> 1.5.0 (which allowed one method to be updated to a much simpler version)
    • AndroidX:
      • LocalBroadcastManager: 1.0.0 -> 1.1.0
      • Media: 1.4.3 -> 1.5.0
      • Preference: 1.1.1 -> 1.2.0
      • ConstraintLayout: 2.1.2 -> 2.1.3
      • Room: 2.4.1 -> 2.4.2
    • GitHub Actions dependencies:
      • github-script: v5 -> v6
      • and all the rest: v2 -> v3
  • While investigating some player UI layout issues, @Stypox realised that the large-land XML layout file wasn’t actually being used at all, and removed it, getting rid of some 800 lines of duplicated code!

  • @TacoTheDank migrated the app update checker from using the deprecated IntentService service to using a worker, by adding the AndroidX Work library. There was also some Kotlin-isation and refactoring involved. Who doesn’t like themselves some Kotlin.

  • @Stypox de-duplicated a couple of functions that were both meant to fetch the full stream info if only sparse info was fetched earlier, improved the toast shown for this action, and ensured that streams are properly saved in the database, negating any potential side effects of incorrectly stored info.

  • @XiangRongLin took some steps towards refactoring the Player class by extracting some view click listeners out of it, and into their own classes.

  • @TacoTheDank found 3 unused classes, containing about 400 lines of code in all, and removed them like a BAWSE.

  • @TacoTheDank made some improvements to the About page, which had earlier been converted to Kotlin, by grouping some code and de-duplicating some other code.

  • @TacoTheDank created a stub implementation of a Listener so that its unused methods could be removed from a couple of classes, and replaced a plain old Java listener with an AndroidX Kotlin Listener extension.

  • @TacoTheDank did some lint cleanup of the code by fixing some parameters, removing unused ones, and other miscellaneous fixes.

  • @Stypox further updated Checkstyle to version 10.0, and placed all its files inside a checkstyle subfolder. This fixed many build warnings, and possibly reduced build times. An unused configuration, and some outdated warning suppressions, were also removed.

  • @litetex updated the app’s GPLv3 license text to the latest version from the GNU website, and deleted the copyright file, which finally allowed GitHub to recognise the app license correctly.

  • Since Checkstyle files were moved into their own subfolder, @Trust04zh updated the CONTRIBUTING guidelines to reflect this change.

  • @TacoTheDank replaced an unofficial checklist icon with the official Google one, and improved formatting in some XML layout and icon files.

Where to get this brand-new version

NewPipe notifies you about new versions. You can download them when you press the notification, which will take you to the GitHub Releases page.

If you use the F-Droid app, it, too, notifies you about updates for NewPipe. Please keep in mind that it can take F-Droid a while to update their repository. If you have problems installing the update, you may need to uninstall NewPipe and then install it afresh. (Make sure to backup data by exporting your database from the Settings > Content menu.)

If you already installed NewPipe from F-Droid’s repository, to get this version of NewPipe you can do one of the following:

Note: If you installed NewPipe from GitHub Releases you will not have to uninstall NewPipe to switch to our custom repo. Just let it update your current version. Make sure you back up your data as mentioned in the warning at the top of the FAQ page!

Now that you’ve (hopefully) updated, please let us know what your experience of the latest release is, especially bugs in need of fixing. As usual, you can reach out to us via IRC (#newpipe on Libera.Chat), open issues on GitHub or, ideally, use our built-in crash reporter to send us machine-readable issue reports. You can even send in fixes yourself.

If you have any other questions, feel free to post them in the comments here and someone will reply to you. Also, thanks for reading it till the end! We put quite some time into these blog posts.

See also:  pinned  release

Let us know what you think!

Please read our rules before leaving a comment!

→ Feature requests or bug reports need to be reported on GitHub! ←