Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to custom jellyfin-ffmpeg that contains full feature Intel iHD driver #135

Closed
wants to merge 1 commit into from

Conversation

nyanmisaka
Copy link
Contributor

@nyanmisaka nyanmisaka commented Jan 5, 2022

linuxserver.io


  • I have read the contributing guideline and understand that I have made the correct modifications

Description:

Switch to custom jellyfin-ffmpeg package that contains full feature Intel iHD driver.

I will continue to maintain this package whenever the upstream tags a new release.

You can also build it by removing the commented out lines around
https://github.com/jellyfin/jellyfin-ffmpeg/blob/883570db52d230f7f9ab6c532069002d7a5ed90c/docker-build.sh#L165

apt install git mmv make docker.io
systemctl start docker
git clone https://github.com/jellyfin/jellyfin-ffmpeg.git
cd jellyfin-ffmpeg
mkdir target
./build [distro] [arch] target

The intel-media-driver-non-free package from intel repo is always linked against their latest libva, which will break the QSV/VAAPI support in our ffmpeg over time.

$ dpkg -c jellyfin-ffmpeg_4.4.1-1-focal_amd64.deb
drwxr-xr-x root/root         0 2022-01-04 02:07 ./
drwxr-xr-x root/root         0 2022-01-04 02:07 ./usr/
drwxr-xr-x root/root         0 2022-01-04 02:07 ./usr/lib/
drwxr-xr-x root/root         0 2022-01-04 02:07 ./usr/lib/jellyfin-ffmpeg/
-rwxr-xr-x root/root  24752032 2022-01-04 02:07 ./usr/lib/jellyfin-ffmpeg/ffmpeg
-rwxr-xr-x root/root  24551472 2022-01-04 02:07 ./usr/lib/jellyfin-ffmpeg/ffprobe
drwxr-xr-x root/root         0 2022-01-04 02:07 ./usr/lib/jellyfin-ffmpeg/lib/
drwxr-xr-x root/root         0 2022-01-04 02:07 ./usr/lib/jellyfin-ffmpeg/lib/dri/
-rw-r--r-- root/root   8710120 2022-01-04 02:07 ./usr/lib/jellyfin-ffmpeg/lib/dri/i965_drv_video.so
-rw-r--r-- root/root  36941616 2022-01-04 02:07 ./usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so
-rw-r--r-- root/root   1597832 2022-01-04 02:07 ./usr/lib/jellyfin-ffmpeg/lib/libdav1d.so
-rw-r--r-- root/root   1597832 2022-01-04 02:07 ./usr/lib/jellyfin-ffmpeg/lib/libdav1d.so.5
-rw-r--r-- root/root   1597832 2022-01-04 02:07 ./usr/lib/jellyfin-ffmpeg/lib/libdav1d.so.5.1.1
-rw-r--r-- root/root    591336 2022-01-04 02:07 ./usr/lib/jellyfin-ffmpeg/lib/libigdgmm.so.12.0.0
-rw-r--r-- root/root    167032 2022-01-04 02:07 ./usr/lib/jellyfin-ffmpeg/lib/libigfxcmrt.so.7.2.0
-rw-r--r-- root/root     63728 2022-01-04 02:07 ./usr/lib/jellyfin-ffmpeg/lib/libmfx.so.1.35
-rw-r--r-- root/root  14584624 2022-01-04 02:07 ./usr/lib/jellyfin-ffmpeg/lib/libmfxhw64.so.1.35
-rw-r--r-- root/root     14600 2022-01-04 02:07 ./usr/lib/jellyfin-ffmpeg/lib/libva-drm.so.2.1400.0
-rw-r--r-- root/root    223960 2022-01-04 02:07 ./usr/lib/jellyfin-ffmpeg/lib/libva.so.2.1400.0
-rw-r--r-- root/root    842712 2022-01-04 02:07 ./usr/lib/jellyfin-ffmpeg/lib/libzimg.so.2.0.0
drwxr-xr-x root/root         0 2022-01-04 02:07 ./usr/lib/jellyfin-ffmpeg/lib/mfx/
-rw-r--r-- root/root  11246336 2022-01-04 02:07 ./usr/lib/jellyfin-ffmpeg/lib/mfx/libmfx_h264la_hw64.so
-rw-r--r-- root/root     14544 2022-01-04 02:07 ./usr/lib/jellyfin-ffmpeg/lib/mfx/libmfx_hevc_fei_hw64.so
-rw-r--r-- root/root     14552 2022-01-04 02:07 ./usr/lib/jellyfin-ffmpeg/lib/mfx/libmfx_hevcd_hw64.so
-rw-r--r-- root/root     14544 2022-01-04 02:07 ./usr/lib/jellyfin-ffmpeg/lib/mfx/libmfx_hevce_hw64.so
-rw-r--r-- root/root     14552 2022-01-04 02:07 ./usr/lib/jellyfin-ffmpeg/lib/mfx/libmfx_vp8d_hw64.so
-rw-r--r-- root/root     14552 2022-01-04 02:07 ./usr/lib/jellyfin-ffmpeg/lib/mfx/libmfx_vp9d_hw64.so
-rw-r--r-- root/root     14544 2022-01-04 02:07 ./usr/lib/jellyfin-ffmpeg/lib/mfx/libmfx_vp9e_hw64.so
-rw-r--r-- root/root      1561 2022-01-04 02:07 ./usr/lib/jellyfin-ffmpeg/lib/mfx/plugins.cfg
drwxr-xr-x root/root         0 2022-01-04 02:07 ./usr/share/
drwxr-xr-x root/root         0 2022-01-04 02:07 ./usr/share/doc/
drwxr-xr-x root/root         0 2022-01-04 02:07 ./usr/share/doc/jellyfin-ffmpeg/
-rw-r--r-- root/root     13030 2022-01-04 02:07 ./usr/share/doc/jellyfin-ffmpeg/changelog.Debian.gz
-rw-r--r-- root/root     45943 2021-01-25 19:14 ./usr/share/doc/jellyfin-ffmpeg/copyright
lrwxrwxrwx root/root         0 2022-01-04 02:07 ./usr/lib/jellyfin-ffmpeg/lib/libigdgmm.so -> libigdgmm.so.12
lrwxrwxrwx root/root         0 2022-01-04 02:07 ./usr/lib/jellyfin-ffmpeg/lib/libigdgmm.so.12 -> libigdgmm.so.12.0.0
lrwxrwxrwx root/root         0 2022-01-04 02:07 ./usr/lib/jellyfin-ffmpeg/lib/libigfxcmrt.so -> libigfxcmrt.so.7
lrwxrwxrwx root/root         0 2022-01-04 02:07 ./usr/lib/jellyfin-ffmpeg/lib/libigfxcmrt.so.7 -> libigfxcmrt.so.7.2.0
lrwxrwxrwx root/root         0 2022-01-04 02:07 ./usr/lib/jellyfin-ffmpeg/lib/libmfx.so -> libmfx.so.1
lrwxrwxrwx root/root         0 2022-01-04 02:07 ./usr/lib/jellyfin-ffmpeg/lib/libmfx.so.1 -> libmfx.so.1.35
lrwxrwxrwx root/root         0 2022-01-04 02:07 ./usr/lib/jellyfin-ffmpeg/lib/libmfxhw64.so -> libmfxhw64.so.1
lrwxrwxrwx root/root         0 2022-01-04 02:07 ./usr/lib/jellyfin-ffmpeg/lib/libmfxhw64.so.1 -> libmfxhw64.so.1.35
lrwxrwxrwx root/root         0 2022-01-04 02:07 ./usr/lib/jellyfin-ffmpeg/lib/libva-drm.so -> libva-drm.so.2.1400.0
lrwxrwxrwx root/root         0 2022-01-04 02:07 ./usr/lib/jellyfin-ffmpeg/lib/libva-drm.so.2 -> libva-drm.so.2.1400.0
lrwxrwxrwx root/root         0 2022-01-04 02:07 ./usr/lib/jellyfin-ffmpeg/lib/libva.so -> libva.so.2.1400.0
lrwxrwxrwx root/root         0 2022-01-04 02:07 ./usr/lib/jellyfin-ffmpeg/lib/libva.so.2 -> libva.so.2.1400.0
lrwxrwxrwx root/root         0 2022-01-04 02:07 ./usr/lib/jellyfin-ffmpeg/lib/libzimg.so -> libzimg.so.2.0.0
lrwxrwxrwx root/root         0 2022-01-04 02:07 ./usr/lib/jellyfin-ffmpeg/lib/libzimg.so.2 -> libzimg.so.2.0.0

