IMX Gstreamer Plugins on IMX8 QM

Hi,

Trying to get a container with Gstreamer and the IMX plugins running, but they’re missing. I followed the guide here, using Torizon OS 6.8.0. The weird thing is that the reference multimedia Yocto-based image has them, but I can’t get them operating in the container. Just to clarify, I’m refering to plugins like imxcompositor-g2d and v4l2h264enc . I tested both and they worked really well on the Toradex Reference Embedded Linux Multimedia image.

Can someone please clarify the situation? I read somewhere that the problem was only on Torizon 7, but seems that Torizon 6.8 has the same issue. We’re evaluating these modules for a product.

Thank you!

Hi, I’m the Toradex AI Assistant.

I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.

Did you like my answer? :+1: :-1:


VPU Support Status in Torizon OS 6 and 7

You’re correct that there are currently limitations with hardware-accelerated GStreamer plugins in Torizon containers. Based on the available information, VPU support is not officially available in either Torizon OS 6 or Torizon OS 7 (1).

Current Status

The GStreamer packages inside Torizon containers don’t have support for utilizing the VPU on i.MX8 hardware, which explains why plugins like imxcompositor-g2d and v4l2h264enc are missing (1). This results in software-only video processing with high CPU usage.

Workaround for Torizon OS 6

There is a proof-of-concept container example available for VPU usage that was tested on Torizon OS 6.X (1). However, this example:

  • Was intended as a proof-of-concept rather than officially tested
  • Requires freezing the Debian package feed to a past snapshot for compatibility
  • May not work correctly on Torizon OS 7.X

Hardware vs Software Processing

When using software-only processing, you’ll experience significantly higher CPU usage. For example, users report CPU consumption around 74-90% for video playback and up to 160% for streaming (1), compared to the much lower usage (typically under 15-20%) when hardware acceleration is working properly.

Alternative Approach

If hardware acceleration is critical for your product evaluation, you might consider using the Reference Multimedia Image with Yocto-based BSPs, where the VPU-accelerated GStreamer plugins are available (2). This approach provides access to hardware-accelerated elements like vpuenc_h264 and vpudec that you’ve successfully tested.

Future Support

Toradex has plans to re-package the GStreamer packages in containers for proper VPU hardware acceleration support, but there’s no specific timeline available for when this will be implemented (1).

For your product evaluation, you may need to weigh the benefits of containerized applications in Torizon against the current limitation of software-only video processing, or consider the Yocto-based approach for hardware-accelerated multimedia capabilities.

Best regards, Toradex AI Assistant.

1 Like

Hey, @alexxs,

Can you please provide the output of the tdx-info command? It will help us investigate your issue better.

Also, please specify how exactly you are doing the tests. You said Gstreamer and the IMX plugins are not operating in the container, please specify the following points:

  • What procedure are you following to do your tests? You linked the article you are following, but it would help to have the exact sequence of commands you are running.
  • How are you verifying that they are not working correctly? Is there an error message? Does the container fail silently? Or are you experiencing unexpected latency?
  • What are you expecting to see from the test, assuming it succeeds?

Best regards,

Hi,

Thank you for the reply!

I just switched the board over to the Embedded Linux image (TDX Multimedia Reference). That has the required plugins.

As for your question, I was running the following command which should display all the Gstreamer plugins installed that have IMX in their name. That came up empty on the container running in Torizon OS (tried both version 7 and 6.8.3).

gst-inspect-1.0 | grep imx

This is the output of the command when ran in the TDX Multimedia Reference Image:

root@apalis-imx8-06959030:~# gst-inspect-1.0 | grep imx
imxcompositor: imxcompositor_g2d: IMX g2d Video Compositor
imxvideoconvert: imxvideoconvert_g2d: IMX g2d Video Converter

Hey @alexxs,

As discussed in the post linked by the AI, VPU support is still in development for Torizon 6 and 7. You can use our unstable feed to install plugins for the iMX.8:

echo "\n\
Types: deb\n\
URIs: ${TORADEX_FEED_BASE_URL}/snapshots/20230328T143626Z\n\
Suites: testing\n\
Components: main non-free\n\
Signed-By: /usr/share/keyrings/toradex-debian-repo-unstable.gpg"\
    >> /etc/apt/sources.list.d/toradex.sources

Instead of the container in the article try running this one, it should contain the plugins for the iMX.8. Also, run it with MACHINE=apalis-imx8.

Best regards,