SOLVED: issue - Printable Version +- Jellyfin Forum (https://forum.jellyfin.org) +-- Forum: Support (https://forum.jellyfin.org/f-support) +--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting) +--- Thread: SOLVED: issue (/t-solved-issue--4805) |
issue - fencer - 2024-03-09 Hello, I've never been able to get hardware transcoding to work with Jellyfin. - I'm using the latest version 10.8.13 on a synology ds1019+. Installed through the community apps. - It has a celeron J3455 CPU, which is capable of hwaccel. I know it definitely can do this because I installed plex using a free 30 day trial. hwaccel worked there out of the box, 4k transcodes used at most 20% CPU. - Given it's based on linux, I'm using VAAPI. I've tried the other options though. - below is the ffmpeg log, as far as I can tell it IS using /dev/dri/renderD128 as it's supposed to, but it must be falling back to software, and single stream transcodes max out the CPU Quote:ffmpeg version 4.4.4-49 Copyright © 2000-2023 the FFmpeg developers That was a transcode of a 1080 stream to 720 and was pegging the CPU at 92%. I'm really not sure where to go. I understand if it falls back to software it will say so in the logs. This CPU is capable of hwaccel 4k, as shown in this comptaibility spreadsheet. I've ensured the files I'm trying to test are appropriate. Am I missing something in the logs? Should I install the docker variant instead? RE: issue - Efficient_Good_5784 - 2024-03-09 If you want to, you can try running the official Jellyin Docker image using Synology's Container Manager to see if it works there. Is your DS1019+ running DSM7? I wrote a guide on how to accomplish this if you would like to follow it. Just so you know, if you can play videos with HWA enabled, it's not broken. If you play a video (with HWA enabled) and you get a message on screen saying the media can't be played, then HWA is not working. So from the sound of it, it looks like your HWA is set up correctly. It's important to understand that using HWA doesn't mean that your CPU will never get any load during a transcode. The GPU can only accelerate the video part of the transcode.
RE: issue - TheDreadPirate - 2024-03-09 The CPU usage is likely from the audio transcode. It's possible that the Plex client you were using was direct playing the audio and the Jellyfin client you were using wasn't. RE: issue - fencer - 2024-03-10 Thanks for the responses. I've disabled subtitles entirely, hopefully disabling them means they are never even loaded and there is never a chance that jellyfin will try to transcode them. @ Efficient_Good_5784 what you said makes sense, if the video plays at all with hwaccel active it must be using hwaccel, or it would fail to initialise the transcode I don't know why audio transcoding would choke it up so hard though, video playback stutters some on 1080 and chokes entirely on 4k. Audio transcoding should happen at easily 30-40x playback speed. Also looking at another log from ffmpeg, I don't think it is transcoding the audio, the video is still playing back like a powerpoint though. Quote:Stream #0:1(eng): Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s (default) I've also discovered that enabling hardware DEcoding seems to choke it up even more. Below are the speeds with all the hardware decoding options disabled Quote:frame= 1 fps=0.0 q=0.0 size=N/A time=00:00:00.00 bitrate=N/A speed= 0x Same file, with it enabled. Quote:frame= 307 fps=8.9 q=-0.0 size=N/A time=00:00:00.37 bitrate=N/A speed=0.0108x RE: issue - Efficient_Good_5784 - 2024-03-10 Have you added a 2nd piece of ram to your Synology NAS? By default, these come with a single stick of ram which causes the CPU to run with a single channel of ram. I added a 2nd stick of ram to my Synology NAS (which means the CPU now runs with dual channel ram) and the transcoding fps improved a bit (like 15fps more on average on 1080p to 1080p transcodes). If it helps to bring context the the power of the CPUs in Synology units, I have a DS920+. The DS920+ has an Intel Celeron J4125 which is 4 years old at this point. You can see Intel's spec for it here. When Jellyfin HWA transcodes a 1080p stream (with around ~3Mbps bitrate) to 1080p on the DS920+, the J4125 CPU utilization jumps to around 25%-40%. I built a new server for Jellyfin that uses the AMD 5600G CPU, and it uses twice as much watts than my DS920+. But when the 5600G HWA transcodes the same videos as on the DS920+, the CPU utilization is only around ~5%-10%. Your Synology unit (DS1019+) has an older CPU with lower specs than the one in the DS920+. See here for the Intel Celeron J3455 specs. This CPU is 7 years old now. Intel even lists a recommended selling price of $31USD (~$47AUD) on their spec listings for it. The point here is that Synology (and most other pre-made NAS brands) focus on keeping the NAS boxes to a minimum with power usage. People buying these things generally want it to use as little power as possible. So these "underpowered" CPUs are used. These CPUs do fine with basic NAS file storage usage, but not so much with transcoding video (especially with high-bitrate video). I would check if you have any background tasks running on your Synology unit at the same time that you're transcoding. Like if you have any scrubbing going on or another application doing something else that might slow down the system. Otherwise, having a high CPU utilization % with the J3455 while HWA transcoding seems normal (maybe not 95% usage as with your case however). RE: issue - fencer - 2024-03-10 Yeah I appreciate it's an old CPU and was not a superstar when it launched either. I have got 16GB of ram, upgraded from the standard 8GB. I'm very confident that neither of those things are the bottleneck though, as I said I used a 1 month free plex trial (promo code ASUSTOR-PLEX30 by the way). The hardware transcoding through Plex did work. A 61mbps 4k stream could be transcoded down to 720p @ 4mbps using 20% or so CPU, which is expected as the CPU should be able comfortably transcode 3-4 4k streams at once give it's an Intel chip with iGP quicksync etc. It's quite impressive how much the hardware acceleration allows these old cheap chips to punch upwards really. Looking at Plex's less user helpful transcoding logs, it appears to have roughly the same parameters. I believe Plex uses their own version of ffmpeg like Jellyfin does. So I have to conclude this is either a bug in Jellyfin, or much more likely, misconfiguration in my own setup. I was wrong about audio for sure as looking into it further, down mixing is apparently a bit more resource intensive. I wouldn't expect it to grind to a complete halt though. The fact that hardware decoding causes the transcoding rate to crater is also very odd. To be honest it's not the end of the world if I can't this working as software encoding at 1080 and below for one stream works. I don't really want to watch a beautiful high quality 70mbps 4k HDR masterpiece transcoded down to 480p SDR using inflight wifi anyway :P I'm not a big fan of Plex either so I wouldn't want to purchase their service. RE: issue - TheDreadPirate - 2024-03-10 If possible could you switch from the community app, which is using a very old ffmpeg version, to the linuxserver.io docker image? And add the Intel OpenCL mod to the docker config. I'm wondering if the community app's ffmpeg version is just not new enough. RE: issue - fencer - 2024-03-11 That did it mate! I initially tried pointing jellyfin-community to the latest ffmpeg but ended up going with docker it was too much hassle. Unfortunately the inbuilt Synology docker manager is pretty slim so after getting portainer working I was able to have jellyfin/jellyfin:latest up and running with the correct devices passed through. Transcoding works. Some tonemapping settings are causing it to break but with those disabled it works, I'll dig a bit deeper there and report back on anything I find. I feel like I've never had a totally smooth experience with these Synology community apps. I might just have to bite the bullet and shift it all to docker. Thank you both for your help. RE: issue - TheDreadPirate - 2024-03-11 Ah. I had suggested the Linuxserver.io image because the official Jellyfin/Jellyfin image has a new Intel OpenCL driver package that deprecated support for Linux kernel 4.4.x, which is what most Synology NASes are still running. IIRC, the LSIO image with their OpenCL mod still has support for Linux kernel 4.4. RE: issue - fencer - 2024-03-11 I didn't even look at the ffmpeg version. I had assumed a few things. The community package was the latest Jellyfin release, so I assumed it would have the most recent version of ffmpeg. And that Jellyfin only used the customised Jellyfin-ffmpeg, so I wouldn't be able to use the latest build of ffmpeg if I wanted anyway. As it stand hwaccel iss working despite this device being on kernel 4.4.302. |