Jump to content

Jellyfin Playback Stuttering/Freezing on High Bitrate/Transcoded Media

Hello! I've got a small unRAID server for bluray and phone backups, using Jellyfin for in home streaming. It's all on a Dell Poweredge T40 server, with a Xeon E-2224G, 16gb RAM, and a 1050ti for transcoding. On some of the higher bitrate media I have, and most any bluray that I need to transcode, I get near constant stuttering and freezing every 15 seconds or so. I do have Jellyfin set to use the 1050ti, but I've noticed when media is playing, the GPU is being used but nowhere near being pinned, while the CPU sits at 80-90% usage. FFMPEG logs do confirm that it is using Nvenc encoding. Do I just not have enough CPU performance?

Link to comment
Share on other sites

Link to post
Share on other sites

tbh i've ditched Jellyfin like a year ago and installed minidlna instead. Do almost the same thing but without decoding and can stream natively the file you have. 

Link to comment
Share on other sites

Link to post
Share on other sites

7 hours ago, plentycheesed said:

Hello! I've got a small unRAID server for bluray and phone backups, using Jellyfin for in home streaming. It's all on a Dell Poweredge T40 server, with a Xeon E-2224G, 16gb RAM, and a 1050ti for transcoding. On some of the higher bitrate media I have, and most any bluray that I need to transcode, I get near constant stuttering and freezing every 15 seconds or so. I do have Jellyfin set to use the 1050ti, but I've noticed when media is playing, the GPU is being used but nowhere near being pinned, while the CPU sits at 80-90% usage. FFMPEG logs do confirm that it is using Nvenc encoding. Do I just not have enough CPU performance?

On these sources what is your audio code?

During transcode the cpu needs to shuttle the data for the GPU to do the video work but will also transcode the audio. 

Link to comment
Share on other sites

Link to post
Share on other sites

Few things come to mind:

 

Doesn't the Xeon E-2224G support Quicksync? With more decode support that the 1050ti?.... Why isn't that being used?

 

That high of CPU usage makes me think FFMPEG is trying to software decode... If the GPU was handling the "encoding" why would the CPU be so high?

 

Could sit here and speculate all day long why this is happening... or it would be great to see the logs first hand... both the transcode log and the main log

Link to comment
Share on other sites

Link to post
Share on other sites

11 hours ago, m9x3mos said:

On these sources what is your audio code?

During transcode the cpu needs to shuttle the data for the GPU to do the video work but will also transcode the audio. 

DTS 5.1

8 hours ago, BM813 said:

Few things come to mind:

 

Doesn't the Xeon E-2224G support Quicksync? With more decode support that the 1050ti?.... Why isn't that being used?

 

That high of CPU usage makes me think FFMPEG is trying to software decode... If the GPU was handling the "encoding" why would the CPU be so high?

 

Could sit here and speculate all day long why this is happening... or it would be great to see the logs first hand... both the transcode log and the main log

1. Honestly I just had the spare GPU so I threw it in, I never even tried with Quicksync. I'll switch it over and see if it improves.

 

2. I've attached logs below, but they do confirm it's using NVENC.

FFMPEG log Log

Link to comment
Share on other sites

Link to post
Share on other sites

Since my server does not have a GPU from Team Green, these logs would be incomparable to mine. However, you may wish to check out whether your GPU has been loaded properly and passed to Jellyfin's container:

  1. Ensure that the app Nvidia-Driver has been installed.
  2. Check out whether the path /dev/dri/renderD129 exists (not D128 , which generally refers to already enabled integrated GPU), in SSH.
  3. Pass the device above to Jellyfin's container.🤔
Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Bersella AI said:

Since my server does not have a GPU from Team Green, these logs would be incomparable to mine. However, you may wish to check out whether your GPU has been loaded properly and passed to Jellyfin's container:

  1. Ensure that the app Nvidia-Driver has been installed.
  2. Check out whether the path /dev/dri/renderD129 exists (not D128 , which generally refers to already enabled integrated GPU), in SSH.
  3. Pass the device above to Jellyfin's container.🤔

I'll have to check on #2 this evening, but Nvidia-Driver is installed and the GPU is passed to Jellyfins container. The GPU Statistics plugin did confirm Jellyfin is using the gpu, and I can see usage increase during transcoding.

Link to comment
Share on other sites

Link to post
Share on other sites

@plentycheesed What device(s) are you trying to playback on? Is there any device that doesn't experience playback issues?

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, BM813 said:

