Jump to content

Quicksync Apollo Lake Windows 10 not working, CPU fallback


fightforlife

Recommended Posts

fightforlife

Hey there,

 

I am really new to this. I bought a J3455 apollo lake board to create my own small media server.

The goal is to transcode x265 up to 4k/10bit. Someone over here got it working on his Synology with the same chip: https://forums.plex.tv/discussion/comment/1561297/#Comment_1561297

 

My problem is that ffmpeg doesnt seem to be able to use hardware acceleration correctly. It always falls back to the standard CPU transcoding.  I use these files for testing: http://www.h265files.com/

All files play fine with hardware acceleration in MPC-HD. But transcoding always falls back to the CPU.

 

I am using the latest Emby beta and tried different intel drivers.

 

I attached the transcoding log. The most interesting part seems to be this:

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 @ 0000025bb36044c0] Could not load the requested plugin '15dd936825ad475ea34e35f3f54217a6': specified object was not found (-9)
[hevc_qsv @ 0000025bb36044c0] Error loading plugins
[hevc_qsv @ 0000025bb36044c0] Error initializing an MFX session
Error while decoding stream #0:0: Function not implemented
[hevc_qsv @ 0000025bb36044c0] Error initializing the MFX video decoder: invalid video parameters (-15)
Error while decoding stream #0:0: Invalid argument
frame=    0 fps=0.0 q=0.0 size=N/A time=-577014:32:22.77 bitrate=N/A speed=N/A    
[hevc_qsv @ 0000025bb36044c0] Error initializing the MFX video decoder: invalid video parameters (-15)
Error while decoding stream #0:0: Invalid argument
[hevc_qsv @ 0000025bb36044c0] Error initializing the MFX video decoder: invalid video parameters (-15)
Error while decoding stream #0:0: Invalid argument
[hevc_qsv @ 0000025bb36044c0] Error initializing the MFX video decoder: invalid video parameters (-15)
Error while decoding stream #0:0: Invalid argument
[hevc_qsv @ 0000025bb36044c0] Error initializing the MFX video decoder: invalid video parameters (-15)
Error while decoding stream #0:0: Invalid argument

transcodinglog.txt

serverlog.txt

Link to comment
Share on other sites

hi @@fightforlife, to help us narrow down the problem, i notice you have both qsv decoding and encoding enabled. can you try only enabling one of them at a time, and see which of the two causes the failure? thanks !

Link to comment
Share on other sites

fightforlife

No Problem, I deactivated the hardware encoding and got nearly the same error:

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

So what are these pugins in the error message? Do I need to compile an extra ffmpeg binary? 

Or do I need any additional Software? Intel Meda SDK?

 

Edit: Mpeg2 transcoding seems to be working with hardware dec/enc

VP8 and h264 play directly

serverlog_softencode.txt

transcodinglog_softencode.txt

Edited by fightforlife
Link to comment
Share on other sites

fightforlife

That is working, kind of.  (slow)

But I would love to see both in hardware. ecnoding and decoding.

 

On linux (Synology) it seems possible without much hassle. 

Is the problem in the graphics driver and quicksync, or does ffmpeg not know how to use the hevc_qsv decoder?

 

Googling around I found at least 3 other people having the same problem with the hevc_qsv encoder.

Edited by fightforlife
Link to comment
Share on other sites

Guest asrequested

I think part of the issue with the new Intel CPUs is that it isn't GPU only for QS. The GPU works in tandem with the newer chipsets. That's why if you use one in an older mobo, you can't use all of it's capabilities. And I have a feeling that isn't being fully incorporated in these ffmpeg builds. I'm sure they'll get there, though.

Link to comment
Share on other sites

Guest asrequested

You can experiment with different ffmpeg builds. But with forethought of potentially causing other issues. This is why I've moved away from HWA in the server. If you want to test, I'd suggest running a separate beta server, and test with that.

Link to comment
Share on other sites

We already have the libraries in our ffmpeg builds for windows, so the question is why isn't it working on your machine.

 

I would make sure your hardware supports it, then i would make sure windows is up to date as well as your graphics drivers.

Link to comment
Share on other sites

fightforlife

i tried the nightly builds of zeranoe, but nothing changed.

 

I use an Asrock j3455-ITX board with an J3455 Processor, 8gigs of ram and an Integrated Intel® HD Graphics 500: 12 EUs inside (Up to 750MHz)

 

