[FFmpeg-trac] #11131(ffmpeg:new): Nvenc b_ref_mode middle does not write max_num_reorder_frames == 2 in SPS

FFmpeg trac at avcodec.org
Wed Aug 7 16:35:54 EEST 2024


#11131: Nvenc b_ref_mode middle does not write max_num_reorder_frames == 2 in SPS
-------------------------------------+-------------------------------------
             Reporter:  Balling      |                     Type:  defect
               Status:  new          |                 Priority:  minor
            Component:  ffmpeg       |                  Version:  git-
                                     |  master
             Keywords:  cuda, nvenc  |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug: see #6810, we can just add
 vui->bitstreamRestrictionFlag = 1; to ffmpeg code to write
 bitstream_restriction_flag 1 in SPS and that will allow Nvidia driver to
 set max_num_reorder_frames to 2, which is needed for -b_ref_mode middle
 and max_num_reorder_frames to 1 which is needed for b_ref_mode each.

 Also see https://forums.developer.nvidia.com/t/sei-nal-unit-resend-each-
 packet-on-h264/145653/3

 And people crying about it in
 https://github.com/bluenviron/mediamtx/issues/989#issuecomment-1163015224

 How to reproduce:
 {{{
 % ffmpeg.exe -lavfi "ddagrab=framerate=240" -c:v h264_nvenc -b_ref_mode
 middle -ref ddagrab.mkv
 }}}

 And then use VQAnalyzer that it has wrong SPS.


 Patches should be submitted to the ffmpeg-devel mailing list and not this
 bug tracker.
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/11131>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list