lamarios / clipious

Invidious client for android
GNU Affero General Public License v3.0
874 stars 31 forks source link

Can't get thumbnails or videos to play on local server #444

Open Fasterwolf opened 8 months ago

Fasterwolf commented 8 months ago

I have Invidious installed on a local server and is not going through a reverse proxy. Accessing the local address loads thumbs and video with out any issue. When I try to get them to load through Clipious I just get a ! and nothing loads. I did verify that I have set the external port and domain. I have also tried with external port being 3000 along with 80 as there is no ssl, tired domain with port and without. I have also reinstalled Clipious on each attempt to make sure i was working with a fresh install.

lamarios commented 8 months ago

Did you check the thumbnails values on the api of your server according to the wiki?

Fasterwolf commented 8 months ago

Yes I confirmed they were showing up correctly when checking the API

lamarios commented 8 months ago

Is it an old version of android?

Fasterwolf commented 8 months ago

Nope samsung s23 ultra completely up to date

lamarios commented 8 months ago

To be honest I'm not sure what is the issue. I never faced any issues with my own instance so I can't help based on experience.

If the app works with public servers then I doubt that's an issue with the app itself.

It's strange because if you don't use the local proxy option then the video urls are straight form Google so I'm not sure what's the blocker here.

zer0factor commented 8 months ago

Having the same issue here. The only config is the "thin mode"? That didn't help.

zer0factor commented 8 months ago

Nevermind fix with total rebuild.(With domain/external port) Clear cache on the app(dont know if that help.)

B0G0311 commented 7 months ago

@zer0factor before you solved the problem by adding a domain. Did the ip/port combo have https or http? Now is it https? I have ran into the same issue running invidious on an umbrel. I think it may be due to tls or lack there of one.

zer0factor commented 7 months ago

yes, you need a valid TLS cert. The "Skip SSL" option in the app doesnt seem to work with Dash player.

lagset commented 6 months ago

I've got the same problem as the original post, but am hosting invidious behind a reversre proxy in local Lan with an own certificate which is signed by my own root ca (and installed in the android os certificate store of the client device). The certificate is served by the reverse proxy.

The options external_port, domain and https_only are set in invidious,m and it seems to work correctly since thumbnails are displayed in clipious.

Some random public instance works with Dash in clipious (even with "skip SSL" enabled). My private instance does not work with Dash in clipious (same symptoms as OP) but on the invidious web interface Dash works.

That's the app log, when I select a video in clipious and then the exclamation icon appears in the player:

[INFO] [Service] - 2024-02-22 00:13:15.484992 - calling https://xxxxxxxxxx/api/v1/videos/ov_7HT8bbX4 
[INFO] [Service] - 2024-02-22 00:13:16.024292 - calling https://xxxxxxxxxx/api/v1/auth/playlists 
[INFO] [Service] - 2024-02-22 00:13:16.025004 - calling https://xxxxxxxxxx/api/v1/auth/subscriptions 
[INFO] [VideoPlayer] - 2024-02-22 00:13:16.043486 - Playing url (dash true,  hasHls ? false)  https://my.private.domain/api/manifest/dash/id/ov_7HT8bbX4 
[INFO] [Service] - 2024-02-22 00:13:16.046111 - calling https://xxxxxxxxxx/api/v1/auth/subscriptions 
[INFO] [Service] - 2024-02-22 00:13:16.164143 - Response from GET https://xxxxxxxxxx/api/v1/auth/playlists, status: 200 
[INFO] [Service] - 2024-02-22 00:13:16.189021 - Response from GET https://xxxxxxxxxx/api/v1/auth/subscriptions, status: 200 
[INFO] [Service] - 2024-02-22 00:13:16.195226 - Response from GET https://xxxxxxxxxx/api/v1/auth/subscriptions, status: 200 
[INFO] [PlayerControlControllers] - 2024-02-22 00:13:19.056789 - Hiding controls false

The URL https://my.private.domain/api/manifest/dash/id/ov_7HT8bbX4 returns a .bin file for the video which looks valid as far as I can tell (at least not different to the files served by public instances).

If anyone knows a solution or a promising approach, let me know!

jhlee2222 commented 6 months ago

I have a variation of this issue. Though videos play just fine from Clipious, thumbnails are as others describe, with a !. I am accessing a local instance of Invidious on a server in my home. Using the web UI on various machines, Invidious appears fine. I'm a bit unsure of how to alter the config. I set Invidious up using docker compose. Below is my Docker Compose yml:

version: "3"
services:

  invidious:
    image: quay.io/invidious/invidious:latest
    # image: quay.io/invidious/invidious:latest-arm64 # ARM64/AArch64 devices
    restart: unless-stopped
    ports:
      - "3000:3000"
    environment:
      # Please read the following file for a comprehensive list of all available
      # configuration options and their associated syntax:
      # https://github.com/iv-org/invidious/blob/master/config/config.example.yml
      INVIDIOUS_CONFIG: |
        db:
          dbname: invidious
          user: kemal
          password: kemal
          host: invidious-db
          port: 5432
        check_tables: true
        # external_port:
        # domain:
        # https_only: false
        # statistics_enabled: false
        hmac_key: "don'twanttolistitinapost"
    healthcheck:
      test: wget -nv --tries=1 --spider http://127.0.0.1:3000/api/v1/comments/jNQXAC9IVRw || exit 1
      interval: 30s
      timeout: 5s
      retries: 2
    logging:
      options:
        max-size: "1G"
        max-file: "4"
    depends_on:
      - invidious-db

  invidious-db:
    image: docker.io/library/postgres:14
    restart: unless-stopped
    volumes:
      - postgresdata:/var/lib/postgresql/data
      - ./config/sql:/config/sql
      - ./docker/init-invidious-db.sh:/docker-entrypoint-initdb.d/init-invidious-db.sh
    environment:
      POSTGRES_DB: invidious
      POSTGRES_USER: kemal
      POSTGRES_PASSWORD: kemal
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]

volumes:
  postgresdata:

I know this is honestly troubleshooting my Invidious setup. However, I suspect many of your users are going to be using the same template to set up their own instances. If anyone can advise on what to change in the above so config is set properly to resolve the issue with thumbnails, I would greatly appreciate the help.

lamarios commented 6 months ago

For the thumbnails to work the api needs to return the full path of it. (see wiki page about it). I believe your config is missing the external port and domain so that invidious know was to put in for the full path of the thumbnails. I believe it can be just an ip address and default port.

jhlee2222 commented 6 months ago

@lamarios , Thank You! I was able to isolate the config section and fix it. For anyone needing specifics, refer back to my example docker-compose.yml, and pay attention to these two lines:

        # external_port:
        # domain:

Edit them to uncomment and populate them as follows with your info:

        external_port: 80
        domain: <Your_Host_IP>:<Your_Host_Port>

For the domain, it will be in the format with no leading "http(s)//:". For example:

domain: 192.168.1.1:3000

Your external port may vary if you're using https, but for those of us using bare-bones, local setups, it will likely be 80. Sorry if I'm seeming to dumb it down too much, but some users like myself sort of need it spelled out like this.

lamarios commented 6 months ago

This is documented in the wiki as well :)