Verify that SketchUp is using your Nvidia GPU.
Open Window > Preferences > OpenGL > Graphics Card Details
The higher the anti-aliasing, the longer the render will take.
The lower the anti-aliasing the more jagged the edges will appear in the output.
The larger the output frame size, the longer the time it will take.
Also, if the screen view size differs from the output frame size, this will add time for each frame to be transformed. (There are freely available extensions to make it easier to resize SketchUp so that the model view matches the output frame size.)
Is the output a compressed format? Compression takes time. The more compression the more time it takes. (For example MPEG is compressed.)
Generally speaking, animation frames can be written out as individual uncompressed BMP files and later stitched together in a video using an external application or command line utility. (The latter could likely be called by a SketchUp extension to do this in it’s own process, so as to free up SketchUp for doing other work.)
SketchUp extensions can only use what the SketchUp API provides for native video export capability.
Or they might have to get a 3rd party video library and pass frames to this 3rd party library.
Please also understand that Ruby is an interpreted language and is much slower than compiled code.
Things that might slow down the drawing of the model view might also slow the video export. Close all inspector window trays and especially the Outliner and Instructor. Close any unneeded tollbars so their buttons need not be redrawn, etc.
SketchUp itself has an issue with very large video files. There is a bug that if the size of the file (in bytes) exceeds the largest integer that can be expressed with 32 bits (~4.2Gb) then the output video file is never copied from the TEMP folder to the disk location where the user asked it to be. This looks like a silent fail to the user. But the user can manually copy the “video.mpg” from the TEMP folder elsewhere giving it the proper filename.
15m * 60s = 900s
900s / 40s = 22.5sec per frame write time
assume 30fps for video: 900 * 30 = 27,000 frames
27k frames @ 22.5sec write time/frame
= 607,500secs = 10,125 mins
= 168.75 hours = a bit over 7 days