On Sat, Apr 27, 2019 at 8:22 PM Gyan <ffm...@gyani.pro> wrote: > > > > On 27-04-2019 05:25 PM, Carl Eugen Hoyos wrote: > > 2019-04-27 13:17 GMT+02:00, Jun Zhao <mypopy...@gmail.com>: > >> perfer avctx->framerate first than use avctx->time_base when > >> setting the frame rate to encoder. 1/time_base is not the > >> average frame rate if the frame rate is not constant. > > But why would the average framerate be a good choice to set > > the encoder timebase? > > > > Also, note that x264/5 RC looks at the framerate. > See > https://code.videolan.org/videolan/x264/commit/c583687fab832ba7eaf8626048f05ad1f861a855 > > I can generate a difference with x264 by setting -enc_time_base to > different values (with vsync vfr). > Maybe check that this change does not lead to a significant change in > output. Although I think this would be still an improvement for those > cases where r_frame_rate >> avg_frame_rate > > Gyan Yes, framerate and time_base is not close correlation in vfr case, e,g, I can setting the framerate = 60fps, but time_base = 1/1000 s, then setting pts like:
time_base = 1/1000 s = 1 millisecond framerate = 60 fps per second PTS 0----16----33----50----66----83----100 ... PTS delta 16 17 17 16 17 17 ... we will get 16ms * 20 frames + 17 ms * 40 frames = 1000ms _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".