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

Player fixes #1789

Open
wants to merge 29 commits into
base: dev
Choose a base branch
from
Open

Player fixes #1789

wants to merge 29 commits into from

Conversation

gechoto
Copy link
Contributor

@gechoto gechoto commented Jan 5, 2025

Should fix #1748 #1781 #1775 #1770 #1758 #1764 #1760 #1757 #1787 #1788 #1790

This supersedes #1774 with additional improvements.

Compared to the previous PR this adds:

  • fixes for metadata (normalization works again)
  • support for premium formats (better audio quality for logged in users with a premium account)
  • a better client fallback system and streaming url status checks so playback is more likely to work
  • a fix to prevent using expired urls from songUrlCache

Current test build:
https://github.com/z-huang/InnerTune/actions/runs/13220889696/artifacts/2559580736

Copy link

gitguardian bot commented Jan 5, 2025

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
While these secrets were previously flagged, we no longer have a reference to the
specific commits where they were detected. Once a secret has been leaked into a git
repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@gechoto
Copy link
Contributor Author

gechoto commented Jan 5, 2025

@z-huang can you have a look?
Many users are waiting for the next release because the latest one is broken.
Would be happy to get this done and get the app back up working again.

There is one last thing I'm not sure about. The http clients in NewPipeDownloaderImpl and YTPlayerUtils do not use the proxy yet. But I wonder if it is even worth keeping the proxy since YT usually blocks most datacenter IPs now.

What do you think? Should the proxy be removed?
If it will be kept how should it be used in NewPipeDownloaderImpl and YTPlayerUtils?

@gechoto gechoto mentioned this pull request Jan 5, 2025
4 tasks
@PSJahn
Copy link

PSJahn commented Jan 6, 2025

The crashing after logging in seems to be fixed in the latest commit build! (However, the youtube music webpage is opened after logging in successfully, it would maybe be better if it exited out of the login prompt automatically, after logging in successfully)
The second issue which I was facing, with the app closing itself if not connected to the internet also seems to be fixed for me!
Hope this gets merged soon!

EDIT: Playing songs, as well as downloading, also works of course!

@MLGHerobrine
Copy link

MLGHerobrine commented Jan 7, 2025

Works great! Only issue is increased startup time and decreased UI performance on a lower end device like mine (Cat S22 Flip).

It takes about 10-15 seconds for my phone to start it up, and then the UI renders slowly (5-10 FPS when scrolling)

@thornySoap
Copy link

It takes about 10-15 seconds for my phone to start it up, and then the UI renders slowly (5-10 FPS when scrolling)

@MLGHerobrine if you used the link to download the debug version, that is normal. I haven't tested but I assume that when building the release APK, performance should be as usual.

@gechoto
Copy link
Contributor Author

gechoto commented Jan 9, 2025

Proxy support is now also added. Turns out it wasn't hard because the proxy is only applied on app start. This means if you change the proxy settings you will have to fully close and restart the app. That was already the case before and just made adding the proxy to the new http clients easier.

@Figim
Copy link

Figim commented Jan 10, 2025

This video won't play or download when you sign in. I have selected "high" for audio quality and it shows mp4 in the details:

https://music.youtube.com/watch?v=wxHRqPtWHOU

Screenshot_20250110-131915_InnerTune Debug
Screenshot_20250110-131911_InnerTune Debug

@gechoto
Copy link
Contributor Author

gechoto commented Jan 10, 2025

This video won't play or download when you sign in.

@Figim Please follow these steps:

1.) Clear app data (full reset without restoring a backup)
2.) Try to play the song again (without login at this point) - LEAVE A COMMENT HERE IF IT WORKS
3.) Clear app data again (full reset without restoring a backup) - YES A SECOND TIME
4.) Login in within InnerTune
5.) Try to play the songs again - LEAVE A COMMENT HERE IF IT WORKS

I have selected "high" for audio quality and it shows mp4 in the details

This PR does not change anything about the code which chooses the format.

"high" in InnerTune just means the format with the highest bitrate (for you).
It has a slight preference for opus but only to some extent so you can still get other formats in some cases.

This could be improved in the future but for now you get the same formats as with older InnerTune versions.

@Figim
Copy link

Figim commented Jan 10, 2025

This video won't play or download when you sign in.

@Figim Please follow these steps:

