TinyMCE already has a bunch of nice plugins out of the box. One of them - media plugin - which I would like to extend.

Problem: I use an external Video service with an API. In order to play video on the page, I need to embed it with an iframe. The iframe-code - especially the src-attribute - can be generated only on the server by specific page_id and video_id and some other data from database. So whoever tries to embed a video from that particular video-service needs an already generated iframe-block or at least a generated url and that is the problem.
Goal: Somehow extend tinymce' functionality. Ideally the "media" plugin. I would like to add either a new input-field to "General" tab or create a separate tab with additional input fields. Something like that:

or

Question: What would be the best (or simplest) way to achieve this?