跳到主要内容

家庭影院服务:Jellyfin

概述

如果需要在家中搭建一个家庭影院,Jellyfin 是一个不错的选择。它是一个免费的软件,可以让你在家中的任何设备上观看你的媒体文件。只要将视频文件放入指定目录下,它可以自动搜刮相关的海报、简介等信息,可以在各种设备上播放,包括电视、手机、平板电脑等,所有平台都可以同步播放记录和进度,自动接着之前没看完的继续看。

开源项目

Jellyfin 的项目地址是:https://github.com/jellyfin/jellyfin

目录结构

jellyfin
├── daemonset.yaml
└── kustomization.yaml

配置 daemonset.yaml

daemonset.yaml
apiVersion: apps/v1
kind: DaemonSet
metadata:
labels:
app: jellyfin
name: jellyfin
namespace: default
spec:
selector:
matchLabels:
app: jellyfin
template:
metadata:
labels:
app: jellyfin
spec:
terminationGracePeriodSeconds: 1
containers:
- image: jellyfin/jellyfin:latest
imagePullPolicy: IfNotPresent
name: jellyfin
resources:
limits:
cpu: "1"
memory: 1Gi
requests:
cpu: 1m
memory: 16Mi
env:
- name: TZ
value: Asia/Shanghai
securityContext:
runAsUser: 0
runAsGroup: 0
privileged: true
volumeMounts:
- mountPath: /dev/dri
name: dri
- mountPath: /data/media
name: media
- mountPath: /config
name: config
- mountPath: /cache
name: cache
dnsPolicy: Default
hostNetwork: true
restartPolicy: Always
volumes:
- name: dri
hostPath:
path: /dev/dri
- name: config
hostPath:
path: /data/jellyfin/config
type: DirectoryOrCreate
- name: cache
hostPath:
path: /data/jellyfin/cache
type: DirectoryOrCreate
- name: media
hostPath:
path: /data/media
type: DirectoryOrCreate
updateStrategy:
rollingUpdate:
maxSurge: 0
maxUnavailable: 1
type: RollingUpdate

配置 kustomization.yaml

kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- daemonset.yaml

namespace: default

访问 Jellyfin

访问入口:http://路由器内网 IP:8096/

安装豆瓣刮削器

刮削器在国内还是用豆瓣的数据更好点,可以在登录 Jellyfin 后安装这个插件: https://github.com/cxfksword/jellyfin-plugin-metashark