[FFmpeg-trac] #7839(avcodec:new): QVBR breaks mpeg2_qsv

FFmpeg trac at avcodec.org
Tue Apr 23 18:20:13 EEST 2019


#7839: QVBR breaks mpeg2_qsv
-------------------------------------+-------------------------------------
             Reporter:  atorp        |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  important    |                Component:  avcodec
              Version:  git-master   |               Resolution:
             Keywords:  qsv          |               Blocked By:
  regression                         |
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------

Comment (by atorp):

 Hi lizhong1008,

 Replying to [comment:11 lizhong1008]:
 > Replying to [comment:9 atorp]:
 > > > Probably it is that your MSDK version can't support coding option 3.
 > >
 > >
 > > I don't know it! I'm using Windows 10 with the last Intel drivers
 installed. And the binaries are the "zeranoe".
 >
 > You can find it with a pure qsv HW transcoding pipeline:
 > ffmpeg -hwaccel qsv -v verbose -c:v h264_qsv -i input_h264.mp4 -c:v
 mpeg2_qsv test_qsv.mp4
 > On my side, I see can the log:
 > Initialize MFX session: API version is 1.28, implementation version is
 1.29
 > Could you please report what the log on your side to me?
 >
 >


 Here it is!


 {{{
 [AVHWDeviceContext @ 000001e7de3a76c0] Using D3D9Ex device.
 [AVHWDeviceContext @ 000001e7de3a7a40] Initialize MFX session: API version
 is 1.27, implementation version is 1.11
 [AVHWDeviceContext @ 000001e7de3a7a40] MFX compile/runtime API: 1.27/1.11
 [graph 0 input from stream 0:0 @ 000001e7de798c00] w:1280 h:720 pixfmt:qsv
 tb:1/90000 fr:60/1 sar:0/1 sws_param:flags=2
 [mpeg2_qsv @ 000001e7de3a64c0] Using the average variable bitrate (AVBR)
 ratecontrol method
 [mpeg2_qsv @ 000001e7de3a64c0] Error initializing the encoder: invalid
 video parameters (-15)
 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
 }}}


 >
 > > Replying to [comment:8 lizhong1008]:
 > >
 > > > 1. Could you please tell me what is your MSDK API version and
 library version.
 > > > 2. Apply the patch:
 > > > -#define QSV_HAVE_CO3 QSV_VERSION_ATLEAST(1, 11)
 > > > +#define QSV_HAVE_CO3 0
 > > > Don't change anything else.
 > > > 3. If it is possible, update your MSDK version can try again.
 > >
 > >
 > > I'll do more tests. But, your suggestion of patch is already included
 in my previous fix! But it disables at all QVBR.
 > Your previous fix disale two things: both CO3 and QVBR, what is the
 exact one can fix this problem? CO3 or QVBR, or must disable all of the
 two?


 My previous "solution" is a simple "workaround". When I disable the QVBR
 it runs. However, to disable QVBR I need to disable CO3 too... or the code
 doesn't compile. I'm sure CO3 isn't related to this bug.


 >
 > > In any case, please try it on Windows.
 >
 > Sorry, I have no Windows qsv environment now.

 So if it's work for you, then the problem is only on Windows. The Zeranoe
 binaries are the standard redistributable binaries. And *all* versions
 before the date of 2019-01-25 fail. So as the only change in this date is
 the QVBR support, then the problem is related to it. Futhermore, if I
 disable QVBR (with my workaround) the codec returns to work.

 So, the conclusion is simple: QVBR doesn't work in Windows for the
 MPEG2_QSV encoder. Almost with the current code.

 Regards.

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


More information about the FFmpeg-trac mailing list