5 Finding a player_id to hardcode it into Invidious Companion
Fijxu edited this page 2026-03-30 09:45:58 -03:00

Some background about this issue

When Youtube makes player changes, they often change their signature decipher algorithm, which is an algorithm needed to decipher the Youtube videos, making Invidious companion able to serve video.

Sometimes, when they change their signature decipher algorithm, Invidious companion is not able able to extract it and therefore we need to wait for the upstream project Youtube.JS that we use as a dependency to fix it, which can take a few days or a few weeks, the time will depend on how easy is to extract the signature decipher algorithm from the Youtube player.

Finding a player_id to hardcode it

Good sources to find an old player_id that worked well before youtube changed their signature decipher algorithm are:

Hardcode the player_id

Open ./src/constants.ts and set PLAYER_ID to a valid, working player_id.

Example:

export const PLAYER_ID = "0004de42";

Test it

Execute deno run dev and wait until Invidious companion is able to get a valid PO Token (You will see [INFO] Successfully generated PO token in the logs).

Now try it in your Invidious instance, if videos load and play fine, that player_id is still valid and can be hardcoded into Invidious companion if necessary.