Jump to content


Photo

3.6.0.58 - hardware acceleration settings


  • Please log in to reply
317 replies to this topic

#1 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 156950 posts
  • Local time: 09:13 AM

Posted 26 October 2018 - 04:08 PM

There is now more advanced control available over hardware acceleration.

 

5bd373e8ef7c1_Untitled.png

 

 

And when you select advanced, you can now rank your preferred encoders and decoders.

 

5bd37414b1405_Untitled.png

 

I think you guys will like this. Please try it out.

 

@softworkz did a great job on this. We now have a nice multi-platform solution that gives you more advanced control, and only shows you what is relevant to your platform.

 

Thanks !


  • SikSlayer, Spaceboy, MikePlanet and 10 others like this

#2 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 156950 posts
  • Local time: 09:13 AM

Posted 26 October 2018 - 04:08 PM

I know @Waldonnis and @cayars will like this.


  • cayars likes this

#3 Mike5123 OFFLINE  

Mike5123

    Advanced Member

  • Members
  • 69 posts
  • Local time: 05:13 AM

Posted 26 October 2018 - 05:45 PM

Any reason to use QuickSync over DXVA? Not too well versed in this area. Great work!

 

Edit: Will this beta be available on Linux/Debian?


Edited by Mike5123, 26 October 2018 - 05:53 PM.


#4 samuelqwe OFFLINE  

samuelqwe

    Advanced Member

  • Members
  • 393 posts
  • Local time: 08:13 AM
  • LocationEarth, Milky Way

Posted 26 October 2018 - 06:38 PM

I like all these options! So setting to “Yes” picks the best hardware accelerators based on your hardware/OS/drivers?

#5 cybergrimes OFFLINE  

cybergrimes

    Advanced Member

  • Members
  • 524 posts
  • Local time: 08:13 AM
  • LocationMinnesota

Posted 26 October 2018 - 06:41 PM

This just reminds me-- does anyone have MPEG2 decoding working with QSV? It always fails on my Kaby Lake chip. No problems if I leave it at encode.

 

edit: also, thanks for the advanced settings. It's broken out nicely.


Edited by cybergrimes, 26 October 2018 - 06:44 PM.


#6 denz OFFLINE  

denz

    Advanced Member

  • Members
  • 2390 posts
  • Local time: 09:13 PM
  • LocationPerth, Australia

Posted 26 October 2018 - 09:05 PM

With this version I get this again and it was fixed with the last version

 

[mpeg2_qsv @ 000001f289380d80] Decoding pixel format '(null)' is not supported
Error while decoding stream #0:0: Function not implemented
[mpeg2_qsv @ 000001f289380d80] Decoding pixel format '(null)' is not supported
Error while decoding stream #0:0: Function not implemented

 

 

When I enable

Preferred Hardware Encoders

encoding there is lot of these errors and video stops starts and after while it plays properly.

 

 

 

Attached Files



#7 softworkz OFFLINE  

softworkz

    Advanced Member

  • Developers
  • 2712 posts
  • Local time: 03:13 PM

Posted 26 October 2018 - 09:10 PM

I like all these options! So setting to “Yes” picks the best hardware accelerators based on your hardware/OS/drivers?

 

No, unfortunately it doesn't (yet).

 

The checkboxes that are shown are just there because an acceleration method _might_ be available based on the OS on which Emby is running on.

We are not yet checking which acceleration method is really available and guaranteed to work.



#8 softworkz OFFLINE  

softworkz

    Advanced Member

  • Developers
  • 2712 posts
  • Local time: 03:13 PM

Posted 26 October 2018 - 09:14 PM

With this version I get this again and it was fixed with the last version

 

[mpeg2_qsv @ 000001f289380d80] Decoding pixel format '(null)' is not supported
Error while decoding stream #0:0: Function not implemented
[mpeg2_qsv @ 000001f289380d80] Decoding pixel format '(null)' is not supported
Error while decoding stream #0:0: Function not implemented

 

The "fix" that was in the previous version was to use DXVA (on Windows), even when QSV was configured.

Now we'll come to really fix this. Until then, you may choose DXVA instead.


  • denz likes this

#9 samuelqwe OFFLINE  

samuelqwe

    Advanced Member

  • Members
  • 393 posts
  • Local time: 08:13 AM
  • LocationEarth, Milky Way

Posted 26 October 2018 - 09:47 PM

