It depends:
- alfa channel is sufficient for composition, two frames with scaling and positioning, only on video output -> use DRM (libdrm ...)
- more complex compositions -> use OpenGLES 2.0 with shader program (libGLESv2/libEGL ...) (Search for OpenGLES python bindings and examples for RasberryPI.)
I left this community in Aug 2019 due to PINE64 refusal to produce/deliver ROCK64-1G version 3 after more than one year of changing statuses to "planning", "evaluating", "releasing", "availability", "estimated availability" and finally "no schedule" . ROCK64 is dead platform without any advantage. Buy Raspberry PI 4 !