Well, the problem is you can split the video in many different ways. Both 26 30 second or 3 260 second long webms would work, although I can almost guarantee you, that all previously posted scripts wouldn't be able to handle the latter case.
Trying to get the best quality out of a webm, while fitting it in a file size limit, can sometimes be tricky. I have a script to handle that part (see: https://github.com/HelpSeeker/Restricted-Webm
), but it wouldn't split the video automatically for you. A makeshift solution would be to use something like https://pastebin.com/UbW4UrWw
first, which splits videos into x second long mkvs (x being specified by the user, with the last video length being adjusted by the script), that you could then convert into webms.
Of course the drawback is, that you'd have to transcode the video 2 times. I tried to minimize speed/quality loss. The audio shouldn't really suffer as it's converted into flac, as for the video, you can always decrease the crf value (even go lossless if you have enough disk space available) to decrease the loss in quality.