• 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 Struggling with NVENC Encoding

     
    • 0 Vote(s) - 0 Average

    Struggling with NVENC Encoding

    Struggling with NVENC Encoding
    fizzik
    Offline

    Junior Member

    Posts: 13
    Threads: 6
    Joined: 2024 Jan
    Reputation: 0
    Country:United States
    #1
    2024-01-16, 07:28 PM (This post was last modified: 2024-01-16, 07:40 PM by fizzik. Edited 1 time in total.)
    Hey guys. Going to try and give you as much info as I possibly can, apologies if it's too much.

    Running Proxmox with an Ubuntu Server 20.04 LTS. I have gotten GPU (Quadro P2000) passthrough working with my VM, so that is fortunately not an issue. 

    This VM in particular is running everything through Docker - Portainer.

    Here is my compose file:

    Code:
    version: '3.6'
    services:
      jellyfin:
        image: jellyfin/jellyfin
        user: 1000:1000
        network_mode: 'host'
        volumes:
          - "/home/dylan/Downloads/jellysrv/config:/config"
          - "/srv/Plex/Movies:/data/movies"
          - "/srv/Plex/Shows:/data/tvshows"
        ports:
          - "1900:1900/udp"
          - "7359:7359/udp"
          - "8096:8096/tcp"
        runtime: nvidia
        environment:
          - "PUID=1000"
          - "PGID=1000"
          - "TZ=America/New_York"
          - "PATH=/lsiopy/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
          - "HOME=/root"
          - "LANGUAGE=en_US.UTF-8"
          - "LANG=en_US.UTF-8"
          - "TERM=xterm"
          - "S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0"
          - "S6_VERBOSITY=1"
          - "S6_STAGE2_HOOK=/docker-mods"
          - "VIRTUAL_ENV=/lsiopy"
          - "LSIO_FIRST_PARTY=true"
          - "NVIDIA_DRIVER_CAPABILITIES=compute,video,utility"
        cap_drop:
          - "AUDIT_CONTROL"
          - "BLOCK_SUSPEND"
          - "DAC_READ_SEARCH"
          - "IPC_LOCK"
          - "IPC_OWNER"
          - "LEASE"
          - "LINUX_IMMUTABLE"
          - "MAC_ADMIN"
          - "MAC_OVERRIDE"
          - "NET_ADMIN"
          - "NET_BROADCAST"
          - "SYSLOG"
          - "SYS_ADMIN"
          - "SYS_BOOT"
          - "SYS_MODULE"
          - "SYS_NICE"
          - "SYS_PACCT"
          - "SYS_PTRACE"
          - "SYS_RAWIO"
          - "SYS_RESOURCE"
          - "SYS_TIME"
          - "SYS_TTY_CONFIG"
          - "WAKE_ALARM"
        deploy:
          resources:
            reservations:
              devices:
                - capabilities: [gpu]

    Here is a picture showing everything I have enabled. Meets all the specs on the Nvidia site for decoding compatibility:
    [Image: JfhJPm7.png]

    As it stands, streaming works totally fine. Going off the logs, it doesn't look like it's using my CPU. By all accounts, it appears to be using the GPU. Logs here:
    Code:
    [2024-01-16 10:01:58.098 -05:00] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Available filters: ["deinterlace_qsv", "deinterlace_vaapi", "hwupload_cuda", "hwupload_vaapi", "overlay_opencl", "overlay_qsv", "overlay_vaapi", "overlay_cuda", "procamp_vaapi", "scale_cuda", "scale_opencl", "scale_qsv", "scale_vaapi", "tonemap_cuda", "tonemap_opencl", "tonemap_vaapi", "vpp_qsv", "yadif_cuda", "zscale", "alphasrc"]
    [2024-01-16 10:01:58.175 -05:00] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Available hwaccel types: ["cuda", "vaapi", "qsv", "drm", "opencl", "vulkan"]
    [2024-01-16 10:01:58.275 -05:00] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: FFmpeg: "/usr/lib/jellyfin-ffmpeg/ffmpeg"

    However, when I run a stream (making sure it's set to to not direct), nothing appears when running nvidia-smi. This is what I get when running 5 concurrent streams:
    Code:
    dylan@dport:~$ docker exec -it jellyfin nvidia-smi
    Tue Jan 16 14:25:02 2024
    +---------------------------------------------------------------------------------------+
    | NVIDIA-SMI 535.154.05            Driver Version: 535.154.05  CUDA Version: 12.2    |
    |-----------------------------------------+----------------------+----------------------+
    | GPU  Name                Persistence-M | Bus-Id        Disp.A | Volatile Uncorr. ECC |
    | Fan  Temp  Perf          Pwr:Usage/Cap |        Memory-Usage | GPU-Util  Compute M. |
    |                                        |                      |              MIG M. |
    |=========================================+======================+======================|
    |  0  Quadro P2000                  Off | 00000000:01:00.0 Off |                  N/A |
    | 67%  34C    P0              18W /  75W |      0MiB /  5120MiB |      0%      Default |
    |                                        |                      |                  N/A |
    +-----------------------------------------+----------------------+----------------------+

    +---------------------------------------------------------------------------------------+
    | Processes:                                                                            |
    |  GPU  GI  CI        PID  Type  Process name                            GPU Memory |
    |        ID  ID                                                            Usage      |
    |=======================================================================================|
    |  No running processes found                                                          |
    +---------------------------------------------------------------------------------------+

    Any assistance you guys could offer would be greatly appreciated. If there is any information you guys need that I have not provided, please let me know. I'm sure you get asked this all the time...
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #2
    2024-01-16, 07:55 PM
    Can you share your ffmpeg log with us?
    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]
    fizzik
    Offline

    Junior Member

    Posts: 13
    Threads: 6
    Joined: 2024 Jan
    Reputation: 0
    Country:United States
    #3
    2024-01-16, 08:03 PM
    (2024-01-16, 07:55 PM)TheDreadPirate Wrote: Can you share your ffmpeg log with us?


    I would love to, however, I cannot seem to find any log that states it's FFMPEG. Unless this is what you want?

    https://pastebin.com/ngr34rRG
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #4
    2024-01-16, 08:07 PM
    It isn't, but that log does tell me that you never transcoded. All the playback in that log says it was direct played. Which explains why you aren't seeing any ffmpeg logs and no GPU usage.
    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]
    1
    tmsrxzar
    Offline

    Senior Member

    Posts: 755
    Threads: 6
    Joined: 2023 Nov
    Reputation: 20
    #5
    2024-01-16, 08:09 PM
    hint log lines contain PlayMethod indicate what the client requested; "PlayMethod=DirectPlay"
    fizzik
    Offline

    Junior Member

    Posts: 13
    Threads: 6
    Joined: 2024 Jan
    Reputation: 0
    Country:United States
    #6
    2024-01-16, 08:16 PM
    Interesting, I know for sure I selected different bitrates for 1080p. I will try having it transcode down to 480...
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #7
    2024-01-16, 08:16 PM
    The quality selection only triggers transcoding if the BIT RATE associated with the quality selection is lower than the native bit rate of the video.
    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]
    fizzik
    Offline

    Junior Member

    Posts: 13
    Threads: 6
    Joined: 2024 Jan
    Reputation: 0
    Country:United States
    #8
    2024-01-16, 08:20 PM
    OK. So when selecting 1080p or 720p of any bitrate, it seems to ignore the setting and direct play anyway. Changing to 480p or below does make the GPU usage go up, which is good. It doesn't show no processed anymore, but the process has no name I guess. No matter, seems it works! Appreciate the help!


    dylan@dport:~/Downloads/jellysrv/config$ docker exec -it jellyfin nvidia-smi
    Tue Jan 16 15:18:42 2024
    +---------------------------------------------------------------------------------------+
    | NVIDIA-SMI 535.154.05 Driver Version: 535.154.05 CUDA Version: 12.2 |
    |-----------------------------------------+----------------------+----------------------+
    | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
    | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
    | | | MIG M. |
    |=========================================+======================+======================|
    | 0 Quadro P2000 Off | 00000000:01:00.0 Off | N/A |
    | 51% 45C P0 27W / 75W | 159MiB / 5120MiB | 7% Default |
    | | | N/A |
    +-----------------------------------------+----------------------+----------------------+

    +---------------------------------------------------------------------------------------+
    | Processes: |
    | GPU GI CI PID Type Process name GPU Memory |
    | ID ID Usage |
    |=======================================================================================|
    +---------------------------------------------------------------------------------------+
    « 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