rigaya / QSVEnc

QSVによる高速エンコードの性能実験
http://rigaya34589.blog135.fc2.com/blog-category-10.html
Other
313 stars 28 forks source link

Improved Multi-GPU Video Acceleration Support? #143

Closed quamt closed 1 year ago

quamt commented 1 year ago

Hello @rigaya,

I saw that Intel is implementing Improved Multi-GPU Video Acceleration Support for FFMpeg encoder.

`2023Q1:
FFmpeg:

ffmpeg-qsv and ffmpeg-vaapi added hstack_qsv, vstack_qsv and xstack_qsv filter support
ffmpeg-qsv and ffmpeg-vaapi added gopconcat bsf support. This filter will concat gop from different streams to make a new stream, which helps to run encoder on multi-gpu platform
ffmpeg-vaapi support RGB* format clips for vp9 decode`

I wanted to know if this would be possible to implement. https://github.com/intel/cartwheel-ffmpeg/releases/tag/2023q1

rigaya commented 1 year ago

This is actually already discussed here.

As it is not part of oneVPL and requires complicated implementation, I'll not try to focus into that. For iGPU and dGPU case, we already have --hyper-encode, and currently I don't think it is useful to think of a case of multi Arc GPU environment.

quamt commented 1 year ago

Ok. I didn't see that in that specific topic.

'--hyper-encode' is slowing the encodes down, at least for me, and doesn't work with all settings applied, unfortunately.

rigaya commented 1 year ago

If you don't get speed up from --hyper-encode, that will be the same with the implementation you've mentioned, as the concept of speed up is the same.

It seems to require following conditions for speed up.

Check the guide from oneVPL for detailes.

quamt commented 1 year ago

The test system I tried this on is like below:

Device #1: Intel Arc A770 Graphics
Device #2: Intel Arc A770 Graphics
Device #3: Intel UHD Graphics 770
API 2.08: hw(mfx-gen), Acceleration d3d11
API 2.08: hw(mfx-gen), Acceleration d3d11
API 2.08: hw(mfx-gen), Acceleration d3d11
QSVEncC (x64) 7.39 (r3079) by rigaya, May 10 2023 09:16:12 (VC 1934/Win)
 Intel Media SDK API v2.09
 reader: raw, avi, avs, vpy, avsw, avhw
Environment Info
OS : Windows 11 x64 (22621) [UTF-8]
CPU: 13th Gen Intel Core i5-13600 [4.71GHz] (6P+8E,14C/20T)
RAM: Used 10798 MB, Total 64329 MB
GPU: Intel Arc A770 Graphics (512EU) 300-2400MHz (31.0.101.4335)

I also checked the information provided but I don't see as to why it should slow down using --hyper-mode.

I was looking for the Multi-GPU support as the system would fulfil all the requirements as far as I can see.

rigaya commented 1 year ago

As I have said earlier, there is no plan to add multi-GPU Acceleration.