1.) Clear app data (full reset without restoring a backup) 2.) Try to play the song again (without login at this point) - LEAVE A COMMENT HERE IF IT WORKS 3.) Clear app data again (full reset without restoring a backup) - YES A SECOND TIME 4.) Login in within InnerTune 5.) Try to play the songs again - LEAVE A COMMENT HERE IF IT WORKS

I have selected "high" for audio quality and it shows mp4 in the details

This PR does not change anything about the code which chooses the format.

"high" in InnerTune just means the format with the highest bitrate (for you). It has a slight preference for opus but only to some extent so you can still get other formats in some cases.

This could be improved in the future but for now you get the same formats as with older InnerTune versions.

2. Playing this video
5. This video not playing

josprox added a commit to josprox/Joss-Music-Fork that referenced this pull request Feb 5, 2025
…newpipe y ahora se usa rl repo oficial, estos cambios vienen de "Player fixes z-huang#1789", también se cambió el reproductor dndo una transparencia como fue solicitado por muchos
@gechoto
Copy link
Contributor Author

gechoto commented Feb 6, 2025

Hi @z-huang is this project still active?
There are already new challenges put in place (I currently work on po token support) but I don't know if I want to spend time to keep this PR maintained forever if the project is not active anymore.
What are your plans about the future of InnerTune?

josprox added a commit to josprox/Joss-Music-Fork that referenced this pull request Feb 7, 2025
@Figim
Copy link

Figim commented Feb 13, 2025

@gechoto hello There is such a popular app, but no one has added PoToken support.
https://github.com/fast4x/RiMusic/pulls?q=is%3Apr+is%3Aclos

@th3y
Copy link

th3y commented Feb 15, 2025

Hi @z-huang is this project still active? There are already new challenges put in place (I currently work on po token support) but I don't know if I want to spend time to keep this PR maintained forever if the project is not active anymore. What are your plans about the future of InnerTune?

May i ask
What does PoToken do now?
I mean, as far i can see, its focused for WEB_REMIX (Logged In), i just tested OuterTune and there's no changes with guest client. I have the error (LOGIN REQUIRED) with Mobile Data.
This is likely the same scenary, so i was wondering if PoToken its just a improved way to playback for WEB_REMIX + Login User, but does this fix error 403 after extracting some urls?

@Figim
Copy link

Figim commented Feb 15, 2025

Hi @z-huang is this project still active? There are already new challenges put in place (I currently work on po token support) but I don't know if I want to spend time to keep this PR maintained forever if the project is not active anymore. What are your plans about the future of InnerTune?

May i ask What does PoToken do now? I mean, as far i can see, its focused for WEB_REMIX (Logged In), i just tested OuterTune and there's no changes with guest client. I have the error (LOGIN REQUIRED) with Mobile Data. This is likely the same scenary, so i was wondering if PoToken its just a improved way to playback for WEB_REMIX + Login User, but does this fix error 403 after extracting some urls?

Some clients require PoToken, some require logins. The app automatically chooses the best one. You log in and continue. Does OuterTune use NewPipe extractor? Newpipe transmits iOS visitor data for bot errors. Each client uses different visitordata and potoken. PoToken fixes 403 errors

@gechoto
Copy link
Contributor Author

gechoto commented Feb 15, 2025

What does PoToken do now?

It makes playback possible with the WEB_REMIX client in more/(most?) cases. Without po tokens this client only works for premium users.

i just tested OuterTune and there's no changes with guest client. I have the error (LOGIN REQUIRED) with Mobile Data.

Does playback work for you on the official website on the same device and mobile data connection in a private browser window?

Does OuterTune use NewPipe extractor?

Only small parts of it. Just like InnerTune with this PR.

Newpipe transmits iOS visitor data for bot errors.

Both InnerTune and OuterTune get visitor data in a different way than NewPipe.

Each client uses different visitordata and potoken.

Currently the same visitor data is used across all clients and po tokens are only supported for the WEB_REMIX client.

@Figim
Copy link

Figim commented Feb 15, 2025

What does PoToken do now?

It makes playback possible with the WEB_REMIX client in more/(most?) cases. Without po tokens this client only works for premium users.

i just tested OuterTune and there's no changes with guest client. I have the error (LOGIN REQUIRED) with Mobile Data.

Does playback work for you on the official website on the same device and connection in a private browser window?

Does OuterTune use NewPipe extractor?

