| 16 Oct 2024 |
mattleon | In reply to @mackeveli:matrix.org Gotcha, I'll look into some SBCs with those SoCs I've been happy with the orangepi5 (and the 5b, I have both). The 5 supports NVMe, which is miles ahead of SD card. I run frigate on the NPU with hardware decoding and encoding of the video streams, which allows me to run object detection with ~0% cpu usage. | 16:02:09 |
K900 | Note that neither the NPU nor the video stuff works well on mainline yet | 16:02:34 |
K900 | So you will have to deal with vendor kernel nonsense, at least for the time being | 16:02:47 |
mattleon | Vendor kernels are pretty annoying to work with, but the orangepi5 can compile the joshua-riek kernels in about 25 minutes, so it's not too bad. | 16:03:27 |
mattleon | The rk3588 was faster in several real world situations than my laptop with an i7-8565U at 1/8th the power draw at peak, which was mindboggling to me. Storage is quite a bit slower due to older (and fewer) PCIe lanes to the NVMe than on modern x86 | 16:06:06 |
@hexa:lossy.network | sus 😄 | 16:08:25 |
@hexa:lossy.network | but yeah, laptop cores are often potatoes | 16:08:35 |
mattleon | In reply to @hexa:lossy.network but yeah, laptop cores are often potatoes It was fanless, so it throttled down to < 2Ghz after 2 minutes of load | 16:19:18 |
Mackeveli | What I'll likely do is have one board for services that require constant uptime bc my household will use them, like Jellyfin, HASS, and Immich (no ML stuff), then save the other board for less important services that I'll mainly be using. If an Orange Pi 16GB can handle those 3 services (very light usage of Jellyfin) and can run NixOS fairly easily, then I may go with it. mattleon Have you got an example NixOS configuration for your Orange Pi? | 16:20:27 |
K900 | It can handle that fine, as long as you don't want hardware encoding for Jellyfin | 16:21:49 |
mattleon | In reply to @mackeveli:matrix.org What I'll likely do is have one board for services that require constant uptime bc my household will use them, like Jellyfin, HASS, and Immich (no ML stuff), then save the other board for less important services that I'll mainly be using. If an Orange Pi 16GB can handle those 3 services (very light usage of Jellyfin) and can run NixOS fairly easily, then I may go with it. mattleon Have you got an example NixOS configuration for your Orange Pi? This flake is a good starting point, my config is forked from an older version and switched over to the joshua-riek kernel: github.com/ryan4yin/nixos-rk3588 The joshua-riek kernel should support hardware encoding and decoding, though it's a good idea to have someone with an rk3588 board check before you buy (if you give me a source and dest format / ffmpeg line you want to use, happy to give it a shot) | 16:28:48 |
Mackeveli | In reply to @mattleon:matrix.org This flake is a good starting point, my config is forked from an older version and switched over to the joshua-riek kernel: github.com/ryan4yin/nixos-rk3588 The joshua-riek kernel should support hardware encoding and decoding, though it's a good idea to have someone with an rk3588 board check before you buy (if you give me a source and dest format / ffmpeg line you want to use, happy to give it a shot) Thanks, I'll take a look at that flake and do some more research on the Orange Pi to see if I'll pick it up. As for encoding/decoding, I'm not super familiar with the process as I don't tend to use Jellyfin very often or do video editing, but either H264 or AV1 encoding MP4 files seems like a solid start ffmpeg -i input. mp4 -c:v libaom-av1 -strict -2 output.mp4 / ffmpeg -i input.mp4 -c:v libx264 -tune film output.mp4 | 16:57:09 |
K900 | Those are both CPU encoding | 16:57:27 |
@adam:robins.wtf | rpi considered harmful around here :) | 17:44:22 |
mattleon | I spun up a jellyfin container on my orange pi 5 on nixos, and it logged this:
Oct 16 19:03:17 orangutan jellyfin[1380]: [23:03:17] [INF] [4] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Found ffmpeg version 6.0.1
Oct 16 19:03:17 orangutan jellyfin[1380]: [23:03:17] [INF] [4] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Available decoders: ["libdav1d", "av1", "av1_rkmpp", "h264", "h264_rkmpp", "hevc", "hevc_rkmpp", "mpeg1_rkmpp", "mpeg2video", "mpeg2_rkmpp", "mpeg4", "mpeg4_rkmpp", "msmpeg4", "vp8", "vp8_rkmpp", "libvpx", "vp9", "vp9_rkmpp", "libvpx-vp9", "aac", "ac3", "dca", "flac", "mp3", "truehd"]
Oct 16 19:03:17 orangutan jellyfin[1380]: [23:03:17] [INF] [4] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Available encoders: ["libsvtav1", "libx264", "h264_v4l2m2m", "h264_rkmpp", "libx265", "hevc_rkmpp", "mpeg4", "msmpeg4", "libvpx", "libvpx-vp9", "aac", "libfdk_aac", "ac3", "alac", "dca", "flac", "libmp3lame", "libopus", "truehd", "libvorbis", "srt"]
Oct 16 19:03:17 orangutan jellyfin[1380]: [23:03:17] [INF] [4] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Available filters: ["overlay_opencl", "overlay_rkrga", "scale_opencl", "scale_rkrga", "tonemap_opencl", "vpp_rkrga", "zscale", "alphasrc"]
Oct 16 19:03:17 orangutan jellyfin[1380]: [23:03:17] [WRN] [4] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Filter: scale_cuda with option Output format (default "same") is not available
Oct 16 19:03:17 orangutan jellyfin[1380]: [23:03:17] [WRN] [4] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Filter: tonemap_cuda with option GPU accelerated HDR to SDR tonemapping is not available
Oct 16 19:03:18 orangutan jellyfin[1380]: [23:03:18] [WRN] [4] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Filter: overlay_vaapi with option Action to take when encountering EOF from secondary input is not available
Oct 16 19:03:18 orangutan jellyfin[1380]: [23:03:18] [WRN] [4] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Filter: overlay_vulkan with option Action to take when encountering EOF from secondary input is not available
Oct 16 19:03:18 orangutan jellyfin[1380]: [23:03:18] [INF] [4] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Available hwaccel types: ["drm", "opencl", "rkmpp"]
Oct 16 19:03:18 orangutan jellyfin[1380]: [23:03:18] [INF] [4] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: FFmpeg: /usr/lib/jellyfin-ffmpeg/ffmpeg
Oct 16 19:03:18 orangutan jellyfin[1380]: [23:03:18] [INF] [4] Emby.Server.Implementations.ApplicationHost: ServerId: 75f42f46993e44689bc26fe7756194d4
Notably, it does appear to support hardware av1, h264, h265, vp8, and vp9 decoding, and h264 and h265 encoding (the "_rkmpp" suffix denotes rockchip hw acceleration)
| 23:07:18 |
@hexa:lossy.network | hm | 23:14:22 |
@hexa:lossy.network | MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Found ffmpeg version 6.0.1
MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Available decoders: ["libdav1d", "av1", "av1_cuvid", "h264", "h264_cuvid", "hevc", "hevc_cuvid", "mpeg2video", "mpeg2_cuvid", "mpeg4", "mpeg4_cuvid", "msmpeg4", "vc1_cuvid", "vp8", "libvpx", "vp8_cuvid", "vp9", "libvpx-vp9", "vp9_cuvid", "aac", "ac3", "dca", "flac", "mp3", "truehd"]
MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Available encoders: ["av1_nvenc", "av1_vaapi", "libx264", "h264_nvenc", "h264_v4l2m2m", "h264_vaapi", "libx265", "hevc_nvenc", "hevc_vaapi", "mjpeg_vaapi", "mpeg4", "msmpeg4", "libvpx", "libvpx-vp9", "aac", "ac3", "alac", "dca", "flac", "libmp3lame", "libopus", "truehd", "libvorbis", "srt"]
MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Available filters: ["deinterlace_vaapi", "hwupload_cuda", "hwupload_vaapi", "libplacebo", "overlay_opencl", "overlay_vaapi", "overlay_vulkan", "overlay_cuda", "procamp_vaapi", "scale_cuda", "scale_opencl", "scale_vaapi", "scale_vulkan", "tonemap_cuda", "tonemap_opencl", "tonemap_vaapi", "yadif_cuda", "zscale", "alphasrc"]
MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Available hwaccel types: ["vdpau", "cuda", "vaapi", "drm", "opencl", "vulkan"]
| 23:16:03 |
@hexa:lossy.network | with just services.jellyfin.enable on the rock 5b with mainline 6.11.3 | 23:16:18 |
mattleon | I believe the rkmpp requires the BSP kernel | 23:16:45 |
mattleon | Though I curiously see nvenc listed there, do you have a gpu attached to your rock 5b? | 23:17:08 |
@hexa:lossy.network | vaapi should be accelerated, no? | 23:17:11 |
@hexa:lossy.network | no | 23:17:14 |
@hexa:lossy.network | just the panthor gpu enabled | 23:17:21 |
@hexa:lossy.network |
[ 12.685043] hantro-vpu fdc70000.video-codec: registered rockchip,rk3588-av1-vpu-dec as /dev/video0
| 23:17:29 |
@hexa:lossy.network | and av1 decoder registered | 23:17:36 |
mattleon | In reply to @hexa:lossy.network with just services.jellyfin.enable on the rock 5b with mainline 6.11.3 I ran this with virtualisation.oci-containers.containers.jellyfin. Let me try again with services.jellyfin.enable | 23:18:29 |
@hexa:lossy.network | I don't expect any change fwiw | 23:19:20 |
@hexa:lossy.network | you run a custom kernel, so it probably has patches on top to enable this | 23:19:36 |
@hexa:lossy.network | same as with frigate, the npu is not mainline supported yet | 23:20:08 |
@hexa:lossy.network | neither in the linux devicetree nor in mesa | 23:20:23 |