Using GStreamer on DIMM-MX6 / emCON-MX6 under Linux

Freescale changed the names of the gstreamer plugins at a certain version. For the manual using the old plugin names please scroll down.

Also if since we are using kernel 3.10.53 a device tree blob is used to configure the kernel at bootup. If you want to use the adv7180 you will have to adjust and rebuild the device tree (it is included in the kernel source package on our cloud) as mentioned in the "Debian DIMM-MX6 2015-04-15 Update Manual".

 

Hardware specific

To encode the video using the hardware encoder, have a look at the gstreamer plugin vpuenc.

To decode the video using the hardware decoder, have a look at the gstreamer plugin vpudec.

To display a video on the screen, you can use the plugin imxv4l2sink.

 

Examples

The examples are tested on Lothron 3/Cadun-1 with DIMM-MX6 and a digital camera connected to the first input.

File to display

To be able to play a video file you can use a USB Stick or SD Card or put it in your NFS-Root.

Video and audio:

gst-launch playbin2 uri=file:///mnt/test.mp4

Video only (if there are problems with audio):

gst-launch filesrc location=/mnt/test.mp4 typefind=true ! aiurdemux ! vpudec ! imxv4l2sink

Camera input

These gstreamer pipes put the camera picture on the display.

From the dedicated input (CSI):
Before using the camera you have to install the corresponding kernel module. Therefore, we prepared two shell scripts in the root file system of our emBSP.

  • If you want to use the digital camera VM009, use the script cam_setup_mt9m131.sh
  • If you want to use the analog camera input on Lothron, use the script cam_setup_adv7180.sh and adjust the used device tree


Now you can display the input using this pipe:

gst-launch imxv4l2src ! mfw_ipucsc ! video/x-raw-rgb ! imxv4l2sink

From USB-Input (you must use a camera compatible with the UVC driver):

gst-launch v4l2src device=/dev/video1 ! imxv4l2sink

External links

GStreamer examples for i.MX6 provided by Freescale: https://community.freescale.com/docs/DOC-93387

 

 

 

Manual for using the old plugins

Hardware specific

To encode the video using the hardware encoder, have a look at the gstreamer plugin vpuenc.

To decode the video using the hardware decoder, have a look at the gstreamer plugin vpudec.

To display a video on the screen, you can use the plugin mfw_v4lsink.

 

Examples

The examples are tested on Lothron 3/Verno 3 with DIMM-MX6 and a digital camera connected to the first input.

File to display

To be able to play a video file you can use an USB Stick or SD Card or put it in your NFS-Root.

Video and audio:

gst-launch playbin2 uri=file:///mnt/test.mp4

Video only (if there are problems with audio):

gst-launch filesrc location=/mnt/test.mp4 typefind=true ! aiurdemux ! vpudec ! mfw_v4lsink

Camera input

These gstreamer pipes put the camera picture on the display.

From the dedicated input (CSI):
Before using the camera you have to install the corresponding kernel module. Therefore, we prepared two shell scripts in the root file system of our emBSP.

  • If you want to use the digital camera VM009, use the script cam_setup_mt9m131.sh
  • If you want to use the analog camera input on Lothron, use the script cam_setup_adv7180.sh


Now you can display the input using this pipe:

gst-launch mfw_v4lsrc ! mfw_ipucsc ! video/x-raw-rgb ! mfw_v4lsink

From USB-Input (you must use a camera compatible with the UVC driver):

gst-launch v4l2src device=/dev/video1 ! mfw_v4lsink

External links

GStreamer examples for i.MX6 provided by Freescale: https://community.freescale.com/docs/DOC-93387



Back