Jellyfin Forum
Play back error on Google Cloud shell web preview - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: Play back error on Google Cloud shell web preview (/t-play-back-error-on-google-cloud-shell-web-preview)



Play back error on Google Cloud shell web preview - JsonMetadata - 2024-02-08

Hi,

I'm just trying to get Jellyfin to work on Google Cloud Shell web preview on mobile browsers. I've installed Jellyfin in an Ubuntu 22.04.3 LTS docker container in the Google Cloud shell. It works fine and I can play the direct video without transcoding on both a desktop browser and a mobile browser. However, if I choose a different quality other than the direct video (transcoding) it only works on a desktop browser (chrome). In the mobile browser, I get a "Playback error" after switching between play and pause for a few seconds automatically, as shown in the image.

   

This only happens if I use the Google Cloud shell default web preview on mobile browsers (Chrome/Firefox). If I use a Cloudflare tunnel and play the same video with transcoding, it works perfectly fine. So I thought that this might be some kind of limitation in the Google cloud shell web preview. Then I used the web preview within the docker container itself on Chrome and played the video with transcoding and surprisingly it worked.
This is not an issue with ffmpeg or anything since the transcoding seems to be working when used on the desktop. There's no ffmpeg log if I use it in a mobile browser with the web preview. I've even tried the official Jellyfin docker container and it had the same issue. I've tried Jellyfin:10.7.7 and it had the same issue. With Jellyfin:10.0.0 it doesn't even show an error message, it just keeps switching between play and pause before entirely freezing the page. I've tried using nginx and socat as a reverse proxy but the issue remained.
I think that this is a problem with the web client, it only happens in this particular scenario and only in mobile browsers. To further prove that this isn't an issue with the Google Cloud shell web preview, I tried the latest bare-bone Emby Server and it works without any issues. My only issue is that I prefer the UI of the Jellyfin and a few other features it has over Emby. I need to get the Jellyfin working so badly. My argument is that if the Emby works without any issues then there should be a way to get the Jellyfin working as well. I appreciate your help. I could continue to use a Cloudflare tunnel but Google Cloud Shell automatically gets shutdown after one hour of inactivity if I don't use the default web preview.

In another GitHub issue, I saw someone had a similar issue and it was because the web client sends a "DELETE [...]/ActiveEncodings" request as soon as it requests the transcoding. I am not sure if this is what's happening in my case. I can see a similarity between my Jellyfin log file and his log file. But the solution that was suggested didn't work for me. 
https://github.com/jellyfin/jellyfin-web/issues/5039

I'm not a programmer or something but is there something that I can edit in the web client files to fix this? Like a JS file or something? In what kinda situations is this playback error caused in the first place?

Since the Google Cloud shell is completely free you should be able to test this for yourself and see what's going on. Below are the commands that I've used.

# URL :
https://shell.cloud.google.com

# Commands :
Code:
mkdir /tmp/movies;wget -O "/tmp/movies/Super Mario Bros.ts" "https://www.dropbox.com/scl/fi/8hv36if9oj2g0y41rns69/Watch-Free-The-Super-Mario-Bros.-Movie-Full-Movies-Online-HD.ts?rlkey=m1dxv6h2m5ftgvrkskndypt8q&dl=1";docker run -it -p 8096:8096 -v /tmp/movies:/home/movies jellyfin/jellyfin

I would appreciate it if someone could try this by himself.
I've used the Kiwi browser to get developer tools on Android. In there, you can see the below error message in the console.

       

I've attached the Jellyfin log file below. 

# Jellyfin log before using Cloudflare tunnel (Google Cloud shell web preview)

.txt   log_20240208_before.txt (Size: 23.89 KB / Downloads: 19)

# Jellyfin log after using Cloudflare tunnel

.txt   log_20240208_after.txt (Size: 95.93 KB / Downloads: 21)

# ffmpeg logs ( none / not relevant )

Btw I'm a newbie to Linux.

Have a nice day!


RE: Play back error on Google Cloud shell web preview - TheDreadPirate - 2024-02-08

I guess we should backup a bit. Google Cloud Shell is not meant to run a service out of it. Which you found out with the one hour inactivity issue. There are too many unknowns about what Google is doing that might be affecting how transcoding behaves that the CF tunnel is just masking, somehow. 90% certain that it is due to NAT issues since it looks like you only have private IPs in a Google Cloud Shell. Which a CF tunnel would help workaround, but not resolve.

If your goal is to run Jellyfin reliably, you need to move to another platform. There are cheap VPS services all over the place, you can use an old PC/laptop. Heck, I don't recommend it, but you can use a RPi if you don't need transcoding (but please avoid using an RPi).

Are any of these an option? All of them are better than a free Google Cloud Shell.