TX1: OpenGL and Gstreamer compatibility


I have tried to install Gstreamer@1.8.1 on the TX1 (T4L@24.1) using following command

sudo gst-install --prefix=/home/ubuntu/gst-1.8.1 --version=1.8.1

However I have found the problem with building the OpenGL based plugins on the TX1 platform.

Problem fix

If you met similar problems I would suggest the following steps:

$ find / -name libGL.so

You should find MESA and TEGRA libraries and symbolic link to one of them. By default the MESA is used (T4L 24.1). It has to be re-linked like follows:

cd /usr/lib/aarch64-linux-gnu
sudo rm libGL.so
sudo ln -s tegra/libGL.so libGL.so

Now, if you rebuild your gst-plugins-bad you should successfully go through the OpenGL plugins compilation.

Final test

Example testing pipelines

export GST_GL_API=opengl
export DISPLAY=:0 
export XAUTHORITY=/home/ubuntu/.Xauthority

gst-launch-1.0 gltestsrc ! glimagesink
gst-launch-1.0 gltestsrc ! glmosaic ! fakesink
gst-launch-1.0 gltestsrc ! glmosaic ! gldownload ! videoconvert ! vp8enc ! webmmux ! filesink location=/tmp/out.webm

Please remember to point your custom gstreamer installation as the default for this test. For example (based on the installation setup):

export PATH=/home/ubuntu/gst-1.8.1/bin:$PATH
export LD_LIBRARY_PATH=/home/ubuntu/gst-1.8.1/lib/aarch64-linux-gnu


Hope you found this helpful. If yes, please follow me on Twitter to be always up to date.