Verdin plus and gstream

I’m trying to verify playback of an .mp4 I’m using the torizon OS and wondering if there is a container I can use that has gstreamer all set up.

Hi, I’m the Toradex AI Assistant. I’m in early beta, and I would appreciate your feedback.
The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello,

For video playback on a Verdin module using Torizon OS, you can utilize the Toradex Debian Docker images that come with GStreamer pre-installed or you can customize your own Docker container to include GStreamer and any necessary plugins for your specific use case.

To get started with a container that has GStreamer set up, you can pull a Debian-based image provided by Toradex from Docker Hub. These images are designed to work seamlessly with TorizonCore and include the base tools required for a wide range of applications. From there, you can install additional GStreamer packages as needed for your .mp4 playback requirements.

Here’s a basic outline of the steps you would follow:

  1. Pull a Debian-based Docker image from Toradex: Use a command like docker pull torizon/debian:buster to get a Debian Buster image. Torizon also provides images based on other Debian versions, so choose the one that best fits your needs.

  2. Customize the Docker image:

    • Create a Dockerfile to customize the Debian image.
    • Install GStreamer and necessary plugins by adding RUN apt-get update && apt-get install -y gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-tools to your Dockerfile. You might need additional plugins based on the codecs required for your .mp4 file.
    • Set the GST_GL_API environment variable to gles2 by adding ENV GST_GL_API=gles2 to your Dockerfile. This is crucial for enabling video playback in some scenarios.
  3. Build your Docker container: Run docker build -t your-custom-image-name . to create your container image with GStreamer installed.

  4. Run your Docker container on Torizon: Use a command similar to docker run --rm -it your-custom-image-name to start your container. You may need to add additional Docker run options depending on your application’s requirements, such as --device flags to grant access to GPU for hardware-accelerated video decoding.

This approach allows you to leverage the flexibility of Docker containers on Torizon OS, enabling you to easily deploy and run applications with specific dependencies like GStreamer for video playback.

Best regards,
Toradex AI Assistant

Please, also check if these links can help you solve your problem:

Web Browser / Kiosk Mode with Torizon OS | Toradex Developer Center.

Greetings @jeffbelz,

As our ToradexAI has suggested you should review our article here: How to use Gstreamer on Torizon OS | Toradex Developer Center

I tested the example documented in this article using various mp4 test files:

I was able to playback these videos just fine on Verdin i.MX8M Plus. As a side-note I did use the VPU-accelerated option in my test, as I imagine that is more preferable.

Best Regards,
Jeremias

I get an error when I go to build

Err:2 Index of /debian/snapshots/20220512T021145Z testing InRelease
1.073 Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.

any ideas?

I get an error when I go to build

Strange, I just built this yesterday myself with no issues. Are you building this version with the VPU acceleration?: torizon-samples/vpu/generic/vpuGeneric at bookworm-new · toradex/torizon-samples · GitHub

Also where are you building this container image? On your development PC? On the Toradex module?

if you are building it on the Toradex module then what version of the OS are you running on it?

Best Regards,
Jeremias

Jeremias:

I move to a different PC, My work PC has a lot of restrictions. Now that I’m on the new PC I can do the build. I’m building on my windows PC with wsl2…so Linux. I’m confused about section " Test GStreamer" to I add the entrypoint and cmd’s at the end of the Docker file to build?

I add the entrypoint and cmd’s at the end of the Docker file to build?

You don’t have to, those are optional. Those just control what command gets executed inside the container image when you run it. You can override this behavior on the command line during docker run of your container.

I would recommend reading Docker documentation to understand the effects of this: Docker Best Practices: Choosing Between RUN, CMD, and ENTRYPOINT | Docker

In any case if you’re just evaluating and testing things you probably just want to run the container image, get a shell inside it and manually run gstreamer commands to test.

Best Regards,
Jeremias

Hi @jeffbelz,

I know you’ve moved onto other topics/threads. Just wanted to confirm if we can close this one out, or whether you still had some related issues here.

Best Regards,
Jeremias

Yes, I’m all set