No, unfortunately it doesn't (yet).

The checkboxes that are shown are just there because an acceleration method _might_ be available based on the OS on which Emby is running on.
We are not yet checking which acceleration method is really available and guaranteed to work.


Ok, I see. Nevertheless, this new configuration screen is very good to have. I will look forward to future iterations of hardware acceleration with Emby.

#10 softworkz OFFLINE  

softworkz

    Advanced Member

  • Developers
  • 2712 posts
  • Local time: 03:13 PM

Posted 26 October 2018 - 09:54 PM

Any reason to use QuickSync over DXVA? Not too well versed in this area. Great work!

 

Edit: Will this beta be available on Linux/Debian?

 

There are significant differences between using QuickSync vs. DXVA.

 

DXVA uses a mixture of software and hardware for decoding. Basically, DXVA has software codecs that are capable to offload certain operations to be performed by a GPU.

The amount of work that is done by the GPU depends on the graphics driver implementation.

 

With Intel GPUs, the amount of work done by the GPU is rather high, so it is not too far away from using QSV directly - so for a decoding-only scenario it's an acceptable choice to use DXVA instead.

 

But for transcoding, we don't only need decoding, we also need encoding. Typically encoding is the much harder part of this process. Also the IO plays a significant role. Copying memory back and forth to the GPU takes its toll. So the ideal scenario is to have both parts done by the GPU board: 

  • Send the input stream to the GPU board
  • Receive the fully transcoded stream from the GPU board

This is not possible with DXVA. DXVA cannot even do encoding - just decoding.

 

That's one reason why we have both, QSV and DXVA decoding options.

(note: the scenario described above - QSV transcoding without memory copying - is not yet implemented)

 

 

For Nvidia GPU boards, the situation is different:

  • DXVA with Nvidia boards is not integrated as good as with Intel drivers
    Less work is done by the hardware here
    .
  • Here, it's much better to use the NVDEC api for decoding
    (also the same as above applies: it's best to use NVDEC/NVENC together)
    .
  • BUT: NVDEC instances are very limited. On most Nvidia boards, only a single instance of NVDEC is supported
    This limit does not apply to DXVA decodings, though!
    .
  • Conclusion: In this case, you would configure NVDEC as the top priority and DXVA at the second position to be used in case no more NVDEC instances are available

(note: check of and fallback-to-next based on instance counts is not implemented yet)


  • SikSlayer, denz, Maximus Naxsus and 3 others like this

#11 cayars OFFLINE  

cayars

    Advanced Member

  • Alpha Testers
  • 3391 posts
  • Local time: 09:13 AM

Posted 27 October 2018 - 01:09 AM

This looks like a really nice upgrade for Transcoding!

Can't wait to play with this over the weekend. 

 

I think you guys hit the sweet spot of configuration with the "YES" vs "ADVANCED" settings for novice/experienced user as well.


  • Devdroid likes this

#12 CBers OFFLINE  

CBers

    Advanced Member

  • Moderators
  • 15930 posts
  • Local time: 02:13 PM
  • LocationEngland

Posted 27 October 2018 - 05:48 AM

No, unfortunately it doesn't (yet).

We are not yet checking which acceleration method is really available and guaranteed to work.


This default option should be NO, as the default option in the current Stable server is NONE.
  • FrostByte, Hitsville and PenkethBoy like this

#13 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 156950 posts
  • Local time: 09:13 AM

Posted 27 October 2018 - 01:12 PM

This default option should be NO, as the default option in the current Stable server is NONE.

 

Actually it's going to be YES, on some platforms at least, and dxva for windows will be enabled by default. MediaCodec for android will be enabled by default as well.

 

And gradually, we will enable more and more by default on various platforms.


  • cayars likes this

#14 Guest_asrequested_* OFFLINE  

Guest_asrequested_*
  • Guests

Posted 27 October 2018 - 04:32 PM

Quick Sync is working nicely with my i7 6700k HD630 GPU :)

Input #0, matroska,webm, from 'file:\\Server\e\Library\The X files\Season 1\The X-Files S01E01 Pilot (1080 x265 Joy).mkv':
  Metadata:
    CREATION_TIME   : 
    ENCODER         : Lavf55.12.0
  Duration: 00:48:11.74, start: 0.000000, bitrate: 1095 kb/s
    Stream #0:0: Video: hevc (Main), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 23.98 tbc (default)
    Stream #0:1(eng): Audio: aac (HE-AAC), 48000 Hz, 5.1, fltp (default)
    Metadata:
      title           : Surround
      LANGUAGE        : eng
    Stream #0:2(eng): Subtitle: ass
