Jump to content


Photo

HEVC / x265 quicksync / hardware transcoding not working?

hevc h.265 x265

  • Please log in to reply
90 replies to this topic

#41 cayars OFFLINE  

cayars

    Advanced Member

  • Alpha Testers
  • 3002 posts
  • Local time: 08:59 AM

Posted 09 June 2018 - 08:17 PM

I'm not sure if Plex is using a different ffmpeg version but HW HEVC transcoding is working fine on it. I tested today.

Plex does automatic fallback so you may not know what it's doing.  The Now Playing screen is not always correct but usually pretty accurate.  If you look at Now Playing you will see (hw) listed twice if it's doing both decoding (hw) and encoding (hw).  If you only see (hw) listed once it's only for the encode.  If you do see it listed twice then you also need to look at the logs.

 NowPlaying-300x168.png



#42 aahmyu OFFLINE  

aahmyu

    Advanced Member

  • Members
  • 166 posts
  • Local time: 02:59 PM

Posted 09 June 2018 - 08:24 PM

Plex does automatic fallback so you may not know what it's doing. The Now Playing screen is not always correct but usually pretty accurate. If you look at Now Playing you will see (hw) listed twice if it's doing both decoding (hw) and encoding (hw). If you only see (hw) listed once it's only for the encode. If you do see it listed twice then you also need to look at the logs.
NowPlaying-300x168.png


To be honest I don't trust the app info screen, so I was checking the cpu/gpu usage to make sure it was using the gpu. So while Emby was using 100% cpu Plex was using around 55% cpu and gpu on the same HEVC file.

#43 Doofus OFFLINE  

Doofus

    Advanced Member

  • Members
  • 13376 posts
  • Local time: 05:59 AM

Posted 09 June 2018 - 08:38 PM

Well, he did say to check your logs. That would be clear information.



#44 aahmyu OFFLINE  

aahmyu

    Advanced Member

  • Members
  • 166 posts
  • Local time: 02:59 PM

Posted 09 June 2018 - 09:00 PM

Well, he did say to check your logs. That would be clear information.


Yeah but task manager is accurate too and easier to check. Anyways this is from plex logs. Not sure if it's the right part though.

Variants>
<Variant id="14c6ccc1-acfa-4eb0-94f9-543a5ba9b793" targetBitrate="3964" context="streaming" sourceVideoCodec="hevc" sourceAudioCodec="aac" videoDecision="transcode" audioDecision="transcode" subtitleDecision="burn" protocol="hls" container="mpegts" videoCodec="h264" audioCodec="aac" audioChannels="6" transcodeHwRequested="1" transcodeHwDecoding="dxva2" transcodeHwEncoding="qsv" transcodeHwDecodingTitle="Windows (DXVA2)" transcodeHwEncodingTitle="Intel (QuickSync)" transcodeHwFullPipeline="0">
<Media audioProfile="he-aac" id="19914" videoProfile="main" audioChannels="6" audioCodec="aac" bitrate="3775" container="mpegts" duration="7070439" height="534" protocol="hls" videoCodec="h264" videoFrameRate="24p"

#45 Doofus OFFLINE  

Doofus

    Advanced Member

  • Members
  • 13376 posts
  • Local time: 05:59 AM

Posted 09 June 2018 - 09:11 PM

So there you go. Its converting to h264, and using DXVA2



#46 aahmyu OFFLINE  

aahmyu

    Advanced Member

  • Members
  • 166 posts
  • Local time: 02:59 PM

Posted 10 June 2018 - 02:33 AM

So there you go. Its converting to h264, and using DXVA2


Which is bad? It also says qsv and Intel quick sync. And most importantly it works.

#47 Doofus OFFLINE  

Doofus

    Advanced Member

  • Members
  • 13376 posts
  • Local time: 05:59 AM

Posted 10 June 2018 - 04:14 AM

Which is bad? It also says qsv and Intel quick sync. And most importantly it works.

 

No, not bad. I just played an HEVC video from my beta server, which is running on an i7 6700k. HEVC decoding, disabled. Here is the result.

