Skip to content

Commit 22d873c

Browse files
committed
feat: add deovr plugin for jellyfin
1 parent b005ea3 commit 22d873c

File tree

4 files changed

+104
-0
lines changed

4 files changed

+104
-0
lines changed

Taskfile.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,32 @@ tasks:
3333
GOSS_OPTS: --retry-timeout 15s --sleep 2s --color --format documentation
3434
GOSS_FILE: ./apps/{{.APP}}/ci/goss.yaml
3535

36+
test-x64:
37+
desc: |-
38+
task APP=<app> CHANNEL=<channel> BASE=<true/false> test
39+
cmds:
40+
- task: download-goss
41+
- >-
42+
echo "VERSION: {{.VERSION}}"
43+
- >-
44+
cue vet --schema '#Spec' ./apps/{{.APP}}/metadata.json metadata.rules.cue
45+
- >-
46+
docker buildx build --platform linux/amd64 --progress=plain --load
47+
-t {{.APP}}:{{.CHANNEL}}
48+
--build-arg CHANNEL={{.CHANNEL}}
49+
--build-arg VERSION={{.VERSION}}
50+
-f ./apps/{{.APP}}/Dockerfile .
51+
- >-
52+
./.goss/dgoss run {{.APP}}:{{.CHANNEL}} {{if eq .BASE "true"}}tail -f /dev/null{{end}}
53+
vars:
54+
VERSION:
55+
sh: bash ./.github/scripts/upstream.sh "{{.APP}}" "{{.CHANNEL}}"
56+
env:
57+
CONTAINER_RUNTIME: docker
58+
GOSS_PATH: ./.goss/goss
59+
GOSS_OPTS: --retry-timeout 15s --sleep 2s --color --format documentation
60+
GOSS_FILE: ./apps/{{.APP}}/ci/goss.yaml
61+
3662
test-push:
3763
silent: true
3864
desc: |-

apps/jellyfin/Dockerfile

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS deovr-plugin-builder
2+
3+
RUN apt-get update && \
4+
apt-get install -y \
5+
wget \
6+
curl \
7+
unzip \
8+
jq \
9+
&& rm -rf /var/lib/apt/lists/*
10+
11+
RUN set -ex && \
12+
version=$(curl -s https://api.github.com/repos/iPromKnight/DeoVRDeeplink/releases/latest | jq -r .tag_name) && \
13+
version="${version#v}" && \
14+
wget -q "https://github.com/iPromKnight/DeoVRDeeplink/archive/refs/tags/v${version}.zip" -O /tmp/plugin.zip && \
15+
unzip -q /tmp/plugin.zip -d /tmp && \
16+
mkdir -p /src /artifacts && \
17+
cp -r /tmp/DeoVRDeeplink-${version}/* /src/
18+
19+
RUN dotnet build --configuration Release --output /artifacts /src/DeoVRDeeplink/DeoVRDeeplink.csproj
20+
21+
# Stage 2: Final image
22+
FROM jellyfin/jellyfin:latest
23+
COPY --from=builder /src/bin/Release/net7.0/DeoVRDeeplink.dll /opt/plugins/DeoVRDeeplink/DeoVRDeeplink.dll
24+
125
FROM ghcr.io/ipromknight/ubuntu:rolling
226

327
ARG TARGETPLATFORM
@@ -10,6 +34,9 @@ ENV NVIDIA_DRIVER_CAPABILITIES="compute,video,utility"
1034
# Disable glibc dynamic heap adjustment
1135
ENV MALLOC_TRIM_THRESHOLD_=131072
1236

37+
# Disable file locking in .NET Core
38+
ENV DOTNET_SYSTEM_IO_DISABLEFILELOCKING="true"
39+
1340
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
1441

1542
# Replace malloc with jemalloc
@@ -57,6 +84,9 @@ ENV LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libjemalloc.so.2"
5784

5885
USER 568
5986

87+
88+
COPY --from=deovr-plugin-builder /artifacts/DeoVRDeeplink.dll /opt/plugins/DeoVRDeeplink/DeoVRDeeplink.dll
89+
6090
COPY --chmod=0755 ./apps/jellyfin/promknight-entrypoint.sh /promknight-entrypoint.sh
6191

6292
LABEL org.opencontainers.image.source="https://github.com/jellyfin/jellyfin"

apps/jellyfin/README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Custom Jellyfin with Jemalloc
2+
3+
This is a custom Jellyfin image that uses Jemalloc as the memory allocator. It is based on the official Jellyfin image but includes Jemalloc for improved memory management.
4+
5+
Also included is the DeoVRDeeplink deepling plugin by `Toastyice` from (here)[https://github.com/Toastyice/DeoVRDeeplink].
6+
7+
---
8+
9+
## What is Jemalloc?
10+
Jemalloc is a general-purpose memory allocator that emphasizes fragmentation avoidance and scalable concurrency support.
11+
It is designed to be efficient in multi-threaded applications, making it suitable for high-performance environments like Jellyfin.
12+
13+
---
14+
15+
## What is DeoVRDeeplink?
16+
17+
DeoVR Deeplink Proxy Plugin for Jellyfin
18+
19+
> [!CAUTION]
20+
> All movies are exposed UNAUTHENTICATED from DeoVRDeeplink/json/videoID/response.json
21+
22+
A plugin for Jellyfin that enables secure, expiring, signed video stream URLs for use with [DeoVR](https://deovr.com/) and other clients needing quick access to individual media files without exposing your Jellyfin credentials.
23+
24+
## Features
25+
- **UI Changes:** adds a Play in DeoVR button
26+
- **Secure signed links:** Temporary, HMAC-signed links for proxying video streams.
27+
- **Expiry enforcement:** Links are only valid for a short time window.
28+
- **Chunked proxy streaming:** Efficient forwarding without direct Jellyfin API exposure.
29+
- **DeoVR-compatible JSON responses:** Works seamlessly with [DeoVR](https://deovr.com/).
30+
- **Embedded client JS and icon resources.**
31+
32+
---
33+
34+
## Usage
35+
To enable the VR plugin to be copied into the plugins directory and activated on boot, set the following env var
36+
```yaml
37+
ENABLE_DEOVR_PLUGIN: true
38+
```

apps/jellyfin/promknight-entrypoint.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,16 @@ cat << "EOF"
2121
2222
EOF
2323

24+
if [[ "$ENABLE_DEOVR_PLUGIN" == "true" ]]; then
25+
echo "Enabling DeoVRDeeplink plugin"
26+
mkdir -p /config/plugins/DeoVRDeeplink
27+
cp /opt/plugins/DeoVRDeeplink/DeoVRDeeplink.dll /config/plugins/DeoVRDeeplink/
28+
else
29+
echo "Skipping DeoVR plugin"
30+
fi
31+
32+
echo ""
33+
2434
exec \
2535
/usr/bin/jellyfin \
2636
--ffmpeg="/usr/lib/jellyfin-ffmpeg/ffmpeg" \

0 commit comments

Comments
 (0)