Sorry not really clear on what you are asking. if by "splitting footage" you mean divide using masks? If so you can use Divide and Corner https://aescripts.com/divide-and-corner/ as for the second task you will probably need a custom solution. We offer custom scripting services, please open a support ticket to inquire https://aescripts.com/contact/