Hardware Acceleration | Documentation - Jellyfin Project
文章推薦指數: 80 %
Hardware acceleration on Raspberry Pi 3 and 4
SearchResultsfor
Show/HideTableofContents
HardwareAcceleration
Jellyfinsupportshardwareacceleration(HWA)ofvideoencoding/decodingusingFFMpeg.
FFMpegandJellyfincansupportmultiplehardwareaccelerationimplementationssuchasIntelQuicksync(QSV),AMDAMFandNVIDIANVENC/NVDECthroughVideoAccelerationAPIs.
VA-APIisaVideoAccelerationAPIthatuseslibvatointerfacewithlocaldriverstoprovideHWA.
QSVusesamodified(forked)versionofVA-APIandinterfacesitwithlibmfxandtheirproprietarydrivers(listofsupportedprocessorsforQSV).
OS
RecommendedHWAcceleration
Linux
QSV,NVENC,AMF,VA-API
Windows
QSV,NVENC,AMF
MacOS
VideoToolbox
RPi
V4L2
GraphicsCardscomparisonusingHWA
Basedonhardwarevendor:
Vendor
SupportedHWAcceleration
NVIDIA
NVENC
AMD
AMF,VA-API
Intel
QSV,VA-API
Apple
VideoToolbox
RPi
V4L2
EnablingHardwareAcceleration
HardwareaccelerationoptionscanbefoundintheAdminDashboardundertheTranscodingsectionofthePlaybacktab.
Selectavalidhardwareaccelerationoptionfromthedrop-downmenu,indicateadeviceifapplicable,andcheckEnablehardwareencodingtoenableencodingaswellasdecoding,ifyourhardwaresupportsthis.
Thehardwareaccelerationisavailableimmediatelyformediaplayback.Noserverrestartisrequired.
OnLinuxyoucancheckavailableGPUusing:
lspci-nn|egrep-i"3d|display|vga"
orusinglshw:
lshw-Cdisplay
H.264/AVC10-bitvideos
ThehardwaredecodingofH.26410-bitakaHigh10profilevideoisnotsupportedbyanyIntel,AMDorNVIDIAGPU.
PleaseconsiderupgradingthesevideostoHEVC10-bitakaMain10profileifyouwanttooffloadyourCPUusageduringtranscoding.
IntelGen9andGen11+iGPUs
NoteTheIntelGuc/HucfirmwaremustbeenabledforoptionalLow-Powerencoding(pre-Gen11onlysupportsLow-PowerH.264).
Instructions:
ArchLinux:ArchWiki
Debian/Ubuntu:Brainiarc7'sgist
WarningForJasperLakeandElkhartLakechips(suchasN5095,N6005andJ6412),Low-Powerencodingmustbeenabled.
There'saknownkernelissueonthesechipsinlinux5.15thatcomeswithUbuntu22.04LTSpreventingyoufromusingLow-Power.Youmayneedtoupgradekernelforthis.
Thelinux-firmwaresupportisnotincludedinUbuntu20.04.3LTS.
AnyUbuntufrom21.10doesincludetherequireddrivers.
SupportedAccelerationMethods
ImportantInJellyfin10.8fullhardware-acceleratedfiltering(scaling,deinterlacing,tone-mappingandsubtitleburn-in)onIntel,AMDandNVIDIAhardwareareavailable.
jellyfin-ffmpegversion4.4.1-2orhigherisrequired,usinganolderororiginalversionofFFmpegmaydisablesomehardwarefilteringimprovements.
VA-API
NoteInteliGPUandAMDGPUonly.
AListofsupportedcodecsforVA-APIcanbefoundontheArchlinuxwiki.
WarningAsofJellyfin10.8theofficialDockerimageusesDebian11whichhasacompatibleversionofMesaforAMDGPUHEVCdecoding.
EarlierimagesdonotprovideacompatibleversionofMesa.
HardwareaccelerationonRaspberryPi3and4
WarningAsofJellyfin10.8hardwareaccelerationonRaspberryPiviaOpenMAXOMXwasdroppedandisnolongeravailable.
ThisdecisionwasmadebecauseRaspberryPiiscurrentlymigratingtoaV4L2basedhardwareacceleration,whichisalreadyavailableinJellyfinbutdoesnotsupportallfeaturesotherhardwareaccelerationmethodsprovideduetolackingsupportinFFmpeg.
Jellyfinwillfallbacktosoftwarede-andencodingforthoseusecases.
ThecurrentstateofhardwareaccelerationsupportinFFmpegcanbecheckedontherpi-ffmpegrepository.
NVIDIANVENC
NoteMinimumrequireddriverversionsinceJellyfin10.8:
Linux:470.57.02
Windows:471.41
Noteverycardhasbeentested.
Ifyouwantmorethanthreeparalleltranscodingstreamsonaconsumer(non-Quadro)NVIDIAcard,youcanusethispatchtoremovethelimit.
ThepatchisrecommendedforLinuxandWindowsbutmaybreakinthefuture,socheckthecompatibledriverversionsbeforeapplyingit.
OnLinuxusenvidia-smitocheckdriverandGPUcardversion.
Usefullinks:
OfficiallistofsupportedcodecsforrecentNVIDIAGraphicsCards.
OfficialNVIDIAffmpegdevelopmentdocs.
AMDAMF
NoteAMFisavailableonWindowsandLinux.
WarningAsofJellyfin10.8fullOpenCLbasedhardwarefilteringinAMFissupportedonWindows10andnewer.
AMDhasnotimplementedtheVulkanbasedHWdecoderandscalerinffmpeg,thedecodingspeedmaynotbeasexpectedonLinux.
Theclosedsourcedriveramdgpu-proisrequiredwhenusingAMFonLinux.
TipMostZenCPUsdonotcomewithintegratedgraphics.YouwillneedadedicatedGPU(dGPU)oraZenCPUwithintegratedgraphicsforhardwareacceleration.
IfyourZenCPUissuffixedwithaGorGEinmodelname,youhaveintegratedgraphics.
IntelQuickSync
NoteIntelQuickSync(QSV)isderivedfromVA-APIonLinuxandD3D11VAonWindows,whichcanutilizeIntel'sfixedfunctionhardwareandEU(executionunits)todovideoencoding,decodingandprocessing.
ImportantTouseQSVonLinuxwithrecentInteliGPUsthenonfreeIntelmediadriverisrequiredforfullhardwareacceleration.
Ifyouareusingjellyfin-ffmpegversion4.4.1-2orhigheritisincludedandyoudonotneedtoinstallitseperatly.
BroadwellornewergenerationisrequiredforQSVonLinux,otherwiseyouhavetouseVA-API.
Usefullinks:
OfficiallistofsupportedcodecsforrecentIntelGraphicsCards.
IntelQSVBenchmarksonLinux
Collectionofusefullinksandinformation
TipIfyourJellyfinserverdoesnotsupporthardwareacceleration,butyouhaveanothermachinethatdoes,youcanleveragerffmpegtodelegatethetranscodingtoanothermachine.
CurrentlyLinux-onlyandrequiresSSHbetweenthemachines,aswellassharedstoragebothformediaandfortheJellyfindatadirectory.
Commonsetups
Eachhardwareaccelerationtype,aswellaseachJellyfininstallationtype,hasdifferentprerequisitesforenablinghardwareacceleration.
ItisalwaysbesttoconsulttheFFMpegdocumentationontheaccelerationtypeyouchooseforthelatestinformation.
HardwareaccelerationonDocker(Linux)
NoteThisaregeneralinstructions,formorespecificinstructionspleascheckthenextsections!
InordertousehardwareaccelerationinDocker,thedevicesmustbepassedtothecontainer.
Toseewhatvideodevicesareavailable,youcanrunsudolshw-cvideoorvainfoonyourmachine.
VA-APImayrequiretherendergroupaddedtothedockerpermissions.
Therendergroupidcanbediscoveredin/etc/groupsuchasrender:x:122:.
Youcanusedockerruntostarttheserverwiththerequiredpermissionsanddevices.
Anexamplecommandisshownbelow.
dockerrun-d\
--volume/path/to/config:/config\
--volume/path/to/cache:/cache\
--volume/path/to/media:/media\
--user1000:1000\
--group-add=122\#Changethistomatchyoursystem
--net=host\
--restart=unless-stopped\
--device/dev/dri/renderD128:/dev/dri/renderD128\
--device/dev/dri/card0:/dev/dri/card0\
jellyfin/jellyfin
Alternatively,youcanusedocker-composewithaconfigurationfilesoyoudon'tneedtorunalongcommandeverytimeyourestartyourserver.
version:"3"
services:
jellyfin:
image:jellyfin/jellyfin
user:1000:1000
group_add:
-122
network_mode:"host"
volumes:
-/path/to/config:/config
-/path/to/cache:/cache
-/path/to/media:/media
devices:
#VAAPIDevices(examples)
-/dev/dri/renderD128:/dev/dri/renderD128
-/dev/dri/card0:/dev/dri/card0
NVIDIAhardwareaccelerationonDocker(Linux)
InordertoachievehardwareaccelerationusingDocker,severalstepsarerequired.
Prerequisites:
GNU/Linuxx86_64withkernelversion>3.10
Docker>=19.03
NVIDIAGPUwithArchitecture>Fermi(2.1)
NVIDIAdrivers>=361.93
NVIDIAContainerToolkitneedstobeinstalled
FollowtheinstructionsinthelinkabovetoinstalltheNVIDIAContainerToolkitforyourLinuxdistribution.
Startyourcontainerbyaddingthisparameter:
--gpusall\
Acompleteruncommandwouldlooklikethis:
dockerrun-d\
--name=jellyfin\
--gpusall\
-p8096:8096\
-p8920:8920\
-v/config:/config\
-v/media:/media\
-v/cache:/cache\
--restartunless-stopped\
jellyfin/jellyfin
Orwithdocker-compose>1.28,addthedeploysectiontoyourJellyfinservice:
services:
jellyfin:
image:jellyfin/jellyfin
#...yourJellyfinconfig
deploy:
resources:
reservations:
devices:
-capabilities:[gpu]
Therearesomespecialstepswhenrunningwiththefollowingoption:
--user1000:1000
Youmayneedtoaddthisusertothevideogrouponyourhostmachine:
usermod-aGvideo
延伸文章資訊
- 1How To Enable Hardware Acceleration In Chromium On ...
This article explains how to enable hardware acceleration in Chromium browser running on Raspberr...
- 2Raspberry Pi 4 hardware acceleration : r/openSUSE - Reddit
Hi, Is it currently possible to have 3D and video hardware acceleration on the Raspberry Pi 4 yet...
- 3Raspberry Pi 4 - Install JellyFin Media Server On ... - YouTube
- 4Chromium 88 hardware acceleration [solved]
I have a Raspberry Pi 4 (4 GB) and Chromium "Version 88.0.4324.187 ... Hardware acceleration disa...
- 5How should I enable hardware graphics acceleration in ...
I have just installed Ubuntu MATE 21.10 (32-bit, armhf) on my Raspberry Pi 4 with 4 Gb of RAM. No...