野火电子论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 420|回复: 2

[经验\资料] 使用鲁班猫4玩转Jellyfin支持硬件视频转码

[复制链接]
发表于 2023-12-21 14:06:13 | 显示全部楼层 |阅读模式
本帖最后由 fuoo~ 于 2023-12-21 14:30 编辑

Debian & Ubuntu 安装docker
鲁班猫4 rk588s
镜像使用Ubuntu22.04 server和桌面版都可以,



开始工作,先安装dockers
卸载旧版本
旧版本的 Docker 被称为docker,docker.io或docker-engine. 如果安装了这些,请卸载它们:
  1. sudo apt-get remove docker docker-engine docker.io containerd runc
复制代码
设置存储库
更新apt包索引并安装包以允许apt通过 HTTPS 使用存储库:
  1. sudo apt-get update -y
  2. sudo apt-get install -y ca-certificates curl gnupg lsb-release
复制代码
添加 Docker 的官方 GPG 密钥:
  1. sudo mkdir -p /etc/apt/keyrings
  2. curl -fsSL <a href="https://download.docker.com/linux/ubuntu/gpg" target="_blank">https://download.docker.com/linux/ubuntu/gpg</a> | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
复制代码
使用以下命令设置存储库:
  1. echo \
  2. "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] <a href="https://download.docker.com/linux/ubuntu" target="_blank">https://download.docker.com/linux/ubuntu</a> \
  3. $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
复制代码
安装 Docker
更新apt包索引,安装最新版本的 Docker Engine、containerd 和 Docker Compose,或者进入下一步安装特定版本:
  1. sudo apt-get update
  2. sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin
复制代码
hello-world 通过运行映像来验证 Docker 引擎是否已正确安装。
  1. sudo docker run hello-world
复制代码
示例输出验证
  1. $ sudo docker run hello-world

  2. Hello from Docker!
  3. This message shows that your installation appears to be working correctly.

  4. To generate this message, Docker took the following steps:
  5. 1. The Docker client contacted the Docker daemon.
  6. 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
  7.     (amd64)
  8. 3. The Docker daemon created a new container from that image which runs the
  9.     executable that produces the output you are currently reading.
  10. 4. The Docker daemon streamed that output to the Docker client, which sent it
  11.     to your terminal.

  12. To try something more ambitious, you can run an Ubuntu container with:
  13. $ docker run -it ubuntu bash

  14. Share images, automate workflows, and more with a free Docker ID:
  15. <a href="https://hub.docker.com/" target="_blank">https://hub.docker.com/</a>

  16. For more examples and ideas, visit:
  17. <a href="https://docs.docker.com/get-started/" target="_blank">https://docs.docker.com/get-started/</a>


  18. $ sudo docker images hello-world
  19. REPOSITORY   TAG     IMAGE ID      SIZE
  20. hello-world  latest  feb5d9fea6a5  13256
复制代码
跑到这里就验证成功了。

玩转Jellyfin

首先特别感谢nyanmisakahttps://github.com/nyanmisaka 支持了RK3588平台在Jellyfin中支持的视频硬件 具体详见:https://www.bilibili.com/read/cv28664442

开始工作

docker创建jellyfin  执行命令:
  1. sudo docker pull nyanmisaka/jellyfin:latest-rockchip
复制代码

以上安装完成,接着执行下面代码:
  1. sudo docker run -d \
  2. --name jellyfin \
  3. --privileged \
  4. --net=host \
  5. --restart=unless-stopped \
  6. --volume /path/to/config:/config \
  7. --volume /path/to/cache:/cache \
  8. --volume /path/to/media:/media \
  9. `for dev in dri dma_heap mali0 rga mpp_service \
  10. iep mpp-service vpu_service vpu-service \
  11. hevc_service hevc-service rkvdec rkvenc vepu h265e ; do \
  12. [ -e "/dev/$dev" ] && echo " --device /dev/$dev"; \
  13. done` \
  14. nyanmisaka/jellyfin:latest-rockchip
复制代码
以上都执行成功后表示安装成功


检测自己鲁班猫4的ip地址是多少,就在网站输入:自己ip:8096 回车,设置好了,剩下步骤我就不一个说了
接着测试rk3588的转码能力吧~
附图:

企业微信截图_1703120564361.png
全部打开。。。


企业微信截图_17031223369754.png
想不到吧?转码帧率:327fps

企业微信截图_17031226125204.png
接着拉2条,转码帧率:302fps

还特意试了下我自己服务器上的tesla p4
企业微信截图_17031401542540.png
转码帧率:161fps
额。。真的不如rk3588s的rkmpp转码强。。。

好了差不多到这里了。



回复

使用道具 举报

发表于 2023-12-22 17:36:56 | 显示全部楼层
学到了,真不错
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

联系站长|手机版|野火电子官网|野火淘宝店铺|野火电子论坛 ( 粤ICP备14069197号 ) 大学生ARM嵌入式2群

GMT+8, 2024-4-28 21:51 , Processed in 0.188189 second(s), 28 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表