Jump to content

Hardware encoding on Ubuntu Server


szimat

Recommended Posts

Hi,

 

few weeks ago there was an announcement that Emby Server will (is already) support Intel Quick Sync for transcoding. This is basically I believe the biggest step forward in terms of transcoding that can be achieved. Even a low budget Intel HW with QS support will be able to decode heavy streams with ease, probably even multiple ones. Running a Braswell based board based on N3150 SoC would do an incredible job, why waste money on expensive, load, power hungry hw like i3-i5-i7 when an N3150 can do the job just fine?

 

@@Luke is there any progress on this on Ubuntu Server (14.04.x LTS or later), running kernel 3.9 or 4.4.0? Is it already working and ready for testing? If not, what would you say, when can we expect to have this feature enabled?

 

Important to have this support available on kernel version higher then 4.3, as there is a fix starting from kernel 4.3 that with previous kernels prior 4.3 caused serious problems on Braswell based boards. Prior to that, a patch needed.

Edited by szimat
  • Like 1
Link to comment
Share on other sites

Hi,

 

few weeks ago there was an announcement that Emby Server will (is already) support Intel Quick Sync for transcoding. This is basically I believe the biggest step forward in terms of transcoding that can be achieved. Even a low budget Intel HW with QS support will be able to decode heavy streams with ease, probably even multiple ones. Running a Braswell based board based on N3150 SoC would do an incredible job, why waste money on expensive, load, power hungry hw like i3-i5-i7 when an N3150 can do the job just fine?

 

@@Luke is there any progress on this on Ubuntu Server (14.04.x LTS or later), running kernel 3.9 or 4.4.0? Is it already working and ready for testing? If not, what would you say, when can we expect to have this feature enabled?

 

Important to have this support available on kernel version higher then 4.3, as there is a fix starting from kernel 4.3 that with previous kernels prior 4.3 caused serious problems on Braswell based boards. Prior to that, a patch needed.

 

I believe there is no way out of compiling your own kernel, I don't know of any qsv patches for >4.1 kernel.

 

Unfortunatly the best bet for quite some time yet seems to be Windows. I don't think this will be supported on linux without quite a bit of manual tweaking for quite some time. It doesn't seem like Intel has any plans to get this support into the kernel anytime soon. The interest for this seems to be one the rise so hopefully "unoffical" kernel patches for 4.4 will show up when some distro with large user base start using it.

Link to comment
Share on other sites

I believe there is no way out of compiling your own kernel, I don't know of any qsv patches for >4.1 kernel.

 

Unfortunatly the best bet for quite some time yet seems to be Windows. I don't think this will be supported on linux without quite a bit of manual tweaking for quite some time. It doesn't seem like Intel has any plans to get this support into the kernel anytime soon. The interest for this seems to be one the rise so hopefully "unoffical" kernel patches for 4.4 will show up when some distro with large user base start using it.

 

You are correct, after reading a lot around I came to the same conclusion. It is very disappointing from Intel, but looks it is how things works. 

They still support just an ancient kernel officially, luckily there is a patch available for 4.1 kernels. However, proper support for Braswell boards come integrated starting from kernel 4.3, prior to that, a patch is also required. It is though possible to patch kernel 4.1 for Braswell (I think, as I used a patched 4.2 only), and then apply the qsv patch too, this might be a solution. The question is: is it worth it? I don't have now the link, but here at Emby forums a user posted some results with BayTrail board and qsv did not actually yield better performance in terms of lower CPU usage then ffmpeg ultrafast preset. Should be interesting to test it on Braswell, as it has much more advanced GPU then BayTrail, and maybe it was also a lack of kernel optimization for BayTrail causing some problems, as BayTrail support is still very shaky.

 

Do you have a link to 4.1 kernel patch for qsv? If I manage to find some time, I might try and see  the results on N3150. 

 

Windows is not an option at all, if a function is available only on Windows, to me it is like it doesn't exist at all. Let's see what will Intel release and change with 2016 version of Intel MSS (doubt anything too much up to date in these terms).

Link to comment
Share on other sites

These lower type cpu's are not listed as supported by Intel, but what the current status is ? I can't tell, havn't been able to find a updated list of supported cpu. It might just be that the baytrail in question had no qsv help. Only 4.1 patches I have saved is this one : http://tvheadend.org/attachments/download/3901/4.1.12-patches.tar it's tested with Haswell based cpu (wich I have).

Link to comment
Share on other sites

  • 2 weeks later...

If I'm correct, we need to see what will Intel release for 2016. As they favour and develop for CenOS, we won't get too much for Ubuntu/Debian Server.

@@Luke correct me if I'm wrong, but is the main problem the kernel patch or some licensing issue (or both)? I guess it will require kernel patch anyway, but correct me if I'm wrong. Maybe it is possible to implement this without the need of kernel patch?

 

Regarding the supported Intel cpu's: Braswell should be supported for sure, even if it is a lower end SoC. In terms of QSV it is exactly the same like in a Haswell, if I'm correct. Not sure about BYT, as there are many limitations (but I also think it should be supported).

  • Like 1
Link to comment
Share on other sites

runtimesandbox

If I'm correct, we need to see what will Intel release for 2016. As they favour and develop for CenOS, we won't get too much for Ubuntu/Debian Server.

@@Luke correct me if I'm wrong, but is the main problem the kernel patch or some licensing issue (or both)? I guess it will require kernel patch anyway, but correct me if I'm wrong. Maybe it is possible to implement this without the need of kernel patch?

 

Regarding the supported Intel cpu's: Braswell should be supported for sure, even if it is a lower end SoC. In terms of QSV it is exactly the same like in a Haswell, if I'm correct. Not sure about BYT, as there are many limitations (but I also think it should be supported).

 

