After converting your video in a series of image with ffmpeg [Link], the second step is to import them in ImageJ thanks to the command File > Import > Image Sequence...
When writing a script, we start with the Recorder (Plugins > Macros > Record…), and then modify the automatically created code by redefining the variable names and by using methods (functions belonging to objects) that are much more customizable than the default equivalent plugins.
When your code begins to get larger and larger, it is sometimes interesting to split it in several files. However, there is no import or include by default in JavaScript. Here is a simple way to implement such a function...
First steps in the JavaScript Programming World by writing the famous Hello World script [Wiki]. This program is very popular and if you are interested, there is a list of implementations in various languages [Wiki].