Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

VAAPI vs. QSV #210

Open
cromefire opened this issue Jan 22, 2020 · 21 comments
Open

VAAPI vs. QSV #210

cromefire opened this issue Jan 22, 2020 · 21 comments

Comments

@cromefire
Copy link
Contributor

@Artiume
jellyfin-qsv.log
jellyfin-vaapi.log

Have a look at the QSV log does it even use QSV? It's fast enough, but it does not have it in the commandline

@EraYaN
Copy link
Contributor

EraYaN commented Jan 23, 2020

Your qsv log is a plain software encode. Please provide the actual run with qsv h264_qsv. It'll look like this: https://trac.ffmpeg.org/wiki/Hardware/QuickSync

@Artiume
Copy link
Contributor

Artiume commented Jan 23, 2020

@EraYaN i believe he did try QSV, we were discussing it in the chat. Do you know any reason why it wouldn't use libmfx? I can't test vaapi/qsv so I can't verify the functionality of the stream builder. Have you ever used qsv?

@cromefire
Copy link
Contributor Author

I definitely configured QSV so either there are drivers missing or JF has a problem with it

@Artiume
Copy link
Contributor

Artiume commented Jan 23, 2020

Notes:
Enabling QSV with ffmpeg
https://software.intel.com/en-us/articles/quick-start-on-integrating-ffmpeg-libraries

Dockerfile for compiling ffmpeg,
https://github.com/jellyfin/jellyfin-ffmpeg/blob/39f183cc303e9c8542c9905e31e733490f999b2f/docker/Dockerfile#L348-L379

Person troubleshooting their QSV.
https://software.intel.com/en-us/forums/media/topic/803933

General Info
https://software.intel.com/sites/default/files/media_server_studio_getting_started_guide.pdf

From the looks of it --enable-nonfree isn't there. Based on licensing, can we add that or would that cause trouble for us?

@cromefire
Copy link
Contributor Author

cromefire commented Jan 23, 2020

No that makes it unredistributable
(It also shows a big warning telling you that then)

@cromefire
Copy link
Contributor Author

The only thing you could theoretically do is build it on that device automatically

@cromefire
Copy link
Contributor Author

I don't what to build my own ffmpeg right now so I think I guess we can close this pretty much

@Artiume
Copy link
Contributor

Artiume commented Jan 23, 2020

https://www.ffmpeg.org/legal.html

I can add more notes I want to parse if you want

@Artiume
Copy link
Contributor

Artiume commented Jan 23, 2020

NDI added nonfree to their FFmpeg build and all hell broke lose. Looks like it was because their overall license was the issue, not the nonfree itself.
https://trac.ffmpeg.org/ticket/7589?cversion=0&cnum_hist=11

Emby thread with compiling FFmpeg locally.
https://emby.media/community/index.php?/topic/10723-gpu-transcoding-intel-quicksync-and-nvidia-nvenc/page-30

Unofficial FFMPEG 'How not to get into Hall of Shame' FAQ for legalities
https://forum.doom9.org/showthread.php?t=154477

More instructions on QSV and Linux
https://www.intel.de/content/dam/www/public/emea/xe/en/documents/white-papers/quicksync-video-ffmpeg-install-valid.pdf
3.Configure FFmpeg with “--enable –libmfx –enable-nonfree”, build, and install.This requires copying include files to /opt/intel/mediasdk/include/mfx andadding a libmfx.pc file. More details below.
We also don't enable libmfx by default. I need to dig into what the nonfree enables. As long as it doesn't allow for libs we can't use, we should be good to go, but licensing isn't my forte. I'm finding mostly results about people violating GPL, not for violating with -nonfree in a GPL license.

@anthonylavado
Copy link
Member

For reference (because this has been long lost in the main repo), here are Emby's flags:
https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/emby-server#n75

@Artiume
Copy link
Contributor

Artiume commented Jan 23, 2020

Thanks. So for HWA we're missing --enable-nvdec --enable-nvenc --enable-libmfx. Not sure if there's any other flags we should be including.

I've seen reports of people using NVENC so I want to check their reddit post and see if they did anything special.

Edit:
https://www.reddit.com/r/jellyfin/comments/amuyba/nvenc_nvdec_working_in_jellyfin_on_ubuntu_server/
I'm happy to report that hardware transcoding with NVIDIA GPUs under Ubuntu Server 18.04 works in an out-of-the-box config on Jellyfin!
hmmm....

@cromefire
Copy link
Contributor Author

Just be sure to not make it unredistributable by accident

@Artiume
Copy link
Contributor

Artiume commented Jan 23, 2020

Don't worry, we won't make changes without thorough research and approvals. It appears that nonfree isn't needed based on other builds, but needs testing to be verified.

Good breakdown.
http://www.ffmpeg-archive.org/What-does-enable-gpl-and-enable-nonfree-do-td2239371.html

Another project tackling the nonfree issue.
SynoCommunity/spksrc#3564

nonfree build example
https://gist.github.com/silverkorn/db5451f836e2bf9dea2a8358475eb5f4

@JustAMan
Copy link
Contributor

Shameless plug of ffmpeg build: https://github.com/JustAMan/ffmpeg-standalone-build

@cromefire
Copy link
Contributor Author

The nonfree warning is commented out on your repo, which is not good

@Artiume
Copy link
Contributor

Artiume commented Jan 27, 2020

So you can provide build instructions, you can't provide built binaries. The licenses are weird about that

@cromefire
Copy link
Contributor Author

Oh sorry it's just it's another place

@cromefire
Copy link
Contributor Author

Well if there's docker on that system you could automatically build it 😂

@Artiume
Copy link
Contributor

Artiume commented Jan 29, 2020

jellyfin/jellyfin#2261 (comment)

Can you make sure these are installed?

@cromefire
Copy link
Contributor Author

E: Unable to locate package intel-media-va-driver-non-free

Ubuntu 18.04

@cromefire
Copy link
Contributor Author

Won't work for me anyway my processor is older than Broadwell

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

5 participants