2024-02-08, 06:56 PM
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 :
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)
log_20240208_before.txt (Size: 23.89 KB / Downloads: 23)
# Jellyfin log after using Cloudflare tunnel
log_20240208_after.txt (Size: 95.93 KB / Downloads: 32)
# ffmpeg logs ( none / not relevant )
Btw I'm a newbie to Linux.
Have a nice day!
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)
log_20240208_before.txt (Size: 23.89 KB / Downloads: 23)
# Jellyfin log after using Cloudflare tunnel
log_20240208_after.txt (Size: 95.93 KB / Downloads: 32)
# ffmpeg logs ( none / not relevant )
Btw I'm a newbie to Linux.
Have a nice day!