Benefits of this PR and context:

How Has This Been Tested?

Intel QSV/VAAPI HWA + OpenCL/VPP Tone-mapping are all verified with jellyfin-ffmpeg 4.4.1-1.

I'm the main maintainer of jellyfin-ffmpeg in the past two years, many HWA improvements have been made in this new ffmpeg and the upcoming Jellyfin 10.8 release. Hope everyone who uses linuxserver container can enjoy it!

@nyanmisaka
Copy link
Contributor Author

@aptalca Could you review this? Thanks.

@aptalca
Copy link
Member

aptalca commented Jan 5, 2022

Thanks for lending a hand, but I don't think uploading a binary to our git repo is the proper solution to this for a couple of reasons:

  1. It doesn't work with our ci automation (would require a new upload to git and a commit every time it's updated)
  2. We prefer having full transparency as to how everything in our images is built or where they came from so we avoid uploading binaries manually (curling one during build from an upstream repo would be fine)

How is jellyfin currently handling this with their image? Wouldn't it be ideal for jellyfin to ship the necessary drivers alongside ffmpeg in their apt repo? Or perhaps link the correct version of the intel driver as a dep for it?

@nyanmisaka
Copy link
Contributor Author

nyanmisaka commented Jan 5, 2022

Actually I am awared of these when writing this PR.

The reason why jellyfin forked from emby is that they used some libraries that are not compatible with GPL and they refused to provide source code. Therefore, avoiding non-free things has always been a rule in the core team since day 1.

So no non-free driver is included in jellyfin official images. User have to build or install it manually to enable QSV support.

Or perhaps link the correct version of the intel driver as a dep for it?

I think this advice is feasible, we have to specify a certain version of intel driver for apt install.
Drivers usually doesn't need to be updated frequently, unless the key functions or fixes we need are introduced.

@nyanmisaka
Copy link
Contributor Author

This PR can be closed by #136

@nyanmisaka nyanmisaka closed this Jan 5, 2022
@nyanmisaka nyanmisaka deleted the ff-4.4.1-1 branch January 5, 2022 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants