immich-app / immich

High performance self-hosted photo and video management solution.
https://immich.app
GNU Affero General Public License v3.0
39k stars 1.84k forks source link

Large video streaming is slow #9568

Open justin13888 opened 1 month ago

justin13888 commented 1 month ago

The bug

I often record videos with highest possible settings on my phone. For example, a 18 second video might be 300 MiB. The problem is that i can't watch any of these videos once uploaded and deleted from device because videos seem to be downloaded completely before they could be watched.

If that's the case, I think it's a huge feature to be able to stream segments of the video instead (also saves on mobile data bandwidth). I'd be interested in working on this because I have a related video streaming service I'm working on.

P.S. I couldn't find a related issue for this hence I'm opening this because it's something I hope to improve on if necessary.

The OS that Immich Server is running on

Ubuntu 22.04

Version of Immich Server

v1.105.1

Version of Immich Mobile App

v1.105.0 build.139

Platform with the issue

Your docker-compose.yml content

N/A

Your .env content

N/A

Reproduction steps

Just watch any video that is hundred of megabytes

Relevant log output

No response

Additional information

No response

bo0tzz commented 1 month ago

Have you changed any of the transcoding settings?

justin13888 commented 1 month ago

I can't tell by the GUI if they're changed but I don't think I touched them (see below):

image image

I'm running immich following the docker compose method. Server uses a NVIDIA RTX 4070 Ti and runs on Ubuntu 22.04 with a recent Nvidia proprietary drivers. Confident hardware acceleration is functioning as expected.

Oh also I should clarify my use of words in that by slow, i mean that seeking has a 10-15 second delay.

I guess my question is if it's just that slow or could I configure it to speed up a bit.

justin13888 commented 1 month ago

Source file is 4K60 HEVC (idr the bitrate nor profile)

alextran1502 commented 1 month ago

I can't tell by the GUI if they're changed but I don't think I touched them (see below):

You did change the default config; I am not sure which settings you changed that caused the issue. Can you scroll a bit from your screenshot, then click on restore to default and rerun the video transcoding job for all again?

image

Let us know if the default config help

Thinkscape commented 1 month ago

Here's a bit more complete technical suggestion and discussion: https://github.com/immich-app/immich/discussions/9255

Thinkscape commented 1 month ago

Unfortunately team decided to downgrade it to nice to have 😢

alextran1502 commented 1 month ago

@Thinkscape nice to have is applied to the said feature request, not about this bug/inconvenience.