Stream mapping:
  Stream #0:0 -> #0:0 (hevc (hevc_qsv) -> h264 (h264_qsv))
  Stream #0:1 -> #0:1 (copy)

  • neik likes this

#15 Guest_asrequested_* OFFLINE  

Guest_asrequested_*
  • Guests

Posted 27 October 2018 - 04:44 PM

Yeah, this is looking very nice!

Input #0, mpegts, from 'file:\\Server\e\Library\Chicago Fire\Chicago Fire S06E18 When They See Us Coming.ts':
  Duration: 00:59:59.82, start: 56864.546922, bitrate: 14245 kb/s
  Program 1 
    Stream #0:0[0x10c0]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, top first), 1920x1080 [SAR 1:1 DAR 16:9], Closed Captions, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x10c1](eng): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, 5.1(side), fltp, 384 kb/s
    Stream #0:2[0x10c2](spa): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, mono, fltp, 192 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg2video (mpeg2_qsv) -> h264 (h264_qsv))
  Stream #0:1 -> #0:1 (ac3 (native) -> mp3 (libmp3lame))

Edited by Doofus, 27 October 2018 - 04:45 PM.

  • neik likes this

#16 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 156950 posts
  • Local time: 09:13 AM

Posted 27 October 2018 - 05:02 PM

Glad you're all enjoying it.



#17 Guest_asrequested_* OFFLINE  

Guest_asrequested_*
  • Guests

Posted 27 October 2018 - 05:21 PM

Actually it's going to be YES, on some platforms at least, and dxva for windows will be enabled by default. MediaCodec for android will be enabled by default as well.

 

And gradually, we will enable more and more by default on various platforms.

 

On windows, it should be NO. My server's GPU is a $50 Nvidia piece of schmutz. It can't do diddly. The CPU will be doing everything. So when the upgrade comes around, it could screw me up.



#18 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 156950 posts
  • Local time: 09:13 AM

Posted 27 October 2018 - 05:29 PM

On windows, it should be NO. My server's GPU is a $50 Nvidia piece of schmutz. It can't do diddly. The CPU will be doing everything. So when the upgrade comes around, it could screw me up.

 

Try setting it to YES. I doubt you'll actually see it fail. with dxva, ffmpeg is smart enough to use cpu when it's not supported.



#19 Guest_asrequested_* OFFLINE  

Guest_asrequested_*
  • Guests

Posted 27 October 2018 - 05:39 PM

Try setting it to YES. I doubt you'll actually see it fail. with dxva, ffmpeg is smart enough to use cpu when it's not supported.

 

But that's the problem, it does support HWA, but it's puny. It won't be able to handle most of what I throw at it. It'll just go really slowly. I'm testing this on a different machine, which has different hardware, so I can't test the new stuff on my main machine without setting up a third server.


Edited by Doofus, 27 October 2018 - 05:39 PM.


#20 cybergrimes OFFLINE  

cybergrimes

    Advanced Member

  • Members
  • 524 posts
  • Local time: 08:13 AM
  • LocationMinnesota

Posted 27 October 2018 - 05:47 PM

 

Yeah, this is looking very nice!

Input #0, mpegts, from 'file:\\Server\e\Library\Chicago Fire\Chicago Fire S06E18 When They See Us Coming.ts':
  Duration: 00:59:59.82, start: 56864.546922, bitrate: 14245 kb/s
  Program 1 
    Stream #0:0[0x10c0]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, top first), 1920x1080 [SAR 1:1 DAR 16:9], Closed Captions, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x10c1](eng): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, 5.1(side), fltp, 384 kb/s
    Stream #0:2[0x10c2](spa): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, mono, fltp, 192 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg2video (mpeg2_qsv) -> h264 (h264_qsv))
  Stream #0:1 -> #0:1 (ac3 (native) -> mp3 (libmp3lame))

 

Which driver version are you using?

I have a G4620 (Kaby Lake) with HD630 and mpeg2_qsv seems to fail here and there, never falling back to CPU, so I can never enable mpeg2 decoding. IIRC it just borked playback.

I also had an i7 7700T that had the same problem.


Edited by cybergrimes, 27 October 2018 - 05:48 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users