From what i gathered when researching in to this was that intel was dropping support for debian / ubuntu and only going to be supporting CentOS / RHEL.

I believe it is possible to use the older intel SDK but you have to recompile the kernel with support for it. 

 

I haven't tried this as my emby server is virtualised. 

The other alternative is getting a cheap nvidia card that supports NVENC and using this instead of quicksync for ubuntu / debian

Link to comment
Share on other sites

  • 2 months later...
godfuture

Are there any news? I am very interested in Intel QSV.

Till now I understood that I need a ffmpeg with QSV support and a special build of emby.

 

Will there be a release with QSV support out of box on Ubuntu?

Link to comment
Share on other sites

Are there any news? I am very interested in Intel QSV.

Till now I understood that I need a ffmpeg with QSV support and a special build of emby.

 

Will there be a release with QSV support out of box on Ubuntu?

 

Emby has already done it's part via necessary command line params and ffmpeg builds. It just appears to not be supported in all environments. You'll have to try yours and report back to the community.

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...

So does Quick Synch with emby server work on Linux and N3150? I'm considering it, but i will not buy something on hope, that it may do well in future.

Link to comment
Share on other sites

  • 1 month later...
OddbOd

No, Intel support QSV on one Linux OS for only a small subset of Core and Xeon processors.

 

The simple fact remains that despite the hardware and reference documentation being available for years there has apparently been no low-level software development done by anyone outside Intel. The work done by the ffmpeg devs is impressive but it's also totally dependent on Intel's closed source binary drivers, which is why they didn't want to touch it in the first place.

 

Isn't it possible to maybe use VAAPI instead?

https://01.org/linuxgraphics/community/vaapi

Yes, support is already in ffmpeg, see https://wiki.libav.org/Hardware/vaapi for details. Finally some good news :)

Link to comment
Share on other sites

VA Api support will be in the next release of Emby Server, and available in the next day or so on the beta channel.

  • Like 1
Link to comment
Share on other sites

godfuture

VA api will bring a lot platforms from AMD and Intel in favor for hwacc on linux. Happy to see it coming :)

 

Is the number of supported video formats limited by the current implementation? What will be the system requirements for VA API on emby?

Link to comment
Share on other sites

Right now it's only for encoding to h264, which is what we do the vast majority of the time so that is fine.

 

As far as system requirements, we need help from the community to determine those. This is an experimental feature and we're not going to have all the answers. Enjoy.

Link to comment
Share on other sites

Very excited to hear that vaapi will be available! I can say my experience from Kodi, where v17 Krypton (already in alpha) brings vaapi support to Intel platforms on Linux (don't know anything about AMD). For testing vaapi in Kodi is available since a year, and it is performing very good.

Even low power Intel SoC is fully supported, especially from Braswell architecture. That means in practice that an N3150 SoC is capable of full vaapi on Kodi. Older Bay-Trail has a less powerful GPU (less number of execution units), but it still works with some limitation. Proper desktop hw also works great, even SB, IB, and Broadwell and Skylake are working very good, especially Skylake.

 

How will this work in Emby and what advantages it will have, we will see soon.

 

Sent from my Xperia Z3 Compact using Tapatalk

Edited by szimat
Link to comment
Share on other sites

MSattler

Right now it's only for encoding to h264, which is what we do the vast majority of the time so that is fine.

 

As far as system requirements, we need help from the community to determine those. This is an experimental feature and we're not going to have all the answers. Enjoy.

 

@@Luke,

 

Is there a performance difference between vaapi and Quick Sync from Intel?  Obviously only Quick Sync can do h265 on the latest processors, but all in all are the results in vaapi the same as in Quick Sync?

 

Thanks!

Link to comment
Share on other sites

I don't know the answer to that, sorry. I merged in Vaapi as a community contributed pull request. I am still pretty new to it.

Link to comment
Share on other sites

marmayr

@@MSattler: I do not know about the performance of QSV, because I did not get it to work. But regarding the VAAPI acceleration: I managed to get frame rates close to 120fps for full hd transcoding when testing it on an Intel Celeron J1900.

Edited by marmayr
  • Like 1
Link to comment
Share on other sites

@@MSattler: I do not know about the performance of QSV, because I did not get it to work. But regarding the VAAPI acceleration: I managed to get frame rates close to 120fps for full hd transcoding when testing it on an Intel Celeron J1900.

 

That is excellent, very good news! If I'm not mistaken, 120 fps is excellent for full HD content? And the J1900 is a Bay-Trail, which has a quite under-powered GPU because of only 4 execution units! I have a Braswell N3150 which has 12 EUs, in theory it should perform even much better. We will see in practice, I will try to find some time tonight and test it. Any recommendation which HD samples should I test?

 

Maybe give a link to few h264 samples that we could use for testing to have the same source to be able to compare the results?

 

Wonder what will be the CPU stress when doing VAAPI transcoding?

 

If Braswell doesn't go higher then 120 fps, it is still excellent I think, makes these very good low powered boards ideal for transcoding!

Link to comment
Share on other sites

@@Luke I just tried vaapi on Ubuntu Server 16.04, but it doesn't work. I installed vaapi1 from wsnipex ppa (since the default one in Ubuntu Server 16.04 has color issues), but still no go.

Do I need other packages installed for server, like xserver-xorg or anything? Can't test it on Ubuntu desktop.

 

EDIT: I have some hard time to make vaapi work on server. Anybody who managed to get it work on Ubuntu Server?

 

Sent from my Xperia Z3 Compact using Tapatalk

Edited by szimat
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...