Quote from the webpage:

Supports HW Accelerated Decoders: H.264 @ level 5.2, HEVC (H.265) 10b @MP level 5.1 (GPU accelerated), JPEG, VP8, VP9

And per this table: https://en.wikipedia.org/wiki/Intel_Quick_Sync_Video

It should be able to decode HEVC up to 8K.

 

Windows is updated, I am looking fo a new driver now. 

Link to comment
Share on other sites

fightforlife

So everything is updated.

 

emby latest beta,  ffmpeg latest nightly, intel newest driver, Windows all updates.

 

 

I get the same error in emby!

In addition the newer Intel driver causes problems with chroma sub sampling.

With the original windows driver I could use HDMI2.0 4k at 60 with 4:4:4. With the new driver only 4:2:0 is possible.

Link to comment
Share on other sites

fightforlife

yes, but the same problem always psersists, when decoding hevc with qsv.

Could not load the requested plugin '15dd936825ad475ea34e35f3f54217a6': specified object was not found (-9)

So this missing plugin is some part of a dll file provided by the Intel Driver? is this correct?

Could it be some kind of a brocken link, or something like that? registry?

 

 

EDIT:

I found this maybe it is helpful?

https://software.intel.com/en-us/forums/intel-media-sdk/topic/607955

Edited by fightforlife
Link to comment
Share on other sites

fightforlife

Just some Info:

 

DXVA Checker gives the following:

Intel(R) HD Graphics
MPEG2_VLD: DXVA2/D3D11, SD / HD / FHD
MPEG2_IDCT: DXVA2/D3D11, SD / HD / FHD
MPEG2_A: DXVA1, SD / HD / FHD
MPEG2_C: DXVA1, SD / HD / FHD
VC1_VLD_2_Intel: DXVA2/D3D11, SD / HD / FHD / 4K
VC1_VLD_Intel: DXVA2/D3D11, SD / HD / FHD / 4K
VC1_VLD2010: DXVA2/D3D11, SD / HD / FHD / 4K
H264_VLD_NoFGT: DXVA2/D3D11, SD / HD / FHD / 4K
H264_VLD_Stereo_Progressive_NoFGT: DXVA2/D3D11, SD / HD / FHD / 4K
H264_VLD_Stereo_NoFGT: DXVA2/D3D11, SD / HD / FHD / 4K
H264_VLD_Multiview_NoFGT: DXVA2/D3D11, SD / HD / FHD / 4K
C528916C-C0AF-4645-8CB2-372B6D4ADC2A: DXVA2
8DE911C4-C898-4364-9715-1DE6B3FE773D: DXVA2
07CFAFFB-5A2E-4B99-B62A-E4CA53B6D5AA: DXVA2
MJPEG_VLD_Intel: DXVA2/D3D11
VP8_VLD: DXVA2/D3D11, SD / HD / FHD / 4K
442B942A-B4D9-4940-BC45-A882E5F919F3: DXVA2/D3D11
8C56EB1E-2B47-466F-8D33-7DBCD63F3DF2: DXVA2/D3D11
HEVC_VLD_Main: DXVA2/D3D11, SD / HD / FHD / 4K / 8K
75FC75F7-C589-4A07-A25B-72E03B0383B3: DXVA2/D3D11
HEVC_VLD_Main10: DXVA2/D3D11, SD / HD / FHD / 4K / 8K
VP9_VLD_Profile0: DXVA2/D3D11, SD / HD / FHD / 4K
VP9_VLD_Intel: DXVA2/D3D11, SD / HD / FHD / 4K
A74CCAE2-F466-45AE-86F5-AB8BE8AF8483: DXVA2
WMV9_IDCT: DXVA1/2/D3D11, SD / HD / FHD / 4K
VC1_IDCT: DXVA1/2/D3D11, SD / HD / FHD / 4K
49761BEC-4B63-4349-A5FF-87FFDF088466: DXVA2/D3D11
97688186-56A8-4094-B543-FC9DAAA49F4B: D3D11
1424D4DC-7CF5-4BB1-9CD7-B63717A72A6B: D3D11
FFC79924-5EAF-4666-A736-06190F281443: D3D11
F416F7BD-098A-4CF1-A11B-CE54959CA03D: D3D11
BF44DACD-217F-4370-A383-D573BC56707E: D3D11
2364D06A-F67F-4186-AED0-62B99E1784F1: D3D11
28566328-F041-4466-8B14-8F5831E78F8B: D3D11
50925B7B-E931-4978-A12A-586630F095F9: D3D11

