[FFmpeg-trac] #8065(undetermined:new): VPP_QSV filter don't work as expected

FFmpeg trac at avcodec.org
Mon Aug 19 16:44:56 EEST 2019


#8065: VPP_QSV filter don't work as expected
-------------------------------------+-------------------------------------
             Reporter:  thx4ever     |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:
                                     |  undetermined
              Version:  git-master   |               Resolution:
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------

Comment (by thx4ever):

 Replying to [comment:9 lizhong1008]:
 > Replying to [comment:7 thx4ever]:
 > > 1 - Yes i have tried HEVC HW Encoder and it Works but when try
 software encoder the final result are garbage of colors, it seems
 something is wrong with ffmpeg
 > > 2- Sorry for that but doenst matter what BRC i use, CQP-AVB-VBR on HW
 it Works but software is garbage, can u address this bug to ffmpeg
 developers to fix this issue? This Works on sample_multi_transcode on
 Windows 10 Pro x64 with git Media SDK
 > > 3- Yes sample encoder Works but i use alot ffmpeg right now
 >
 > Could you please share your sample encoder and sample multi transcode
 command line?
 >
 > I checked MediaServerStudioProfessional2017 release guide, it is said
 that:
 >
 > MAIN10 profile encoding/decoding and range extensions profile encoding
 can
 > be done only with system memory at input and output on linux (SDK/driver
 > limitation for video memory frames allocation)
 >
 > Thus means probally you should remove the "-hwaccel qsv" to make it is
 working in sytstem memory:
 >
 > ffmpeg-v verbose -c:v h264_qsv -i tikect_8065/sample_AVC.264 -vf
 vpp_qsv=format=p010le -c:v hevc_qsv -load_plugin hevc_sw -profile:v main10
 -preset:v veryslow -g 240 -refs:v 6 -bf:v 3 -flags -cgop -gpb 0 -q:v 18
 -vframes 5 -color_primaries bt709 -color_trc bt709 -colorspace bt709
 -bsf:v
 hevc_metadata=colour_primaries=1:transfer_characteristics=1:matrix_coefficients=1
 sample_HEVC.hevc
 >
 > Please tried it and update the status.

 I tried and dont work, check this problem No hw context provided if i
 remove hwaccel qsv option, maybe we need a option in ffmpeg to work in
 system memory wit hwaccel qsv option on

 ffmpeg -v verbose -hide_banner -c:v h264_qsv -i
 "C:\Users\thx4ever\Downloads\sample_AVC (2).264" -vf vpp_qsv=format=p010le
 -c:v hevc_qsv -load_plugin hevc_sw -profile:v main10 -preset:v veryslow -g
 240 -refs:v 6 -bf:v 3 -flags -cgop -gpb 0 Sample.hevc
 [h264 @ 000002A572E37EC0] Reinit context to 1280x720, pix_fmt: yuv420p
 [h264 @ 000002A572E23C40] max_analyze_duration 5000000 reached at 5000000
 microseconds st:0
 Input #0, h264, from 'C:\Users\thx4ever\Downloads\sample_AVC (2).264':
   Duration: N/A, bitrate: N/A
     Stream #0:0: Video: h264 (High), 1 reference frame,
 yuv420p(progressive, left), 1280x720, 25 fps, 25 tbr, 1200k tbn, 50 tbc
 File 'Sample.hevc' already exists. Overwrite ? [y/N] y
 [AVBSFContext @ 000002A574768D80] The input looks like it is Annex B
 already
 Stream mapping:
   Stream #0:0 -> #0:0 (h264 (h264_qsv) -> hevc (hevc_qsv))
 Press [q] to stop, [?] for help
 [h264_qsv @ 000002A575188680] Initialized an internal MFX session using
 hardware accelerated implementation
 [graph 0 input from stream 0:0 @ 000002A574D6C040] w:1280 h:720
 pixfmt:nv12 tb:1/1200000 fr:25/1 sar:0/1 sws_param:flags=2
 [Parsed_vpp_qsv_0 @ 000002A574D6C240] No hw context provided.
 [Parsed_vpp_qsv_0 @ 000002A574D6C240] Failed to configure output pad on
 Parsed_vpp_qsv_0
 Error reinitializing filters!
 Failed to inject frame into filter network: Invalid argument
 Error while processing the decoded data for stream #0:0
 [AVIOContext @ 000002A57479EE80] Statistics: 0 seeks, 0 writeouts
 [AVIOContext @ 000002A572DFE540] Statistics: 1540096 bytes read, 0 seeks
 Conversion failed!

 Here are my command line options for sample_multi_transcode

 sample_multi_transcode -i::h264 "C:\Users\thx4ever\Desktop\Sample.264
 -o::h265 C:\Users\thx4ever\Desktop\sample.hevc -hw -async 10 -sys -pe
 hevce_sw -cqp -qpi 20 -qpp 22 -qpb 24 -u quality -l 1 -gop_size 240 -dist
 4 -num_ref 6 -bref -bpyr -gpb:off -TransformSkip:on -ec::nv12 -dc::nv12 -w
 1920 -h 1080 -WeightedPred::default -WeightedBiPred::default -amfs:on -pp

 I'm using latest Intel Media SDK from GitHub

 This pull request [samples] Correct vpp output bit depth according to
 FourCC #1416 from Intel Media SDK git did the trick for
 sample_multi_transcode working in hardware to convert from 8 bit to 10
 bit, check the pull request from Intel Media SDK

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


More information about the FFmpeg-trac mailing list