Input #0, matroska,webm, from 'file:D:\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 (native) -> h264 (h264_qsv))
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[segment @ 0000017594b040c0] Opening 'C:\Users\Peter\AppData\Roaming\Emby-Server\programdata\transcoding-temp\f447dd78032bc3edcfba86afbd025d900.ts' for writing
Output #0, segment, to 'C:\Users\Peter\AppData\Roaming\Emby-Server\programdata\transcoding-temp\f447dd78032bc3edcfba86afbd025d90%d.ts':
  Metadata:
    encoder         : Lavf58.12.100
    Stream #0:0: Video: h264 (h264_qsv), nv12, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 5475 kb/s, 23.98 fps, 90k tbn, 23.98 tbc (default)
    Metadata:
      encoder         : Lavc58.18.100 h264_qsv
    Side data:
      cpb: bitrate max/min/avg: 5475304/0/5475304 buffer size: 10950608 vbv_delay: -1
    Stream #0:1: Audio: aac (HE-AAC), 48000 Hz, 5.1, fltp (default)


#48 aahmyu OFFLINE  

aahmyu

    Advanced Member

  • Members
  • 166 posts
  • Local time: 02:59 PM

Posted 10 June 2018 - 04:30 AM

 

No, not bad. I just played an HEVC video from my beta server, which is running on an i7 6700k. HEVC decoding, disabled. Here is the result.

Input #0, matroska,webm, from 'file:D:\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 (native) -> h264 (h264_qsv))
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[segment @ 0000017594b040c0] Opening 'C:\Users\Peter\AppData\Roaming\Emby-Server\programdata\transcoding-temp\f447dd78032bc3edcfba86afbd025d900.ts' for writing
Output #0, segment, to 'C:\Users\Peter\AppData\Roaming\Emby-Server\programdata\transcoding-temp\f447dd78032bc3edcfba86afbd025d90%d.ts':
  Metadata:
    encoder         : Lavf58.12.100
    Stream #0:0: Video: h264 (h264_qsv), nv12, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 5475 kb/s, 23.98 fps, 90k tbn, 23.98 tbc (default)
    Metadata:
      encoder         : Lavc58.18.100 h264_qsv
    Side data:
      cpb: bitrate max/min/avg: 5475304/0/5475304 buffer size: 10950608 vbv_delay: -1
    Stream #0:1: Audio: aac (HE-AAC), 48000 Hz, 5.1, fltp (default)

Ok i just tried something. I Opened a Hevc movie on Both Plex and Emby Windows Apps. Both of them works fine no transcoding.  I Lowered the quality to 480p to trigger transcode. so In Plex it worked fine and gpu is being usied like 50% while in Emby it was using a 100% cpu.

checked logs and there is this error in Emby:

