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

Video on android not working #8037

Closed
1 of 3 tasks
davidezanella opened this issue Mar 18, 2024 · 13 comments
Closed
1 of 3 tasks

Video on android not working #8037

davidezanella opened this issue Mar 18, 2024 · 13 comments

Comments

@davidezanella
Copy link

The bug

On mobile android app, when trying to play a video stored only on server side, initially a get a loading spinner, but after some seconds I get a completely black screen. This is the error log reported by the app:

#1      AsyncError.value (package:riverpod/src/common.dart:473:0)
#2      VideoViewerPage.build (package:immich_mobile/modules/asset_viewer/views/video_viewer_page.dart:37:0)
#3      _ConsumerState.build (package:flutter_riverpod/src/consumer.dart:479:0)
#4      StatefulElement.build (package:flutter/src/widgets/framework.dart:5583:0)
#5      ConsumerStatefulElement.build (package:flutter_riverpod/src/consumer.dart:542:0)
#6      HookElement.build (package:flutter_hooks/src/framework.dart:438:0)
#7      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5471:0)
#8      StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5634:0)
#9      Element.rebuild (package:flutter/src/widgets/framework.dart:5187:0)
#10     BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2895:0)
#11     WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:984:0)
#12     RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:457:0)
#13     SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1325:0)
#14     SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1255:0)
#15     SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1113:0)
#16     _invoke (dart:ui/hooks.dart:312:0)
#17     PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:383:0)
#18     _drawFrame (dart:ui/hooks.dart:283:0)

The OS that Immich Server is running on

debian

Version of Immich Server

v1.98.2

Version of Immich Mobile App

v1.98.2

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

apk problem

Your .env content

apk problem

Reproduction steps

1. Have a video only stored on the server side
2. Try to play that video from mobile

Additional information

No response

@alextran1502
Copy link
Contributor

Hello, do you use the default transcoding options and if you can share the problem video with us so we can reproduce and troubleshoot?

@davidezanella
Copy link
Author

Yes, I'm using the default video transcoding, without hardware transcoding. It's not a video related problem since it happens on every video that I don't have downloaded on the phone but it's stored only server-side. From PC browser the videos are properly playing.

@alextran1502
Copy link
Contributor

I cannot recreate the issue you are facing with my dataset, so I think it might be a certain type of video that is causing the bug, thus the request for your video.

@davidezanella
Copy link
Author

I've just took a random video with my phone, uploaded using the PC and was able to reproduce the problem. I'm not sure if it is related to my configuration at this point. I think that it stopped working some versions ago of immich.

V_20240318_152128_ES5.mp4

@alextran1502
Copy link
Contributor

I can play the video just fine from my end on the mobile app and on the web. Can you go to the Administration > Settings page, then click on the Export JSON and compare it with my default settings for ffmpeg section?

  "ffmpeg": {
    "crf": 23,
    "threads": 0,
    "preset": "ultrafast",
    "targetVideoCodec": "h264",
    "acceptedVideoCodecs": [
      "h264"
    ],
    "targetAudioCodec": "aac",
    "acceptedAudioCodecs": [
      "aac",
      "mp3",
      "libopus"
    ],
    "targetResolution": "720",
    "maxBitrate": "0",
    "bframes": -1,
    "refs": 0,
    "gopSize": 0,
    "npl": 0,
    "temporalAQ": false,
    "cqMode": "auto",
    "twoPass": false,
    "preferredHwDevice": "auto",
    "transcode": "required",
    "tonemap": "hable",
    "accel": "disabled"
  },

@davidezanella
Copy link
Author

Looks exactly the same as yours:

"ffmpeg": {
    "crf": 23,
    "threads": 0,
    "preset": "ultrafast",
    "targetVideoCodec": "h264",
    "acceptedVideoCodecs": [
      "h264"
    ],
    "targetAudioCodec": "aac",
    "acceptedAudioCodecs": [
      "aac",
      "mp3",
      "libopus"
    ],
    "targetResolution": "720",
    "maxBitrate": "0",
    "bframes": -1,
    "refs": 0,
    "gopSize": 0,
    "npl": 0,
    "temporalAQ": false,
    "cqMode": "auto",
    "twoPass": false,
    "preferredHwDevice": "auto",
    "transcode": "required",
    "tonemap": "hable",
    "accel": "disabled"
  },

@alextran1502
Copy link
Contributor

Are you accessing your instance over Local IP or DNS/Reverse Proxy?

@davidezanella
Copy link
Author

Local IP over https using a self-signed certificate.

@alextran1502
Copy link
Contributor

Can you access over local IP, http, without self-signed certificate?

@davidezanella
Copy link
Author

Just tried and it was working fine, so it must be self-signed certificate related. Moreover, when re-configuring the app using https to restore my original configuration, the app got stuck during the configuration phase. Closing and re-opening it let it build the timeline but the video playing problem was still there.

@w00tlarr
Copy link

w00tlarr commented Mar 19, 2024

There are numerous reported issues with self signed certs for movies such as issue #5553 and mine #4663

As someone mentioned, flutter has its own cert store so it can't accept self signed unless flutter itself changes that in it's library.

@ktm-91
Copy link

ktm-91 commented Apr 5, 2024

Is this old issue going to be fixed? It makes the app unusable. The problem is also present with a valid Let's Encrypt certificate

@bo0tzz
Copy link
Member

bo0tzz commented Apr 24, 2024

Dupe: #5553

@bo0tzz bo0tzz closed this as not planned Won't fix, can't repro, duplicate, stale Apr 24, 2024
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

No branches or pull requests

5 participants