Jump to content

GPU Transcoding (Intel QuickSync and nVidia NVENC)


witteschnitte

Recommended Posts

babgvant

Finally my project of a super lowpower nas has started.

 

The final configuration will be xenserver, with two vm:

Windows server 2008 r2 for emby

Freenas for the rest

 

The cpu is a low power skylake core i7-6700T

 

All this was meant to be able to passthrough the gpu to the 2008 vm and use it for ffmpeg in emby.

 

To my surprise ALL the encoding that I do with that vm locks at different minutes in different ways.

 

At that point a bit disappointed I tested immediately handbrake and with my surprise again it is working flawlessly without stopping.

 

Is there something I should do more to let it work?

 

The VM locks or ffmpeg locks?

  • Like 1
Link to comment
Share on other sites

The VM locks or ffmpeg locks?

Ffmpeg locks, the same way in appearance as the bug that you filed to Ffmpeg trackt. Handbrake instead has no problem.

 

This can be due to skylake and the fact that is new.

Edited by eTomm
Link to comment
Share on other sites

runtimesandbox

That's obsolete now. That was a community contributed hack but now that core support has been added, I have not done any testing to see if that still works (it probably doesn't). We don't have any official nvenc support right now.

 

Is NEVC going to be officially supported at all by Emby? Even if we have to build our own ffmpeg it would make a big difference by the sound of it.

 

As Linux support for Intel Quick Sync is only going to be CentOS from now on, and the trouble passing the Intel GPU through hypervisors, NVEC is the only option for some

Link to comment
Share on other sites

Probably but that fact that you have to bring your own ffmpeg does affect the priority level, because not many people will do that, or even realize that they need to do that.

Link to comment
Share on other sites

witteschnitte

@@Luke

 

I talked to John Van Sickle (the Provider of your ffmpeg builds for Linux). He will include the necessary libmfx this week in his ffmpeg release.

  • Like 1
Link to comment
Share on other sites

babgvant

For those (like me) who were experiencing issues ffmpeg locking when scaling during QS transcoding please try this build of ffmpeg. I can no longer reproduce, but before calling it closed and communicating that to the ffmpeg devs I would like to get a bit more mileage on it.

  • Like 2
Link to comment
Share on other sites

Tranquil

Issue is not fixed for me.

After seeking inside a stream, there is a 2nd instance of FFMPEG created, 1st one is still running...

 

Serverlog: http://pastebin.com/viZtGAcS

 

Transcode Log:http://pastebin.com/mWRBcspB

 

Edit: now saw, that you are speaking of scaling issues: That is okay for me. :-)

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

MSattler

Issue is not fixed for me.

After seeking inside a stream, there is a 2nd instance of FFMPEG created, 1st one is still running...

 

Serverlog: http://pastebin.com/viZtGAcS

 

Transcode Log:http://pastebin.com/mWRBcspB

 

Edit: now saw, that you are speaking of scaling issues: That is okay for me. :-)

 

Quick question, has anyone confirmed if Quicksync in this case will work with a R9 290x video card?  As far as I can tell that appears to be the only video card I can find which works with passthrough in ESXi.

 

 

Thanks!

Link to comment
Share on other sites

babgvant

Quick question, has anyone confirmed if Quicksync in this case will work with a R9 290x video card?  As far as I can tell that appears to be the only video card I can find which works with passthrough in ESXi.

 

 

Thanks!

 

QS will only work with modern Intel GPUs.

  • Like 1
Link to comment
Share on other sites

MSattler

QS will only work with modern Intel GPUs.

 

Rats ok.  And of course Intel iGPU's typically don't passthrough ESXi well.  Is my only option then to find an Nvidia Card which will passthrough?

Link to comment
Share on other sites

babgvant

Rats ok.  And of course Intel iGPU's typically don't passthrough ESXi well.  Is my only option then to find an Nvidia Card which will passthrough?

 

I'm not sure what the status of Nvidia HWA is in Emby. It should be possible, but unfortunately there is a somewhat blocking issue in that versions of ffmpeg with NVENC compiled in can't be distributed, so you have to compile it yourself.

Link to comment
Share on other sites

I am a newbie for linux. I have used it for a month, but I have done a lot of thins under that time. I have an Asrock N3150 motherboard and I installed on it a Ubuntu Server 15.10. I follow this tutorial http://forum.kodi.tv/showthread.php?tid=231955&highlight=sort+by+date and configure Kodi. I used a custom kernel from a Kodi developer: http://fritsch.fruehberger.net/kernel/

 

I did setup Emby Server and I am curious to using Intel Quick Sync, If I can. Could you give me an instruct for it? I read back here but I don't know what files I should use from git release and how :)

Now if I play an avi (about 1,5GB) it consume about 25% CPU, playing a HD movie, it is 70% and on 1080p, it is more than 90% or get lagg under playing.

Edited by zserrbo
Link to comment
Share on other sites

I downloaded this file ffmpeg-git-64bit-static.tar.xz from here: http://johnvansickle.com/ffmpeg/, unpack and run the ./ffmpeg command. I set quick sync option for emby server and I played some videos. 

720p - ~17-30% cpu usage when I playing in Chrome. Hmmm, I tried several times but it was about 70%. Or am I wrong? :D

 

Then I did the sudo apt-get install intel-gpu-tools command that I can check GPU usage with intel_gpu_top. It shows that no GPU usage (~1%) when I play 720p on other computer's browser. It's strange. If quick sync works, I think so it should use my GPU.

 

Pls confirm that I did it good.

Link to comment
Share on other sites

I downloaded this file ffmpeg-git-64bit-static.tar.xz from here: http://johnvansickle.com/ffmpeg/, unpack and run the ./ffmpeg command. I set quick sync option for emby server and I played some videos. 

720p - ~17-30% cpu usage when I playing in Chrome. Hmmm, I tried several times but it was about 70%. Or am I wrong? :D

 

Then I did the sudo apt-get install intel-gpu-tools command that I can check GPU usage with intel_gpu_top. It shows that no GPU usage (~1%) when I play 720p on other computer's browser. It's strange. If quick sync works, I think so it should use my GPU.

 

Pls confirm that I did it good.

 

Hi, welcome. Currently, to my knowledge, that build does not include libmfx.

Link to comment
Share on other sites

yea that would be fantastic. If you guys could keep me posted when that happens we will update the server to the new version.

Link to comment
Share on other sites

Oh I understand and I really thanks both of you for quick response :)

 

I don't see in the release build yet, but it's a good news. So if it be happen, streaming should use my GPU, isn' it?

 

 

up1: Oh I miss a question. Can cause any trouble this things for my Kodi install (I posted link before - EGL and VAAPI)? If it is not off topic here.

Edited by zserrbo
Link to comment
Share on other sites

These are the instructions from Intel http://www.intel.com/content/dam/www/public/us/en/documents/white-papers/quicksync-video-ffmpeg-install-valid.pdf

 

It seems creating and "out of box" experience for this on linux seems impossible right now. Not only do you have to download propriatary software from Intel (I assume emby cannot distribute this ?) but you also need to patch the linux kernel. No vanilla linux kernel have this support.

 

Basically you need:

1. Download software from Intel, install it, and patch kernel (hope that your kernel version is one that it's able to patch)

2. FFMPEG with patches.

3. Emby issue the right commands (I guess this is already in place)

Link to comment
Share on other sites

It's already there for all kinds of streams but only when enough media info is supplied by the tv provider.

  • Like 1
Link to comment
Share on other sites

No, you can enable it directly in emby server but currently it's supported on windows only, though development is ongoing for other operating systems.

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...