Stream mapping:
  Stream #0:0 -> #0:0 (hevc (hevc_qsv) -> h264 (h264_qsv))
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[hevc_qsv @ 000001e8a0fb8840] Could not load the requested plugin '15dd936825ad475ea34e35f3f54217a6': specified object was not found (-9)
[hevc_qsv @ 000001e8a0fb8840] Error loading plugins
[hevc_qsv @ 000001e8a0fb8840] Error initializing an MFX session
Error while decoding stream #0:0: Function not implemented
[hevc_qsv @ 000001e8a0fb8840] Error initializing the MFX video decoder: invalid video parameters (-15)
Error while decoding stream #0:0: Invalid argument
[hevc_qsv @ 000001e8a0fb8840] Error initializing the MFX video decoder: invalid video parameters (-15)
Error while decoding stream #0:0: Invalid argument
[hevc_qsv @ 000001e8a0fb8840] Error initializing the MFX video decoder: invalid video parameters (-15)
Error while decoding stream #0:0: Invalid argument
[hevc_qsv @ 000001e8a0fb8840] Error initializing the MFX video decoder: invalid video parameters (-15)
Error while decoding stream #0:0: Invalid argument
[hevc_qsv @ 000001e8a0fb8840] Error initializing the MFX video decoder: invalid video parameters (-15)
Error while decoding stream #0:0: Invalid argument
[hevc_qsv @ 000001e8a0fb8840] Error initializing the MFX video decoder: invalid video parameters (-15)
Error while decoding stream #0:0: Invalid argument
[hevc_qsv @ 000001e8a0fb8840] Error initializing the MFX video decoder: invalid video parameters (-15)
Error while decoding stream #0:0: Invalid argument
[hevc_qsv @ 000001e8a0fb8840] Error initializing the MFX video decoder: invalid video parameters (-15)
Error while decoding stream #0:0: Invalid argument
[hevc_qsv @ 000001e8a0fb8840] Error initializing the MFX video decoder: invalid video parameters (-15)
Error while decoding stream #0:0: Invalid argument
[hevc_qsv @ 000001e8a0fb8840] Error initializing the MFX video decoder: invalid video parameters (-15)
Error while decoding stream #0:0: Invalid argument
[hevc_qsv @ 000001e8a0fb8840] Error initializing the MFX video decoder: invalid video parameters (-15)
Error while decoding stream #0:0: Invalid argument
[hevc_qsv @ 000001e8a0fb8840] Error initializing the MFX video decoder: invalid video parameters (-15)
Error while decoding stream #0:0: Invalid argument
[hevc_qsv @ 000001e8a0fb8840] Error initializing the MFX video decoder: invalid video parameters (-15)
Error while decoding stream #0:0: Invalid argument
[hevc_qsv @ 000001e8a0fb8840] Error initializing the MFX video decoder: invalid video parameters (-15)

While in Plex no errors at all. Hope this helps.


Edited by aahmyu, 10 June 2018 - 04:30 AM.


#49 cayars OFFLINE  

cayars

    Advanced Member

  • Alpha Testers
  • 3002 posts
  • Local time: 08:59 AM

Posted 10 June 2018 - 08:43 AM

Does your GPU support MFX?



#50 cayars OFFLINE  

cayars

    Advanced Member

  • Alpha Testers
  • 3002 posts
  • Local time: 08:59 AM

Posted 10 June 2018 - 08:46 AM

Yeah but task manager is accurate too and easier to check. Anyways this is from plex logs. Not sure if it's the right part though.

Variants>
<Variant id="14c6ccc1-acfa-4eb0-94f9-543a5ba9b793" targetBitrate="3964" context="streaming" sourceVideoCodec="hevc" sourceAudioCodec="aac" videoDecision="transcode" audioDecision="transcode" subtitleDecision="burn" protocol="hls" container="mpegts" videoCodec="h264" audioCodec="aac" audioChannels="6" transcodeHwRequested="1" transcodeHwDecoding="dxva2" transcodeHwEncoding="qsv" transcodeHwDecodingTitle="Windows (DXVA2)" transcodeHwEncodingTitle="Intel (QuickSync)" transcodeHwFullPipeline="0">
<Media audioProfile="he-aac" id="19914" videoProfile="main" audioChannels="6" audioCodec="aac" bitrate="3775" container="mpegts" duration="7070439" height="534" protocol="hls" videoCodec="h264" videoFrameRate="24p"

This only what's being requested.  What are the following lines being returned from the transcoder that show what it actually chooses to do?  If not sure feel free to post the log file and I'll take a look for you.  Feel free to PM as well.



#51 aahmyu OFFLINE  

aahmyu

    Advanced Member

  • Members
  • 166 posts
  • Local time: 02:59 PM

Posted 10 June 2018 - 09:51 AM

This only what's being requested.  What are the following lines being returned from the transcoder that show what it actually chooses to do?  If not sure feel free to post the log file and I'll take a look for you.  Feel free to PM as well.

 

My cpu is an Intel i5 7200u so it does support this. 

I added the full transcode logs for you.

Attached Files

  • Attached File  logs.zip   27.04KB   3 downloads

  • Devdroid likes this

#52 Doofus OFFLINE  

Doofus

    Advanced Member

  • Members
  • 13376 posts
  • Local time: 05:59 AM

