We are using the kivy to build out video system. For the VideoPlayer widget build in kivy, the performance overhead is too high especially for mega pixel video source. The major overhead is from appsink which get the gstBuffer back to python space. Some other overheads are construct the kivy Texture and frame updating. We are thinking to enhance this issue is 3 ways, not quite sure yet.
1. Build a video player with glimagesink as a kivy widget extension.
2. Get the opengl texture back from glupload. Don't know the feasibility and benefits.
3. Use python to write a module that reduce the overhead of appsink.
Any proposal is welcome. Here are the testing reports:
video quality -- [url removed, login to view] 640x352 30fps
plabin ->ximagesink 12-15.x%
vlc 7.x %
[url removed, login to view] -> ximagesink 10-12.x%
[url removed, login to view] -> appsink 14-16.x%
kivy player 20% 30fps
video quality -- [url removed, login to view] 1280x720 30fps
[url removed, login to view] -> appsink 3x-4x% --> 40%
[url removed, login to view] -> fakesink 18%
kivy player 53-62% 30fps
kivy player 60-61% 60fps
kivy player w/o texture blit, update frame 45%
kivy player w/o texture blit, update frame, pull-buffer 45%
kivy player w/o update frame 55%
kivy player modified with self pipeline using videoscale to width=640, height=352 --> 35%
a. performance overhead --> 42/18 --> 2.3 times (without rendering)
b. appsink overhead --> (45-18)/42 --> 64%
c. texture blit overhead --> (55-45)/42 --> 23%
d. update frame overhead --> (60-55)/42 --> 12%