It's just an idea, I don't know how SPGM works inside...
In a nutshell, SPGM does a directory listing for the main photo gallery listed in the settings. It then separates the sub-directory names from the photos. It then displays the sub-directories as galleries and the photo's thumbnails.
SPGM-Vid is simply a modified version of the SPGM that looks for videos instead of photos. It then determines what type of video it is and the correct Object/Embed statements to use to play the video. SPGM-Vid still handles sub-directories the same as SPGM. The only thing really special that SPGM-Vid does is provide a link in the root photo gallery to either a specified sub-video gallery or the root video gallery, depending on the settings.
The change I have in mind for SPGM-Vid will not only provide a link from the root photo gallery to SPGM-Vid, but will also provide a link from a sub-photo gallery to a sub-video gallery. I am planning a including some sort of switch to turn-off the root-photo gallery link to SPGM-Vid.
So in a nutshell, that is what is under the hood of SPGM and SPGM-Vid.