[FFmpeg-trac] #7511(avcodec:new): FFmpeg Windows version with QSV hwaccel fails over TERMINAL

FFmpeg trac at avcodec.org
Mon Jul 22 15:47:06 EEST 2019


#7511: FFmpeg Windows version with QSV hwaccel fails over TERMINAL
-------------------------------------+-----------------------------------
             Reporter:  msiders      |                    Owner:
                 Type:  enhancement  |                   Status:  new
             Priority:  wish         |                Component:  avcodec
              Version:  git-master   |               Resolution:
             Keywords:  qsv          |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-----------------------------------

Comment (by atorp):

 Hi,

 I found the root cause of this problem:

 - As described by @heleppkes the difference is the type of the surfaces
 used. When using D3D11 surfaces the processing runs wihtout troubles even
 offscreen (from the Terminal). But the error appears when using D3D9
 surfaces.

 However, the problem can be fixed with a very small change: initializing
 the QSV surfaces as D3D11. When using one nVIDIA card in the same machine
 with one INTEL CPU with iGPU is possible to initialize using D3D11 using
 the current ffmpeg binary:

 {{{
 ffmpeg -hwaccel cuvid -c:v h264_cuvid -i input.ts -c:v h264_qsv -f mpegts
 output.ts
 }}}

 When executing this command the ffmpeg tool uses the QSV hardware
 accelerator to encode using the H264 codec. However, first it uses the
 NVIDIA card to decode the input. In this case, as the DECODER initializes
 D3D11 surfaces, the ENCODER receives D3D11 surfaces and it works!

 So the QSV encoder source code doesn't need to be changed. Only the
 initialization part requires a small change to move from D3D9 surfaces to
 D3D11 surfaces. The rest of the code already works.

 I hope this helps to fix this problem.
 Regards.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/7511#comment:9>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list