Videos losing audio after ~20s of streaming on iOS app
I've noticed that, on a lot of my videos, when I stream them on the iOS app, the audio will cut out after around 20s of viewing. Pausing and resuming the video will bring it back, but the same thing happens after another 20s. This only happens when streaming the video from the server. If the exact same video is present on device it plays just fine. I also tested this on android, but no issues there. If I force a transcode to be generated for the video, the problem goes away (which is my temporary solution, but not ideal, especially because a lot of these videos are deemed "compatible" even under the very conservative default transcoding settings).
To debug this i've ffprobed 2 videos that exhibit this problem. I don't see anything that should prevent it from being compatible, especially the first video, but I'm no expert in video formats by any stretch. Any help would be appreciated!
Edit: seems to be reverse proxy and/or ssl related
14 Replies
:wave: Hey @goalie2002,
Thanks for reaching out to us. Please carefully read this message and follow the recommended actions. This will help us be more effective in our support effort and leave more time for building Immich :immich:.
References
- Container Logs:
docker compose logs docs
- Container Status: docker ps -a docs
- Reverse Proxy: https://immich.app/docs/administration/reverse-proxy
- Code Formatting https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline#h_01GY0DAKGXDEHE263BCAYEGFJA
Checklist
I have...
1. :ballot_box_with_check: verified I'm on the latest release(note that mobile app releases may take some time).
2. :ballot_box_with_check: read applicable release notes.
3. :ballot_box_with_check: reviewed the FAQs for known issues.
4. :ballot_box_with_check: reviewed Github for known issues.
5. :ballot_box_with_check: tried accessing Immich via local ip (without a custom reverse proxy).
6. :ballot_box_with_check: uploaded the relevant information (see below).
7. :ballot_box_with_check: tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable
(an item can be marked as "complete" by reacting with the appropriate number)
Information
In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider:
- Your docker-compose.yml and .env files.
- Logs from all the containers and their status (see above).
- All the troubleshooting steps you've tried so far.
- Any recent changes you've made to Immich or your system.
- Details about your system (both software/OS and hardware).
- Details about your storage (filesystems, type of disks, output of commands like fdisk -l and df -h).
- The version of the Immich server, mobile app, and other relevant pieces.
- Any other information that you think might be relevant.
Please paste files and logs with proper code formatting, and especially avoid blurry screenshots.
Without the right information we can't work out what the problem is. Help us help you ;)
If this ticket can be closed you can use the /close command, and re-open it later if needed.Thanks to the bot I was reminded to try without a reverse proxy. lo and behold, I don't see the issue anymore. There's still a fairly consistent app crash after 1-2 mins of video playback 😂 (I've observed this with the reverse proxy too), but I digress. Here are my config files, maybe there's something obvious I missed
Successfully submitted, a tag has been added to inform contributors. :white_check_mark:
mobile logs (on reverse proxy)
A few things I've tried so far:
1. set up a fresh immich install with the stock docker compose.
2. set up the stock reverse proxy config from the docs (http). it works fine with http.
3. added ssl to the stock config (listen 443 ssl; and the ssl cert lines), the issue is back.
so an ssl issue?
It sounds to me like you need larger filesizes/timeouts for your proxy @goalie2002
5 minutes is pretty long though 🤔
might be the app itself that's timing out after 20 seconds here, for whatever reason
You can literally see it here:
"pingTimeout":20000
@shenlong-tanwen any ideas? Proxy config looks good to meThis is for the websocket connection. The logs from the video player will not show up on the logs view as they are from the native side. @goalie2002 Do you have an Apple development setup? We can run the debug version of the app, play a video and can see if there's anything there on the native log that is useful to troubleshoot the issue
sorry for the slow response, I’m currently on a mini vacation. I don’t have an apple development setup, but I’d be happy to set one up (I do have a Mac available). Is there a cost associated with it (I know apple likes to put things behind paywalls)? I’ll be back home in about 2-3 days, then I can do some more debugging
It has it’s restrictions, but you can run your own app on your own device without subscribing to the developer programme
Enjoy your vacation!
I've got the iphone simulator set up with the debug build of the app (v2.2.3 tag since main wasn't working for me). any pointers where i should look to find relevant logs?
at first glance I get these logs a few seconds before the audio cuts out
Can you try enabling the
proxy_force_ranges directive in the proxy conf?added
proxy_force_ranges on; to my nginx config and no change, still the exact same logs.
something I didn't notice previously: I get constant spam of nw_socket_set_connection_idle [C3.1.1:3] setsockopt SO_CONNECTION_IDLE failed [42: Protocol not available] when streaming video. and 10 seconds after the audioMentor log, I get this: HTTP/2 terminating broken Connection 6, last success 24083s ago, consecutive failures 11. both of those also happen on transcoded videos, which play fine, so could just be nothing.:monkaHmm: Can you share one such file with the issue? I'll see if I can reproduce this from my end
Sure, I’ll find something that doesn’t have any personal info on it
DMed you a video