[FFmpeg-devel] NVENC: Possible issue with recent b_frame_mode support?
Oliver Collyer
ovcollyer at mac.com
Sat Feb 16 17:28:46 EET 2019
Hello
With latest ffmpeg-master code on Windows, when I enable the new nvenc encoder option "b_ref_mode" with "middle", and 4 b-frames, I find that calls to avcodec_receive_packet are returning invalid dts/pts combinations.
To be more precise dts is frequently greater than pts by 1. This then causes av_interleaved_write_frame to fail with an invalid argument error. See below for my output.
Similar behaviour is exhibited in ffmpeg itself, except instead of totally failing, ffmpeg spews a huge amount of output and tries to guess new values.
In both cases, if I omit the new "b_ref_mode" value, but keep b-frames, then this issue does not occur.
I can work around it, of course, but I suppose something needs adjusting in the nvenc code to avoid this?
Regards
Oliver
16/02/19 15:19:41 : avcodec_receive_packet - ret 0 size 9276 pts=1096313 dts=1096311 DELTA -2
16/02/19 15:19:41 : avcodec_receive_packet - ret 0 size 9780 pts=1096311 dts=1096312 DELTA 1
16/02/19 15:19:41 : av_interleaved_write_frame failed - ret -22 (Invalid argument)
16/02/19 15:19:41 : avcodec_receive_packet - ret 0 size 1053 pts=1096312 dts=1096313 DELTA 1
16/02/19 15:19:41 : av_interleaved_write_frame failed - ret -22 (Invalid argument)
16/02/19 15:19:41 : avcodec_receive_packet - ret 0 size 1016 pts=1096314 dts=1096314 DELTA 0
16/02/19 15:19:41 : avcodec_receive_packet - ret 0 size 23637 pts=1096320 dts=1096315 DELTA -5
16/02/19 15:19:41 : avcodec_receive_packet - ret 0 size 8872 pts=1096318 dts=1096316 DELTA -2
16/02/19 15:19:41 : avcodec_receive_packet - ret 0 size 207 pts=1096316 dts=1096317 DELTA 1
16/02/19 15:19:41 : av_interleaved_write_frame failed - ret -22 (Invalid argument)
16/02/19 15:19:41 : avcodec_receive_packet - ret 0 size 1011 pts=1096317 dts=1096318 DELTA 1
16/02/19 15:19:41 : av_interleaved_write_frame failed - ret -22 (Invalid argument)
16/02/19 15:19:41 : avcodec_receive_packet - ret 0 size 117 pts=1096319 dts=1096319 DELTA 0
16/02/19 15:19:41 : avcodec_receive_packet - ret 0 size 29971 pts=1096325 dts=1096320 DELTA -5
16/02/19 15:19:41 : avcodec_receive_packet - ret 0 size 9378 pts=1096323 dts=1096321 DELTA -2
16/02/19 15:19:41 : avcodec_receive_packet - ret 0 size 7772 pts=1096321 dts=1096322 DELTA 1
16/02/19 15:19:41 : av_interleaved_write_frame failed - ret -22 (Invalid argument)
16/02/19 15:19:41 : avcodec_receive_packet - ret 0 size 997 pts=1096322 dts=1096323 DELTA 1
16/02/19 15:19:41 : av_interleaved_write_frame failed - ret -22 (Invalid argument)
16/02/19 15:19:41 : avcodec_receive_packet - ret 0 size 991 pts=1096324 dts=1096324 DELTA 0
16/02/19 15:19:41 : avcodec_receive_packet - ret 0 size 26456 pts=1096330 dts=1096325 DELTA -5
16/02/19 15:19:41 : avcodec_receive_packet - ret 0 size 8696 pts=1096328 dts=1096326 DELTA -2
16/02/19 15:19:41 : avcodec_receive_packet - ret 0 size 175 pts=1096326 dts=1096327 DELTA 1
16/02/19 15:19:41 : av_interleaved_write_frame failed - ret -22 (Invalid argument)
More information about the ffmpeg-devel
mailing list