Posted 10 June 2018 - 11:27 AM

In post 48, you still have decoding enabled. Turn it off and post the log for that.

#53 aahmyu OFFLINE  

aahmyu

    Advanced Member

  • Members
  • 166 posts
  • Local time: 02:59 PM

Posted 10 June 2018 - 02:37 PM

In post 48, you still have decoding enabled. Turn it off and post the log for that.

 

There you go.

Attached Files



#54 cayars OFFLINE  

cayars

    Advanced Member

  • Alpha Testers
  • 3002 posts
  • Local time: 08:59 AM

Posted 10 June 2018 - 02:47 PM

My cpu is an Intel i5 7200u so it does support this. 

I added the full transcode logs for you.

No help since this isn't the server logs.  Goto settings/server/help then click the download logs button which will create a zip file with the needed files.  You'll want to do this right after trying to play a file.

 

Before doing any of this make sure "Enable Plex Media Server debug logging" is enabled and "Enable Plex Media Server verbose logging" is NOT enabled.  These settings will make sure the correct information is logged.  Both of these options are listed under ADVANCED on the /settings/server/general tab.

 

Carlo



#55 aahmyu OFFLINE  

aahmyu

    Advanced Member

  • Members
  • 166 posts
  • Local time: 02:59 PM

Posted 10 June 2018 - 03:01 PM

No help since this isn't the server logs.  Goto settings/server/help then click the download logs button which will create a zip file with the needed files.  You'll want to do this right after trying to play a file.

 

Before doing any of this make sure "Enable Plex Media Server debug logging" is enabled and "Enable Plex Media Server verbose logging" is NOT enabled.  These settings will make sure the correct information is logged.  Both of these options are listed under ADVANCED on the /settings/server/general tab.

 

Carlo

 

I attached the relevant logs "got modified when i played the movie"

Search for the Matrix.

Attached Files



#56 Doofus OFFLINE  

Doofus

    Advanced Member

  • Members
  • 13376 posts
  • Local time: 05:59 AM

Posted 10 June 2018 - 03:30 PM

There you go.

 

Decoding is still enabled

Stream mapping:
  Stream #0:0 -> #0:0 (hevc (hevc_qsv) -> h264 (h264_qsv))
  Stream #0:1 -> #0:1 (copy)


#57 aahmyu OFFLINE  

aahmyu

    Advanced Member

  • Members
  • 166 posts
  • Local time: 02:59 PM

Posted 10 June 2018 - 03:44 PM

 

Decoding is still enabled

Stream mapping:
  Stream #0:0 -> #0:0 (hevc (hevc_qsv) -> h264 (h264_qsv))
  Stream #0:1 -> #0:1 (copy)

 

Sorry. I think I forgot to click Save.

Attached Files

  • Attached File  Log.zip   6.62KB   1 downloads


#58 Doofus OFFLINE  

Doofus

    Advanced Member

  • Members
  • 13376 posts
  • Local time: 05:59 AM

Posted 10 June 2018 - 05:47 PM

I've seen this error, before. But I can't remember where, and if there was a solution. I feel like there was, but I just can't remember.

Stream mapping:
  Stream #0:0 -> #0:0 (hevc (native) -> h264 (h264_qsv))
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[h264_qsv @ 0000015197a11480] Current pixel format is unsupported
[h264_qsv @ 0000015197a11480] some encoding parameters are not supported by the QSV runtime. Please double check the input parameters.
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
ffmpeg version 4.0 Copyright (c) 2000-2018 the FFmpeg developers
Conversion failed!


#59 Doofus OFFLINE  

Doofus

    Advanced Member

  • Members
  • 13376 posts
  • Local time: 05:59 AM

Posted 10 June 2018 - 05:56 PM

I was thinking about this, but I don't think it's related?

 

https://emby.media/c.../page-2?hl=hevc



#60 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 145887 posts
  • Local time: 08:59 AM

Posted 10 June 2018 - 06:04 PM

Can you try it on the command line?







Also tagged with one or more of these keywords: hevc, h.265, x265

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users