First off, this is far from a simple task.
Writing software for editing and creating videos from scratch is a large undertaking, instead look at open source libraries for paid for libraries.
With the above recommendation you have some choices to make.
- Build a library yourself, if you have no expertise and a good deal of time and patience move on to below or spend a lot of time on this.
- Use a open source library, if that does not suit your needs then
- Go with a paid product, most of trial periods to decide if the product is right for you.