• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support Troubleshooting Dropping frames/lag when using hardware acceleration

     
    • 0 Vote(s) - 0 Average

    Dropping frames/lag when using hardware acceleration

    Using a GPU is unexpectedly worse than CPU
    ttsuam
    Offline

    Junior Member

    Posts: 4
    Threads: 1
    Joined: 2023 Dec
    Reputation: 0
    Country:United States
    #1
    2023-12-25, 09:31 PM
    Setup
    Hardware
    Intel® Xeon® CPU E5-2678 v3 @ 2.50GHz
    Nvidia GeForce GTX 1660 Super
    32 GB ECC memory
    a bunch of drives

    Software
    Hypervisor: Proxmox version 8.1.3 (running kernel: 6.5.11-7-pve)
    VM: Ubuntu 22.04.3 LTS
    Docker container: jellyfin/jellyfin:latest  (dashboard says jellyfin version 10.8.13)

    Issue Description
    When I play a 4K movie with hardware acceleration on, it transcodes it to something Firefox can handle but drops frames or stutters. If I turn off hardware acceleration, it may occasionally drop a frame or stutter, but less than with using the GPU. It seems to be the same results with different movies.

    I suspect it could be related to the virtualization/containerization, but I am open to suggestions. I have passed my GPU through from Proxmox to the VM to the Jellyfin container. I have "confirmed" that the container is using the GPU by running nvidia-smi in the container while transcoding. If there is a better way to confirm it's working correctly, I'm willing to try it. I attached my FFMpeg and system logs.


    Attached Files
    .txt   SystemLog.txt (Size: 128.89 KB / Downloads: 57)
    .txt   FFMpegLog.txt (Size: 118.39 KB / Downloads: 66)
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #2
    2023-12-25, 10:54 PM
    Can you attach an ffmpeg where the system is using NVENC. The log you attached is CPU transcoding.

    Also, may I ask why you are both using a VM and a Docker container? Is that VM running more than one container?
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    ttsuam
    Offline

    Junior Member

    Posts: 4
    Threads: 1
    Joined: 2023 Dec
    Reputation: 0
    Country:United States
    #3
    2023-12-26, 10:49 PM (This post was last modified: 2023-12-26, 10:51 PM by ttsuam. Edited 1 time in total.)
    Thank you for your reply. I have attached the FFMpeg logs using NVENC. As far as the container-inside-a-VM goes, I previously had multiple docker containers but have simplified down to just Jellyfin recently. I am using a hypervisor and VM so I have more flexibility in running other projects that are compartmentalized separate from the media. I've found Docker/docker compose to be convenient for keeping track of what I have installed and for getting a quick and easy fresh start when I mess something up.


    Attached Files
    .txt   FFMpegLogUsingGPU.txt (Size: 145.9 KB / Downloads: 78)
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #4
    2023-12-26, 11:15 PM
    From a jellyfin perspective, everything looks normal. As far as I can tell anyway. It is transcoding fast enough. Both on the CPU and GPU.

    So there is some other system bottleneck or problem somewhere that isn't obvious from the logs. Running out of memory? Some network issue?
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    ttsuam
    Offline

    Junior Member

    Posts: 4
    Threads: 1
    Joined: 2023 Dec
    Reputation: 0
    Country:United States
    #5
    2023-12-27, 12:17 AM (This post was last modified: 2023-12-27, 01:22 AM by ttsuam. Edited 2 times in total.)
    The server VM is allocated 20GB of memory of the 32GB total on the host. When transcoding, it uses almost all of the 20GB, but I assume that's to be expected and that 20GB is enough.

    Network-wise, it's fairly simple. I'm on the same LAN, just connecting based on IP with no DNS using an average off the shelf router. I can ping the VM with no problems. I'm not sure what I would be looking for if there was an issue here.

    The portion of the CPU allocated to the VM hardly breaks 20% use when transcoding using the GPU, so I don't think that's the issue.

    The only other thing I could think of is the hard drive throughput/access speed, but I'm not sure how I would test that. I have three Seagate Ironwolf st4000vn008-2dr166 and one Western Digital wdc_wd40ezrz-00gxcb0 in a ZFS pool on Proxmox.

    Edit: Looking at Proxmox, the IODelay is as high as 25% and averages about 10-15% while transcoding, which in looking at other forums, seems to point to drives that are too slow. Do that seem reasonable? From what I'm reading, it seems like upgrading the drive might be the solution, but I'd like to avoid that if possible, $$$.

    Edit2: It plays smoothly on the xbox, and the server IO delay is even lower, about 1-10%. That makes me think it's just the client struggling. But I'm not sure how that would change the IO delay
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #6
    2023-12-27, 02:02 AM
    ffmpeg should not be consuming that much memory. Is it actually using all that memory? Or is it being used as cache?
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    ttsuam
    Offline

    Junior Member

    Posts: 4
    Threads: 1
    Joined: 2023 Dec
    Reputation: 0
    Country:United States
    #7
    2023-12-28, 02:07 AM
    Now that I look more closely using the free command, it's only using 1 GB and the rest is buffer/cache. Before I was just looking at the Proxmox graph.
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode