Second step
While I sifted through, throwing files at the script, I realized that I had to add more and more tests, as there was no coherent standard on metadata naming and what tags existed or not. And then different type of subtitles! After testing different formats I had laying around, my latest addition was to add support for external subtitles. This was pretty tricky, as ffmpeg requires you to add a file, normally the video file with included subtitles, so this should be pretty easy, right? Nope! The problem was with the interface, where it either had no idea about the subtitle files existing (could be in a different folder too), or if I threw it a folder it included all the files, and as ffprobe was trying to check the files, subtitles it recognized as a valid format.
My solution was pretty simple, but may be changed slightly in the webui, as I assumed that folder batching the files had the same basename.
convert src1 out1 src2 out2
This is the default cli input, and as one probably can tell there is no room for optional external subtitles. What I therefore did was to allow this:
convert src1 out1 sub1 out1 src2 out2
This means that now both the src and sub point at the same file. Due to this I can just filter away the subtitles, due to ffprobe telling it is a subtitle file, and inject them in the out together with src, replacing the previous mentioned video file now being the subtitle file for the subtitles. It is pretty weird, but it works.