Only small parts of it. Just like InnerTune with this PR.

Newpipe transmits iOS visitor data for bot errors.

Both InnerTune and OuterTune get visitor data in a different way than NewPipe.

Each client uses different visitordata and potoken.

Currently the same visitor data is used across all clients and po tokens are only supported for the WEB_REMIX client.

So why don't you use iOS? It's pretty stable now.

@gechoto
Copy link
Contributor Author

gechoto commented Feb 15, 2025

So why don't you use iOS? It's pretty stable now.

It is still in use as a fallback client but it does not work reliably for all users.

@th3y
Copy link

th3y commented Feb 15, 2025

What does PoToken do now?

It makes playback possible with the WEB_REMIX client in more/(most?) cases. Without po tokens this client only works for premium users.

i just tested OuterTune and there's no changes with guest client. I have the error (LOGIN REQUIRED) with Mobile Data.

Does playback work for you on the official website on the same device and connection in a private browser window?

Does OuterTune use NewPipe extractor?

Only small parts of it. Just like InnerTune with this PR.

Newpipe transmits iOS visitor data for bot errors.

Both InnerTune and OuterTune get visitor data in a different way than NewPipe.

Each client uses different visitordata and potoken.

Currently the same visitor data is used across all clients and po tokens are only supported for the WEB_REMIX client.

So why don't you use iOS? It's pretty stable now.

IOS is not stable. Me and some users have problems with Mobile Data. Its still showing 'Log in to continue' most of the times in non age restricted videos. Under WIFI it works pretty stable. it needs log-in for age restricted videos tho.

josprox added a commit to josprox/Joss-Music-Fork that referenced this pull request Feb 16, 2025
…ttling parameter of streaming urls" de "Player fixes z-huang#1789"
@th3y
Copy link

th3y commented Feb 16, 2025

Btw @gechoto could you keep updating and add PoToken in this PR?

@gechoto
Copy link
Contributor Author

gechoto commented Feb 16, 2025

Btw @gechoto could you keep updating and add PoToken in this PR?

I don't know yet since this is possibly going nowhere.

For now I focus on OuterTune first because it is an active project where more people can enjoy the fixes.

@th3y
Copy link

th3y commented Feb 16, 2025

Btw @gechoto could you keep updating and add PoToken in this PR?

I don't know yet since this is possibly going nowhere.

For now I focus on OuterTune first because it is an active project where more people can enjoy the fixes.

Thanks in advance, im trying to get it work in a private build from other project, but without success.
Edit: i get it working

@MLGHerobrine
Copy link

For now I focus on OuterTune first because it is an active project where more people can enjoy the fixes.

Should I switch to OuterTune then? I wasn't using it because of differences in the UI, and trouble with my imported playlists (from InnerTune) but I could get used to the UI.

@ecomaikgolf
Copy link

For now I focus on OuterTune first because it is an active project where more people can enjoy the fixes.

Should I switch to OuterTune then? I wasn't using it because of differences in the UI, and trouble with my imported playlists (from InnerTune) but I could get used to the UI.

I switched and imported my InnerTune. There are differences such as the caching system (AFAIK) which I don't completely like but at least it works.

@KEVIN970712
Copy link

For now I focus on OuterTune first because it is an active project where more people can enjoy the fixes.

Should I switch to OuterTune then? I wasn't using it because of differences in the UI, and trouble with my imported playlists (from InnerTune) but I could get used to the UI.

I switched and imported my InnerTune. There are differences such as the caching system (AFAIK) which I don't completely like but at least it works.

If you are used to using innertune,I recommend this link, it fixes the player issues and is no different than the original
https://github.com/MZaFaRM/InnerTune/releases/tag/v5.10.1

@Figim
Copy link

Figim commented Feb 26, 2025

For now I focus on OuterTune first because it is an active project where more people can enjoy the fixes.

Should I switch to OuterTune then? I wasn't using it because of differences in the UI, and trouble with my imported playlists (from InnerTune) but I could get used to the UI.

I switched and imported my InnerTune. There are differences such as the caching system (AFAIK) which I don't completely like but at least it works.

If you are used to using innertune,I recommend this link, it fixes the player issues and is no different than the original https://github.com/MZaFaRM/InnerTune/releases/tag/v5.10.1

There should be Potoken support to fix the unknown error or bot error. But it doesn't support innertune yet. Yours is a temporary fix

