i.MX6 GStreamer-imx Plugins – Tutorial & Example Pipelines

Gateworks would like to announce the support of the GStreamer-imx plugins starting with Yocto 1.8 on the Ventana family of Single Board Computers.

gstreamerpipeline

Gateworks, the leading supplier of Powerful ARM based Single Board Computer solutions using the Freescale i.MX6, has invested countless engineering hours researching and mastering GStreamer for the i.MX series of processors. Gateworks would like to share this GStreamer research with the rest of the i.MX community of developers!

There are two main versions of GStreamer used on the i.MX6 processor:0.10 and 1.0. Version 1.0 is now the latest standard.

The i.MX6 processor has hardware blocks such as the IPU (image processing unit), VPU (video processing unit), and GPU (graphical processing unit). The main advantage of using these hardware blocks is that there is no CPU cost for decoding/encoding a stream because another hardware block in the i.MX6 takes care of it. This leaves the CPU free to deal with other programs etc.

The GStreamer app works with ‘plugins’. A plugin comprises of elements that can do work on a media stream. For example, the imxvpudec is a VPU based decoder plugin.

This post is specifically about the plugins. There are different versions and sets of plugins available.

Gateworks has chosen to use the GStreamer-imx plugins for the following reasons:

  • Open Source Development model: The project is on github and is very active
  • The main developer has been a GStreamer contributer for some time now and is very active in the GStreamer community
  • The source is very well documented and easy to follow
  • Things are done in a very standard GStreamer way

Plugin List

For a thorough description of each plugin, why and how to use it, please visit the Gateworks Software Wiki GStreamer Page

The following is a list of plugins provided by the latest version of gstreamer-imx (0.11.0)

Type Plugin(s) Element(s) Comments
Audio Decoder imxaudio imxuniaudiodec Uses i.MX uniaudio codecs for decoding
Audio Encoder imxaudio imxmp3audioenc Uses i.MX for MP3 audio encoding
Device Sources imxv4l2video imxv4l2videosrc Get camera source via v4l2
Video Decoder imxvpu imxvpudec VPU Based decoder
Video Encoder imxvpu imxvpuenc_mjpeg; imxvpuenc_mpeg4; imxvpuenc_h264; imxvpuenc_h263 VPU Based encoders
Video Render (sink) imxg2d; imxpxp; imxeglvivsink; imxipu imxg2dvideosink; imxpxpvideosink; imxeglvivsink; imxipuvideosink g2d1, ipu1, pxp2, and egl (overlay) video sinks
Video Converter imxg2d; imxpxp; imxipu imxg2dvideotransform; imxpxpvideotransform; imxipuvideotransform g2d, pxp, egl and ipu video filter/converter/scalars3
Video Compositing imxg2d; imxipu imxg2dcompositor, imxipucompositor gpu/ipu accelerated compositing

1. The g2d sink is very flexible in the types of input video it can take, but doesn’t have the ability to convert to as many formats as the IPU can. On the other hand, the IPU is very picky with it’s input (e.g. requiring a 1px offset) and the kernel driver is very undocumented, but as stated before, it can convert between many colorspace formats.
2. Note that the PXP sinks are only applicable to the i.mx6solo and i.mx6dl processors.
3. Please see note 1 above.

Plugin Example Pipeline

For example, to encode a video from a camera on /dev/video2 into h.264 and save it to a file:

#Take camera input /dev/video2, encode it to h264 at a bitrate of 10mbit/s (CBR) and save to a file.
gst-launch-1.0 imxv4l2videosrc device=/dev/video2 ! imxvpuenc_h264 bitrate=10000 ! filesink location=/tmp/file.mp4

Many more pipeline examples are described and listed on the Gateworks Software Wiki GStreamer Pipelines page

Summary

Using GStreamer 1.0 with the GStreamer-imx plugins is a powerful way to access and apply the multimedia capabilities of the Freescale i.MX6 processors on the Gateworks SBCs.

For more information, visit the Gateworks Software Wiki GStreamer Pipelines page

If there are other examples you would like to see, please add to the discussion!

Yocto 1.8 Linux BSP – Gateworks i.MX6 SBCs

yoctoproject_logo_cmyk

Gateworks would like to announce the release & support of Yocto 1.8 on the Ventana Family of Single Board Computers that feature the Freescale i.MX6 processor. Yocto 1.8 is under the code name Fido. Yocto is a Linux operating system that Gateworks uses for video input and output, networking, GUI, IoT and more. Gateworks recommends all customers and engineers update from Yocto 1.7 to Yocto 1.8.

Yocto 1.8 Updates and Highlights:

  • Updated Linux Kernel. The kernel has been updated to the Gateworks downstream 3.14 vendor kernel.
  • Updated the gstreamer video framework to gstreamer-imx and gstreamer-1.0
    • Updated to the gstreamer-imx community based plugins for utilizing i.MX6 hardware acceleration to provide increased flexibility over what is provided from Freescale in gst-fsl-plugins
    • Included RTSP server application, gst-variable-rtsp-server
    • More gstreamer-imx information is available here
  • AVC8000nano Video Capture Mini-PCIe card for up to 8x D1 inputs
    • The driver is now loaded by default in Yocto 1.8 and tested with gstreamer-imx
    • This is very useful for surveillance and compositing many video sources into one screen
    • Find more information here
  • Updated uboot-envtools
  • Updated gsc-update tool
  • Support for the GW16113 IO Expansion module via the gwsoc software tool. More information available here.

To get started, Gateworks has posted Pre-Built images on the Yocto Wiki page. This includes tarballs and ubis for multimedia and gui images. The wiki page also documents building Yocto 1.8 from source.

Yocto Software Wiki Page

Please update to Yocto 1.8 and contact Gateworks with any questions. Their support team is happy and available to work with you!

Android Touchscreen Development Kit

androidbezelAndroid is becoming a very useful platform for demanding embedded systems. When coupled with a LCD touchscreen, Android loaded on a rugged industrial single board computer can become the interface everyone desires. Gateworks has created a turn-key Android development system to bring a product to market quickly!

The system includes the following:

  • GW5224 Single Board Computer
    • Freescale i.MX6 Quad Core Processor
    • 1GB DRAM
    • 2GB NAND Flash
    • GPS
  • WiFi and Bluetooth Radio
  • 7″ LCD PCAP Touchscreen Display with black anodized bezel
  • 8GB MicroSD Pre-Loaded with Android OS
  • Power Supply
  • Serial Console Adapter & more!

For more information, please visit: Android Development Kit