打造私人影院
分享使用 OpenWRT + Alist(百度网盘) + Jellyfin + TinyMediaManager 打造的私人影院,这不是一个 step-by-step 的教程,而是一些 Gist + 成果展示的分享,更多搭建过程参考结尾的#参考文章
Windows 挂载 Alist webdav 到本地盘符,给 TMM 搜刮
修改注册表 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters
把 BasicAuthLevel
设置为 2
- 0 = Basic authentication is disabled
- 1 = Basic authentication is enabled for SSL web sites only
- 2 = Basic authentication is enabled for SSL and non-SSL web sites
windows powershell $ net stop webclient
windows powershell $ net start webclient
windows powershell $ net use Z: http://192.168.1.1@5244/dav
Router 版本信息
router $ ubus call system board
{
"kernel": "5.15.148",
"hostname": "OpenWrt",
"system": "ARMv8 Processor rev 4",
"model": "FriendlyElec NanoPi R4S",
"board_name": "friendlyarm,nanopi-r4s",
"rootfs_type": "squashfs",
"release": {
"distribution": "1004",
"version": "23.05-SNAPSHOT",
"revision": "02.12.2024",
"target": "rockchip/armv8",
"description": "OpenWrt 02.12.2024 by Kiddin'"
}
}
rclone 挂载Alist webdav 中的百度网盘的命令
router $ rclone mount alist:/baidu1 /mnt/baidu1 \
--vfs-cache-mode writes \
--vfs-cache-max-size 1024M \
--cache-dir /mnt/mmcblk1p3/mnt_baidu1_cache \
--header "Referer:https://pan.baidu.com/" \
--header "User-Agent:pan.baidu.com" \
--daemon
Docker 启动 Jellyfin Server
router $ docker run -d \
--name=jellyfin \
--hostname=jellyfin \
--pull=always \
--privileged \
--volume /mnt/mmcblk1p3/jellyfin/config:/config \
--volume /mnt/mmcblk1p3/jellyfin/cache:/cache \
--volume /mnt/baidu1:/media/baidu1 \
--net=host \
--restart=unless-stopped \
jellyfin/jellyfin
添加自启动脚本
router $ cat /etc/init.d/zz-b-jellyfin
#!/bin/sh /etc/rc.common
START=99
# :!: If multiple init scripts have the same start value, the call order is determined by the alphabetical order of the init script's names.
STOP=0
start() {
echo "start jellyfin"
/usr/bin/rclone \
--config /root/.config/rclone/rclone.conf \
mount alist:/baidu1 /mnt/baidu1 \
--vfs-cache-mode writes \
--vfs-cache-max-size 1024M \
--cache-dir /mnt/mmcblk1p3/mnt_baidu1_cache \
--header "Referer:https://pan.baidu.com/" \
--header "User-Agent:pan.baidu.com" \
--allow-non-empty --daemon
docker start jellyfin
}
stop() {
echo "stop jellyfin"
docker stop jellyfin
/usr/bin/umount /mnt/baidu1
}
router $ chmod a+x /etc/init.d/zz-b-jellyfin
router $ /etc/init.d/zz-b-jellyfin enable
Jellyfin Server 版本信息
router $ docker logs jellyfin | head -n 11
[17:45:10] [INF] [1] Main: Jellyfin version: 10.8.13
[17:45:10] [INF] [1] Main: Environment Variables: ["[DOTNET_SYSTEM_GLOBALIZATION_INVARIANT, 1]", "[JELLYFIN_DATA_DIR, /config]", "[JELLYFIN_CACHE_DIR, /cache]", "[JELLYFIN_FFMPEG, /usr/lib/jellyfin-ffmpeg/ffmpeg]", "[JELLYFIN_LOG_DIR, /config/log]", "[JELLYFIN_WEB_DIR, /jellyfin/jellyfin-web]", "[JELLYFIN_CONFIG_DIR, /config/config]"]
[17:45:10] [INF] [1] Main: Arguments: ["/jellyfin/jellyfin.dll"]
[17:45:10] [INF] [1] Main: Operating system: Linux
[17:45:10] [INF] [1] Main: Architecture: Arm64
[17:45:10] [INF] [1] Main: 64-Bit Process: True
[17:45:10] [INF] [1] Main: User Interactive: True
[17:45:10] [INF] [1] Main: Processor count: 6
[17:45:10] [INF] [1] Main: Program data path: /config
[17:45:10] [INF] [1] Main: Web resources path: /jellyfin/jellyfin-web
[17:45:10] [INF] [1] Main: Application directory: /jellyfin/