@Vigneshputti
Copy link

While playing music is stooping

@Figim
Copy link

Figim commented Feb 27, 2025

While playing music is stooping

PoToken support is needed. Don't worry.

@hasanelfalakiy
Copy link

I tried this debug app but still can't play music

@gechoto
Copy link
Contributor Author

gechoto commented Mar 9, 2025

I tried this debug app but still can't play music

This PR is still missing PO token support and I have paused working on it because InnerTune is not actively maintained currently.

However I have contributed all of this and PO token support to OuterTune.
If you want to give it a try:
https://github.com/OuterTune/OuterTune

@hasanelfalakiy
Copy link

I tried this debug app but still can't play music

This PR is still missing PO token support and I have paused working on it because InnerTune is not actively maintained currently.

However I have contributed all of this and PO token support to OuterTune.
If you want to give it a try:
https://github.com/OuterTune/OuterTune

I've try outertune, but why result of search song not much many like innertune and the seekbar doesn't have any wavy options like innertune

@rcky844
Copy link

rcky844 commented Mar 11, 2025

I tried this debug app but still can't play music

This PR is still missing PO token support and I have paused working on it because InnerTune is not actively maintained currently.
However I have contributed all of this and PO token support to OuterTune.
If you want to give it a try:
https://github.com/OuterTune/OuterTune

I've try outertune, but why result of search song not much many like innertune and the seekbar doesn't have any wavy options like innertune

I have created an unofficial release build of InnerTube over at a comment on a discussion, which also includes some of my own changes and enables support down to Android 5.0, with fixes for Discord RPC.

@hasanelfalakiy
Copy link

I tried this debug app but still can't play music

This PR is still missing PO token support and I have paused working on it because InnerTune is not actively maintained currently.
However I have contributed all of this and PO token support to OuterTune.
If you want to give it a try:
https://github.com/OuterTune/OuterTune

I've try outertune, but why result of search song not much many like innertune and the seekbar doesn't have any wavy options like innertune

I have created an unofficial release build of InnerTube over at a comment on a discussion, which also includes some of my own changes and enables support down to Android 5.0, with fixes for Discord RPC.

thank you, I'll try it

@hasanelfalakiy
Copy link

I tried this debug app but still can't play music

This PR is still missing PO token support and I have paused working on it because InnerTune is not actively maintained currently.
However I have contributed all of this and PO token support to OuterTune.
If you want to give it a try:
https://github.com/OuterTune/OuterTune

I've try outertune, but why result of search song not much many like innertune and the seekbar doesn't have any wavy options like innertune

I have created an unofficial release build of InnerTube over at a comment on a discussion, which also includes some of my own changes and enables support down to Android 5.0, with fixes for Discord RPC.

because the signature is different, I can't install it, if I delete the old application the downloaded songs will be lost While some of these songs are no longer available on the music server, is there a way I can save these songs to the internal memory folder?

@rcky844
Copy link

rcky844 commented Mar 12, 2025

I tried this debug app but still can't play music

This PR is still missing PO token support and I have paused working on it because InnerTune is not actively maintained currently.
However I have contributed all of this and PO token support to OuterTune.
If you want to give it a try:
https://github.com/OuterTune/OuterTune

I've try outertune, but why result of search song not much many like innertune and the seekbar doesn't have any wavy options like innertune

I have created an unofficial release build of InnerTube over at a comment on a discussion, which also includes some of my own changes and enables support down to Android 5.0, with fixes for Discord RPC.

because the signature is different, I can't install it, if I delete the old application the downloaded songs will be lost While some of these songs are no longer available on the music server, is there a way I can save these songs to the internal memory folder?

Use the backup & restore feature.

@rcky844
Copy link

rcky844 commented Mar 12, 2025

I tried this debug app but still can't play music

This PR is still missing PO token support and I have paused working on it because InnerTune is not actively maintained currently.

However I have contributed all of this and PO token support to OuterTune. If you want to give it a try: https://github.com/OuterTune/OuterTune

Perhaps it is just a case of cherry-picking? I have ported the relevant changes from OuterTune and added it to my own "vanilla" fork of InnerTune.

rcky844@cdd41ec
rcky844@c433098
rcky844@3e20fba
rcky844@14d439f

Please check whether this would be enough, since no test suite had been written in OuterTune.

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

Successfully merging this pull request may close these issues.

Unable to play songs in the app