@plentycheesed What device(s) are you trying to playback on? Is there any device that doesn't experience playback issues?

Primarily my LG tv, with the jellyfin WebOS app. I think it only has 10/100 Ethernet, so I did try it on several other devices with gigabit Ethernet, including my MacBook, Xbox series s, and HTPC, with the same result. Lower bitrate content (1080p blu-rays for instance) that doesn't need to be transcoded all play fine. 4k high bitrate blu-rays (120-130) have trouble regardless of if they're being transcoded.

Link to comment
Share on other sites

Link to post
Share on other sites

38 minutes ago, plentycheesed said:

 4k high bitrate blu-rays (120-130) 

Is that 120 to 130 Gigabytes? that would line up with what I saw in the logs for bit rates. 

 

Jellyfin will either direct stream the file to the client, or transcode the file to an acceptable format for the client device, or transcode to an acceptable format and lower bitrate for the client device.... the client device regardless still has to be able to handle the stream. 

On some devices you can try changing video players within the jellyfin app or transcode down to a lower bitrate. 

Could also test by how well the file plays on any of these devices you listed if you load the file directly on to them and play

Link to comment
Share on other sites

Link to post
Share on other sites

11 minutes ago, BM813 said:

Is that 120 to 130 Gigabytes? that would line up with what I saw in the logs for bit rates. 

 

Jellyfin will either direct stream the file to the client, or transcode the file to an acceptable format for the client device, or transcode to an acceptable format and lower bitrate for the client device.... the client device regardless still has to be able to handle the stream. 

On some devices you can try changing video players within the jellyfin app or transcode down to a lower bitrate. 

Could also test by how well the file plays on any of these devices you listed if you load the file directly on to them and play

That would be the bitrate in Mbps. Don't remember the actual file size but I think that was 80-90 gigs.

 

I might try switching the video player. The only device I'd expect to have trouble playing the file directly is maybe the TV, but I'll give it a shot anyways and see.

Link to comment
Share on other sites

Link to post
Share on other sites

 Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160 [SAR 1:1 DAR 16:9], 24 fps, 24 tbr, 1k tbn (default)

 

So that video is H265 10-bit 4:2:0 which is supported for Decode by the GTX1050Ti. 

But also keep in mind your audio is DTS-HD MA which will be transcoded by the CPU. 

 

Have you tried with a less demanding rip? Maybe something thats H265 8-bit with AAC/AC3/Dolby TrueHD/etc...audio?

Also See this file is a DV (DolbyVision), Have you tried a non DV rip as well? 
 

Your GPU won't get Pinned with a single stream. Also keep in mind that typically what's being reported for "GPU Usage" is the 3D load, and not the Video Decode/Processing load. Since its UnRAID what you could do while its running, is to open up the shell (its up the top right of the UnRAID UI), and you can run the command:

watch nvidia-smi

You should see your transcode there, and power draw, usage, etc.....

 

I did notice that your path for transcoding is 

/config/data/transcodes/xxxxxxxxxxxxxxxxxxxxxxxxxxxx.ts

Where is this mapped to with Docker? Is it to /dev/shm (shared memory) or an SSD (e.g your cache)?

Spoiler

Desktop: Ryzen9 5950X | ASUS ROG Crosshair VIII Hero (Wifi) | EVGA RTX 3080Ti FTW3 | 32GB (2x16GB) Corsair Dominator Platinum RGB Pro 3600Mhz | EKWB EK-AIO 360D-RGB | EKWB EK-Vardar RGB Fans | 1TB Samsung 980 Pro, 4TB Samsung 980 Pro | Corsair 5000D Airflow | Corsair HX850 Platinum PSU | Asus ROG 42" OLED PG42UQ + LG 32" 32GK850G Monitor | Roccat Vulcan TKL Pro Keyboard | Logitech G Pro X Superlight  | MicroLab Solo 7C Speakers | Audio-Technica ATH-M50xBT2 LE Headphones | TC-Helicon GoXLR | Audio-Technica AT2035 | LTT Desk Mat | XBOX-X Controller | Windows 11 Pro

 

Spoiler

Server: Fractal Design Define R6 | Ryzen 3950x | ASRock X570 Taichi | EVGA GTX1070 FTW | 64GB (4x16GB) Corsair Vengeance LPX 3000Mhz | Corsair RM850v2 PSU | Fractal S36 Triple AIO | 12 x 8TB HGST Ultrastar He10 (WD Whitelabel) | 500GB Aorus Gen4 NVMe | 2 x 2TB Samsung 970 Evo Plus NVMe | LSI 9211-8i HBA

 

