• 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 SOLVED: H.265 Media not playing with HWA

     
    • 0 Vote(s) - 0 Average

    SOLVED: H.265 Media not playing with HWA

    "This client isn't compatible with the media and the server isn't sending a compatible media format." when using HWA
    KipshidzeNikoloz
    Offline

    Junior Member

    Posts: 3
    Threads: 1
    Joined: 2024 Jan
    Reputation: 0
    #1
    2024-01-18, 10:46 AM (This post was last modified: 2024-01-18, 04:28 PM by KipshidzeNikoloz. Edited 1 time in total.)
    Greetings all,

    I've come up on a peculiar problem. When using HWA (Nvidia NVENC), media that is h.265 does not play on any client. Disabling the hardware acceleration plays the video, but with obvious stuttering.

    The media plays when using VLC, the disk is mounted (visible in docker and other files play normally). The issue popped up very strangely. I was watching one episode of a series, when I started the second episode the error "This client isn't compatible with the media and the server isn't sending a compatible media format" popped up, and from that point on I couldn't play any h.265 (HEVC) files.

    I'm attaching the latest FFmpeg and server logs (In a zip file because I cannot attach files in another way for some reason), here's the pastebin link for the ffmpeg log https://pastebin.com/jw791asG. Particularly interesting is the ffmpeg log that displays the following error.

    Quote:[AVHWDeviceContext @ 0x55c6c6219640] Cannot load libcuda.so.1
    [AVHWDeviceContext @ 0x55c6c6219640] Could not dynamically load CUDA
    Device creation failed: -1.
    Failed to set value 'cuda=cu:0' for option 'init_hw_device': Operation not permitted
    Error parsing global options: Operation not permitted

    I'm using the windows docker version of jellyfin, with the latest NVIDIA drivers, I've updated ffmpeg in the docker container to ffmpeg6 with no avail.

    To solve the issue I've tried to add the following environment variable to the docker-compose file, even though NVIDIA drivers should be accessible without them (and could access them before the sudden error appeared)

    Quote:    environment:
          - NVIDIA_DRIVER_CAPABILITIES=all
          - NVIDIA_VISIBLE_DEVICES=all

    I've also checked the Audio configuration in Jellyfin, changed it to 5.1 stereo, Stereo and Mono, but none of those worked (some others have had issues with 7.1 stereo playback). No amount of restarting, recreating the container, redownloading the image has worked so far.

    Some extra information that might help out: The jellyfin docker image seems to have some issues for me. After being on for a long time, it seems to hang, stuck when completing scheduled tasks, not updating the library. Restarting the container doesn't work, and If i forcefully turn it off and on the following error pops up
    Quote:"Bind for 0.0.0.0:8920 failed: port is already allocated"
    the only solution for this that i've found is forcefully shutting down docker through
    Quote:wsl --shutdown
    which restarts docker and the container, after which jellyfin works fine for some time. The same issue does not affect other containers.

    Any suggestions or ideas?

    UPDATE: For everyone that might have struggled with this like me.
    It seems somewhere along the line, the Jellyfin configuration lost access to the NVIDIA GPU's, while docker was able to see it, and by all means jellyfin should be able to access it by default, for some reason it just absolutely refused to. I came across this wonderful answer on stackoverflow https://stackoverflow.com/questions/7076...all-option
    If like me you have encountered this issue, and if like me you have gone down insane rabbitholes, and if like me you use the standard docker-compose file recommended by jellyfin, you simply need to add the following code to the compose file for Jellyfin to correctly detect and access your gpu. (Change the count variable to all "count: all" to get access to all gpu's if you're running and using more than one)
    Quote:    
    deploy:
          resources:
            reservations:
              devices:
                - driver: nvidia
                  count: 1
                  capabilities: [gpu]
    Jellyfin can now properly transcode all compatible files.


    Attached Files
    .zip   Server and FFmpeg logs.zip (Size: 148.93 KB / Downloads: 63)
    Go to solution
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #2
    2024-01-18, 03:36 PM
    Check out this article from Docker about WSL2.

    https://www.docker.com/blog/wsl-2-gpu-support-is-here/
    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]
    KipshidzeNikoloz
    Offline

    Junior Member

    Posts: 3
    Threads: 1
    Joined: 2024 Jan
    Reputation: 0
    #3
    2024-01-18, 04:02 PM
    Hi, thanks for the reply.

    The GPU support is working, the command is outputting the expected result.

    Quote:> Compute 7.5 CUDA device: [NVIDIA GeForce GTX 1650]
    14336 bodies, total time for 10 iterations: 21.302 ms
    = 96.482 billion interactions per second
    = 1929.637 single-precision GFLOP/s at 20 flops per interaction

    As the article is 4 years old, drivers supporting WSL2 GPU paravirtualization have come out of the beta and the windows build is also out https://www.docker.com/blog/wsl-2-gpu-su...idia-gpus/. It has been working fine ever since I enabled HWA about 4 months ago, but suddenly stopped working yesterday. Which leads me to suspect that some configuration in my system might've changed on its own (for whatever reason) but I don't seem to understand exactly what changed. As it was working with one episode and suddenly not working 20 minutes later, with no restarts, errors or updates that I'm aware of.

    Though your reply has lead me down to investigate if its docker desktop that has the issue. I'll report back if I find anything.
    KipshidzeNikoloz
    Offline

    Junior Member

    Posts: 3
    Threads: 1
    Joined: 2024 Jan
    Reputation: 0
    #4
    2024-01-18, 04:28 PM
    UPDATE: For everyone that might have struggled with this like me.

    It seems somewhere along the line, the Jellyfin configuration lost access to the NVIDIA GPU's, while docker was able to see it, and by all means jellyfin should be able to access it by default, for some reason it just absolutely refused to. I came across this wonderful answer on stackoverflow https://stackoverflow.com/questions/70761192/docker-compose-equivalent-of-docker-run-gpu-all-option

    If like me you have encountered this issue, and if like me you have gone down insane rabbit holes, and if like me, you use the standard docker-compose file recommended by jellyfin, you simply need to add the following code to the compose file for Jellyfin to correctly detect and access your gpu. (Change the count variable to all "count: all" to get access to all gpu's if you're running and using more than one)
    Quote:    
    deploy:
          resources:
            reservations:
              devices:
                - driver: nvidia
                  count: 1
                  capabilities: [gpu]

    Jellyfin can now properly transcode all compatible files.
    « 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