i have a complex script that figures out what files it needs and downloads what it does not have with the goal of joining in sequence into a single video file. everything is in mp4 or webm container. it converts any mp4 to webm and even uploads the webm back to the file server. so the final join will have only webm files.

the critical issue is that this is all automated and not interactive.

this is also running on Ubuntu 20.04 LTS Linux (not 22.04) so ffmpeg is there if someone knows the magical incantations to make it do.

this script will be given multiple lists of videos to process overnight. each list identifies what is to be joined in the sequence as given in the list. if it gets 17 lists, it will create 17 join results if it has enough time. it automatically quits starting new joins at 6:00 AM. hopefully what got started at 5:59 AM will be done by 8:00 AM.

things i think i need:
1. program to fetch image size (horizontal and vertical) to know if it needs to be expanded to a larger size or if it is too large (that list will be skipped).
2. program to actually join two or more video files (converted and/or expanded as needed) into a single video file in the same webm container format.