Convert jpg to video
I would use shell scripting thus:


find the creation date of the first jpeg and the creation date of the subsequent jpeg. 
if the time difference is &lt;= 1 second then we have the start of a sequence. If the files are named sequentially then maybe move them to a subfolder. If not then move (or copy) the files to create a sequence.
while the time difference is &lt;= 1 second keep updating the last frame of the sequence
once we have a non-sequential file create a video using ffmpeg
set the new first frame to the non-sequential file 
repeat for all the jpegs.
concatenate all the videos


ffmpeg can create a video from an image sequence where the files are named frame_000.jpg, frame_001.jpeg, frame_002.jpg… thus:

ffmpeg -i frame_%03d.jpg -r 1 output.mp4


the -r 1 option sets the frame rate to 1 per second. If the sequence doesn't start with 000 then you can use -start_number 123 to specify the first frame. more details here