#10735: Bug: FFmpeg's qsv encoder wrappers broken with the -g parameter set, 
cannot
enforce set keyframe interval
-------------------------------------+-------------------------------------
             Reporter:  Dennis E.    |                    Owner:  (none)
  Mungai                             |
                 Type:  defect       |                   Status:  new
             Priority:  critical     |                Component:  avcodec
              Version:  git-master   |               Resolution:
             Keywords:  quicksync    |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
Comment (by wenbin,chen):

 I cannot run the command you provide, so I make some changes to make it
 work

 {{{
 ffmpeg -thread_queue_size 5120 -nostdin -y -fflags +genpts -y \
 -init_hw_device vaapi=va:/dev/dri/renderD129 \
 -init_hw_device qsv=qs@va \
 -filter_hw_device qs \
 -extra_hw_frames 64 \
 -threads:v 2 -async 1 \
 -probesize 10M -analyzeduration 10M \
 -hwaccel vaapi -hwaccel_output_format vaapi \
 -f mpegts -fix_teletext_pts 1 -scan_all_pmts 1 -merge_pmt_versions 1 \
 -i "input.ts" \
 -vf
 
'hwmap=derive_device=qsv,format=qsv,vpp_qsv=deinterlace=2:scale_mode=0:async_depth=4'
 \
 -sc_threshold 0 -strict -1 -bitrate_limit:v 0 -g:v 50 -async_depth:v 4
 -look_ahead_depth:v 40 \
 -preset:v medium -refs:v 5 -extbrc:v 1 -bf:v 0 -low_power:v 1 -r:v 25 \
 -b:v 4500k -minrate:v 4500k -maxrate:v 4500k -bufsize:v 9000k
 -rc_init_occupancy:v 4500k -c:v h264_qsv \
 -c:a aac -ac 2 -b:a 128k \
 -flags -global_header+cgop -max_muxing_queue_size 2048
 -max_interleave_delta 0 -flush_packets 0 -fps_mode cfr -f mpegts \
 -y "out.ts"
 }}}
 I added "-hwaccel vaapi -hwaccel_output_format vaapi" options

 gop_size(-g) is measured by number of frames not by pts time. You should
 count frames between two I frames to verify it.

 I see you enabled extbrc. It will automatically enable adaptive_i which
 makes the result doesn't strictly obey the gop_size you set. It inserts I
 frame when it is needed, for example when scene change.
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/10735#comment:4>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
_______________________________________________
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to