Revised the code to the following:

It runs without generating the previous errors, but the results show more trouble shooting is necessary:

There are *.jpg two files that are now in the directory after the program ran, and the new file(s) should be an *.mp4:

Now, working on to see what is causing it.