So we have been looking into this issue, finally. I don’t have a perfect answer yet… but I wanted to share some updates.
First of all I can reproduce the issue. It is definitely a performance issue in the video pipeline, related to extraneous buffers copy in the pipeline. We did some improvements in the video pipeline since the 16.09 release and with a recent build I can play the videos quite well, which is a good news.
The video (v4l2dec) and the X11/GPU rendering (glimagesink) plugins are capable to handle dmabuf import/export (e.g. full zero copy of the buffers), however Gstreamer playbin/decodebin won’t be able to use dmabuf automatically, as of yet. So any pipeline (or Gst apps) that just relies on playbin will suffer from this performance hit.
If I use a fully optimized pipeline, i was able to play (under X11) the video you provided (off line).
I have been using the following pipeline:
GST_GL_PLATFORM=egl GST_GL_API=gles2 gst-launch-1.0 filesrc location=/tmp/sa0026.mp4 ! qtdemux name=m m.video_0 ! h264parse ! v4l2video0dec capture-io-mode=dmabuf ! glimagesink
This is the most opimized pipeline for our platform at this point.
If you omit catpure-io-mode on the v4l2dec plugin , it won’t use dmabuf between the output of the video decoder and the x11 sink. The EGL/GLES backend in glimagesink is the only path where dmabuf is implemented. With the fully optimized pipeline i can play your video with ~4% cpu utilization which looks correct.
I have been doing all my experiments with this build:
It is a recent build using a more recent version of Debian, which we will release soon. It is using 4.4 based kernel, but it has a more recent version of the video driver compared to the one you had in 16.09 release.
A few more things to be aware:
- once you have flashed this build, please do not upgrade. It uses Gstreamer 1.10.2 and currently in Debian we have 1.10.4 which does not work right now (this is a separate issue, which we are looking into).
- Gst 1.10.2 has a bug (which was fixed in 1.10.3), the workaround is to set
before running any gstreamer pipeline
Note that using the complete Debian desktop will not give you the ‘best overall performance’ since the desktop itself is using CPU and GPU resources. While this might be ok for demonstration/evaluation, using a plain vanilla is often not what you want for your product. We don’t know what your product really is… but if you want to get into a minimal graphical environment and get rid of any desktop visual effects…
In the coming days/weeks , we will publish builds based on 4.9 kernel, and I expect it will have the same level of performance as in this 202 build, but all issues mentioned above will be fixed.
Let us know how things go with this new build and set of instructions.