The original video file has variable frame rate (VFR) and has a duration of:
Duration: 00:31:17.20, start: 0.000000, bitrate: 4335 kb/s
nb_frames=109793
(the average framerate is about 58.49FPS)
It is converted to constant frame rate (CFR) 60FPS via:
ffmpeg -hwaccel cuvid -c:v h264_cuvid -vsync passthrough -i original.mp4 -c:v h264_nvenc -b:v 5M -vf "fps=fps=60:round=zero:eof_action=round" cfr_nvenc.mp4
However, the duration is now slightly longer. It was expected to have the same duration as the original (maybe minus the duration time of the last frame, which would be on the order of 1/60s):
Duration: 00:31:17.28, start: 0.000000, bitrate: 4997 kb/s
nb_frames=112637
Compared to libx264, which gets the expected results when converted to 60FPS.
ffmpeg -vsync passthrough -i original.mp4 -c:v libx264 -b:v 5M -vf "fps=fps=60:round=zero:eof_action=round" cfr_libx264.mp4
Notice the same duration as the original video, and the expected frame count based on that: 313600+17.2060=112632.0
Duration: 00:31:17.20, start: 0.000000, bitrate: 4924 kb/s
nb_frames=112632
compiled with:
Name: ffnvcodec
Description: FFmpeg version of Nvidia Codec SDK headers
Version: 9.0.18.2