jellyfin / jellyfin-ffmpeg

FFmpeg for Jellyfin
https://jellyfin.org
Other
478 stars 127 forks source link

Intel QuickSync Not working N6005 6.x ArchLinux Baremetal #314

Closed stratus-ss closed 10 months ago

stratus-ss commented 10 months ago

Describe The Bug I have an Arch Linux machine running the LTS kernel

System:
  Host: media-centre.x86experts.com Kernel: 6.1.64-1-lts arch: x86_64 bits: 64
Machine:
  Type: Desktop Mobo: HARDKERNEL model: ODROID-H3 v: 1.0
Memory:
  System RAM: total: 16 GiB note: est. available: 15.47 GiB
CPU:
  Info: quad core Intel Pentium Silver N6005 [MCP] speed (MHz): avg: 3300
Graphics:
  Device-1: Intel JasperLake [UHD Graphics] driver: i915 v: kernel
  Display: server: X.org v: 1.21.1.9 with: Xwayland v: 23.2.2 driver: X:
    loaded: modesetting dri: iris gpu: i915 tty: 80x24
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: mesa v: 23.2.1-arch1.2
    note: console (EGL sourced) renderer: Mesa Intel UHD Graphics (JSL),
    llvmpipe (LLVM 16.0.6 128 bits)

When I install Jellyfin from the repos and I enable quicksync like this:

image

Files that need to be transcoded fail to play

FFMPEG Log

Jellyfin Logs

I have the following packages related to the intel drivers installed

 pacman -Qs |grep intel
local/intel-gmmlib 22.3.14-1
local/intel-gpu-tools 1.27-2
local/intel-media-driver 23.4.2-1
local/intel-ucode 20231114-1
local/lib32-libva-intel-driver 2.4.1-1
local/libva-intel-driver 2.4.1-2
local/onevpl-intel-gpu 23.4.2-1
local/vulkan-intel 1:23.2.1-2

DMESG output:

sudo dmesg |grep -E "vga|intel|firmware"
[sudo] password for media: 
[    0.296151] pci 0000:00:02.0: vgaarb: setting as boot VGA device
[    0.296151] pci 0000:00:02.0: vgaarb: bridge control possible
[    0.296151] pci 0000:00:02.0: vgaarb: VGA device added: decodes=io+mem,owns=io+mem,locks=none
[    0.296151] vgaarb: loaded
[    0.407010] intel_pstate: Intel P-state driver initializing
[    0.407123] intel_pstate: HWP enabled
[    0.407506] intel_pmc_core INT33A1:00:  initialized
[    1.263028] i915 0000:00:02.0: vgaarb: deactivate vga console
[    1.264305] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=io+mem
[    1.264884] i915 0000:00:02.0: [drm] Finished loading DMC firmware i915/icl_dmc_ver1_09.bin (v1.9)
[    1.272396] i915 0000:00:02.0: [drm] GuC firmware i915/ehl_guc_70.1.1.bin version 70.1.1
[    1.272402] i915 0000:00:02.0: [drm] HuC firmware i915/ehl_huc_9.0.0.bin version 9.0.0
[    1.382492] Btrfs loaded, crc32c=crc32c-intel, zoned=yes, fsverity=yes
[    1.523317] BTRFS info (device nvme0n1p2): using crc32c (crc32c-intel) checksum algorithm
[    2.369145] systemd[1]: TPM2 PCR Machine ID Measurement was skipped because of an unmet condition check (ConditionPathExists=/sys/firmware/efi/efivars/StubPcrKernelImage-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f).
[    3.539977] intel-lpss 0000:00:15.0: enabling device (0004 -> 0006)
[    3.579336] intel-lpss 0000:00:15.1: enabling device (0004 -> 0006)
[    3.644744] intel_rapl_common: Found RAPL domain package
[    3.644749] intel_rapl_common: Found RAPL domain core
[    3.644751] intel_rapl_common: Found RAPL domain uncore
[    3.644753] intel_rapl_common: Found RAPL domain psys
[    3.762971] snd_hda_intel 0000:00:1f.3: enabling device (0000 -> 0002)
[    3.764361] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])

However, when i use the LinuxServerIO docker, jellyfin plays the same file with the same settings enabled

LinuxServerIO FFMPEG

Also of note, using VAAPI on the baremetal host appears to work fine.

Steps To Reproduce

  1. Install Jellyfin from the repo
  2. Attempt to follow Intel docs
  3. Select QuickSync from the Hardware Accel Dropdown
  4. Check all the boxes for hardware acceleration including the low powered options as recommended by the docs
  5. Attempt to play the file

Expected Behavior

File plays whether or not it can be transcoded

System (please complete the following information):

MediaInfo

Any file that might need transcoding. These are example files


Media

    Duration 42:18
    Bitrate 1147 kbps
    Width 624
    Height 352
    Aspect Ratio 1.78
    Video Resolution SD
    Container AVI
    Video Frame Rate PAL
    Video Profile advanced simple

Part

    Duration 42:18
    File Bones 1x01 Pilot Dvdrip-Topaz.avi
    Size 349.27 MB
    Container AVI
    Video Profile advanced simple

    Codec MPEG4
    Bitrate 955 kbps
    Bit Depth 8
    Chroma Location left
    Chroma Subsampling 4:2:0
    Coded Height 352
    Coded Width 624
    Frame Rate 25 fps
    Height 352
    Level 5
    Profile advanced simple
    Ref Frames 1 

Video
Title: 4K HEVC HDR
Codec: HEVC
Profile: Main 10
Level: 153
Resolution: 3840x2160
Aspect ratio: 16:9
Interlaced: No
Framerate: 23.976025
Bitrate: 98022 kbps
Bit depth: 10 bit
Video range: HDR
Video range type: HDR10
DV title: DV Profile 7.6
DV version major: 1
DV version minor: 0
DV profile: 7
DV level: 6
DV rpu preset flag: 1
DV el preset flag: 1
DV bl preset flag: 1
DV bl signal compatibility id: 6
Color space: bt2020nc
Color transfer: smpte2084
Color primaries: bt2020
Pixel format: yuv420p10le
Ref frames: 1

FFmpeg Logs

FFMPEG Log Jellyfin Logs LinuxServerIO FFMPEG

Additional Context

nyanmisaka commented 10 months ago
 pacman -Qs |grep intel
local/intel-gmmlib 22.3.14-1
local/intel-gpu-tools 1.27-2
local/intel-media-driver 23.4.2-1
local/intel-ucode 20231114-1
local/lib32-libva-intel-driver 2.4.1-1
local/libva-intel-driver 2.4.1-2
local/onevpl-intel-gpu 23.4.2-1
local/vulkan-intel 1:23.2.1-2

That's not enough for a baremetal installation.

N6000/JasperLake requires intel-media-sdk instead of the onevpl.

See Dependencies->optional in https://archlinux.org/packages/extra/x86_64/jellyfin-ffmpeg/

intel-media-sdk (optional) - for Intel Quick Sync Video

onevpl-intel-gpu (optional) - for Intel Quick Sync Video (Alder Lake and newer)

stratus-ss commented 10 months ago

Thank you i was missing the intel-media-sdk. I misunderstood, I thought the SDK was only required when making the packages.

Totally user error. Thanks!