Zend certified PHP/Magento developer

FFMpeg series thumbnails created less than expected

I have the following ffmpeg command to create a 576p video, and series thumbnails at an interval of every 2 seconds.

ffmpeg -hwaccel cuvid -hwaccel_output_format cuda -i input_video.mp4 
-vf "scale_npp=1024:576,hwdownload,format=nv12,setsar=1:1" -c:v h264_nvenc output_video.mp4 
-vf "scale_cuda=160:90,hwdownload,format=nv12, select='not(mod(n,30))',setpts=N/FRAME_RATE/TB,setsar=1:1" output_thumbnails_%04d.jpg

The input video’s frame rate is 15 fps. Based on my understanding the filter select='not(mod(n,30))',setpts=N/FRAME_RATE/TB should select frames that are not divisible by 30 (effectively extracting one frame every 30 frames).

Assuming the video is of duration 500 seconds, based on this logic I should get ~250 series thumbnails(one after every 2 seconds), but way less are created.