Link to comment
Share on other sites

Link to post
Share on other sites

  • 1 month later...
On 3/11/2024 at 3:42 PM, Jarsky said:
 Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160 [SAR 1:1 DAR 16:9], 24 fps, 24 tbr, 1k tbn (default)

 

So that video is H265 10-bit 4:2:0 which is supported for Decode by the GTX1050Ti. 

But also keep in mind your audio is DTS-HD MA which will be transcoded by the CPU. 

 

Have you tried with a less demanding rip? Maybe something thats H265 8-bit with AAC/AC3/Dolby TrueHD/etc...audio?

Also See this file is a DV (DolbyVision), Have you tried a non DV rip as well? 
 

Your GPU won't get Pinned with a single stream. Also keep in mind that typically what's being reported for "GPU Usage" is the 3D load, and not the Video Decode/Processing load. Since its UnRAID what you could do while its running, is to open up the shell (its up the top right of the UnRAID UI), and you can run the command:

watch nvidia-smi

You should see your transcode there, and power draw, usage, etc.....

 

I did notice that your path for transcoding is 

/config/data/transcodes/xxxxxxxxxxxxxxxxxxxxxxxxxxxx.ts

Where is this mapped to with Docker? Is it to /dev/shm (shared memory) or an SSD (e.g your cache)?

It looks like it was the transcoding storage, it was on the main array. Mapped it to my SSD cache and now it seems to be working great so far. My array is just using cheapo SMR drives (they were free to me, inherited them). Should have checked on that sooner. Thank you for the advice!

Link to comment
Share on other sites

Link to post
Share on other sites

On 4/20/2024 at 2:07 PM, plentycheesed said:

It looks like it was the transcoding storage, it was on the main array. Mapped it to my SSD cache and now it seems to be working great so far. My array is just using cheapo SMR drives (they were free to me, inherited them). Should have checked on that sooner. Thank you for the advice!

 

Redirect yout transcodes to /dev/shm (shared memory). It will utilise your Ram as a RamDrive that way; and its non persistant, so you never have to worry about the cache being full; and less writes on your SSD. If you're using Docker then you can just map /dev/shm to /transcode (or whatever your transcode path is).

Spoiler

Desktop: Ryzen9 5950X | ASUS ROG Crosshair VIII Hero (Wifi) | EVGA RTX 3080Ti FTW3 | 32GB (2x16GB) Corsair Dominator Platinum RGB Pro 3600Mhz | EKWB EK-AIO 360D-RGB | EKWB EK-Vardar RGB Fans | 1TB Samsung 980 Pro, 4TB Samsung 980 Pro | Corsair 5000D Airflow | Corsair HX850 Platinum PSU | Asus ROG 42" OLED PG42UQ + LG 32" 32GK850G Monitor | Roccat Vulcan TKL Pro Keyboard | Logitech G Pro X Superlight  | MicroLab Solo 7C Speakers | Audio-Technica ATH-M50xBT2 LE Headphones | TC-Helicon GoXLR | Audio-Technica AT2035 | LTT Desk Mat | XBOX-X Controller | Windows 11 Pro

 

Spoiler

Server: Fractal Design Define R6 | Ryzen 3950x | ASRock X570 Taichi | EVGA GTX1070 FTW | 64GB (4x16GB) Corsair Vengeance LPX 3000Mhz | Corsair RM850v2 PSU | Fractal S36 Triple AIO | 12 x 8TB HGST Ultrastar He10 (WD Whitelabel) | 500GB Aorus Gen4 NVMe | 2 x 2TB Samsung 970 Evo Plus NVMe | LSI 9211-8i HBA

 

Link to comment
Share on other sites

Link to post
Share on other sites

9 hours ago, Jarsky said:

 

Redirect yout transcodes to /dev/shm (shared memory). It will utilise your Ram as a RamDrive that way; and its non persistant, so you never have to worry about the cache being full; and less writes on your SSD. If you're using Docker then you can just map /dev/shm to /transcode (or whatever your transcode path is).

This is my plan in the (near) future, but as of right now I'm pushing up against the limits of ram usage with everything else I've got on the server (few vms, several containers). And the SSD is a 1tb, so not worried about the capacity, and it was cheap enough of I put some extra wear on it in the meantime, I'm not too worried. Thanks for the heads up though!

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×