And MPC-HD plays the same files just fine using DXVA2 native (Hardware acceleration)

Link to comment
Share on other sites

fightforlife

Maybe that helps:

 

15dd936825ad475ea34e35f3f54217a6  is the HEVC Software decoder

 

33a61c0b4c27454ca8d85dde757c6f8e should be the HEVC hardware decoder.

 

so it is using the wrong plugin?

Link to comment
Share on other sites

fightforlife

I think I found the solution. At least for the testfile.

 

ffmpeg is normaly using the hevc software decoder when not specified different. That is why the plugin can not be found, because it should be hardware!

 

By simply adding 

./ffmpeg -y -c:v hevc_qsv -load_plugin hevc_hw -i video-h265.mkv -an -c:v h264_qsv out.mp4

 quicksync is working as it should. And fast!  Source: https://trac.ffmpeg.org/ticket/5899

 

Is it possible to integrate this in the emby beta? (or is there a way for me to integrate this command?)

Edited by fightforlife
Link to comment
Share on other sites

fightforlife

I tried it with the same h265 test file and this command:

 

ffmpeg.exe -y -c:v hevc_qsv -load_plugin hevc_hw -i video-h265.mkv -an -c:v h264_qsv  out.mp4

 

I get around 60-70FPS while transcoding.

Encoding to hevc also works with this plugin.

 

The output file is correct, but is missing audio. Probably wrong decoder settings. (I never used ffmped cli beforen)

ffmpeg.exe -y -c:v hevc_qsv -load_plugin hevc_hw -i video-h265.mkv -an -c:v h264_qsv  out.mp4
ffmpeg version N-90065-g8a8d0b319a Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 7.2.0 (GCC)
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libmfx --enable-amf --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth
  libavutil      56.  7.101 / 56.  7.101
  libavcodec     58. 11.101 / 58. 11.101
  libavformat    58.  9.100 / 58.  9.100
  libavdevice    58.  1.100 / 58.  1.100
  libavfilter     7. 12.100 /  7. 12.100
  libswscale      5.  0.101 /  5.  0.101
  libswresample   3.  0.101 /  3.  0.101
  libpostproc    55.  0.100 / 55.  0.100
Input #0, matroska,webm, from 'video-h265.mkv':
  Metadata:
    ENCODER         : Lavf55.12.0
  Duration: 00:00:16.16, start: 0.099000, bitrate: 2619 kb/s
    Stream #0:0: Video: hevc (Main), yuv420p(tv, bt709), 1920x960 [SAR 1:1 DAR 2:1], 25 fps, 25 tbr, 1k tbn, 25 tbc (default)
    Stream #0:1(eng): Audio: aac (LC), 48000 Hz, stereo, fltp (default)
    Metadata:
      title           : Stereo
      LANGUAGE        : eng
Stream mapping:
  Stream #0:0 -> #0:0 (hevc (hevc_qsv) -> h264 (h264_qsv))
Press [q] to stop, [?] for help
DriverDDIMain = 947
DriverDDIMain10 = 947
DriverDDIMainLP = 966
DriverDDIMain10LP = 966
DriverDDIMain = 947
DriverDDIMain10 = 947
DriverDDIMainLP = 966
DriverDDIMain10LP = 966
Output #0, mp4, to 'out.mp4':
  Metadata:
    encoder         : Lavf58.9.100
    Stream #0:0: Video: h264 (h264_qsv) (avc1 / 0x31637661), nv12, 1920x960 [SAR 1:1 DAR 2:1], q=2-31, 1000 kb/s, 25 fps, 12800 tbn, 25 tbc (default)
    Metadata:
      encoder         : Lavc58.11.101 h264_qsv
    Side data:
      cpb: bitrate max/min/avg: 0/0/1000000 buffer size: 0 vbv_delay: -1
[hevc_qsv @ 000001d56da3fa80] A decode call did not consume any data: expect more data at input (-10)2.31x
    Last message repeated 2 times
[hevc_qsv @ 000001d56da3fa80] A decode call did not consume any data: expect more data at input (-10) 2.3x
frame=  402 fps= 62 q=-0.0 Lsize=    1972kB time=00:00:16.00 bitrate=1009.5kbits/s dup=2 drop=0 speed=2.47x
video:1967kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.223129%
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...