Quantcast
Channel: Tiny Devices
Viewing all articles
Browse latest Browse all 72

I.MX6 - gstreamer-imx

$
0
0
gstreamer-imx is set of gstreamer 1.0 imx6 video plugins principally developed by Carlos Giani a.k.a dv_ (great work!). Once stable these plugins "hopefully" will supersede the Freescale BSP gstreamers 0.10 plugins which are showing their age given that gstreamer 0.10 is longer maintained.

The main driver for this work was to get a usb webcam streaming via these plugins this will be covered in the next post. In meantime below are build instructions for deploying the latest code to the debian rootfs if you fancy experimenting.  I'm finding the debian jessie build useful to jump start prototype development on the imx6 mainly due to the availability of prebuilt packages.

Here is a short video demonstrating the use of color key along with the imxipusink to hide/view video within XFCE. The video only appears for the color key 'black' hence it is visible in the terminal windows and menu. The test device was a AR6MXQ board provide by BCM Advanced Research. As a designer/provider of industrial motherboards BCM have done a good job with their first feature rich ARM development board.





The current debian rootfs already includes an older build of the gstreamer-imx plugins. Upgrading these to a newer release is fairly trivial, you can build the latest sources natively on debian as follows:

1. Remove the existing plugins

 rm /usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstimxipu.so 
rm /usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstimxvpu.so
rm /usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstimxeglvivsink.so

rm /usr/lib/libgstimxcommon.so
rm /usr/lib/libgstimxcommon.so.0
rm /usr/lib/libgstimxcommon.so.0.9.1

2. Build lastest sources

 git clone git://github.com/Freescale/gstreamer-imx.git  
cd gstreamer-imx
./waf configure --prefix=usr --kernel-headers=/usr/include
./waf
./waf install

3. Deploy plugins

 cp usr/lib/gstreamer-1.0/libgstimxipu.so /usr/lib/arm-linux-gnueabihf/gstreamer-1.0  
cp usr/lib/gstreamer-1.0/libgstimxvpu.so /usr/lib/arm-linux-gnueabihf/gstreamer-1.0
cp usr/lib/gstreamer-1.0/libgstimxeglvivsink.so /usr/lib/arm-linux-gnueabihf/gstreamer-1.0
cp usr/lib/gstreamer-1.0/libgstimxv4l2src.so /usr/lib/arm-linux-gnueabihf/gstreamer-1.0
cp usr/lib/libgstimxcommon.so.0.9.5 /usr/lib
cd /usr/lib
ln -s libgstimxcommon.so.0.9.5 libgstimxcommon.so.0
ln -s libgstimxcommon.so.0.9.5 libgstimxcommon.so

4. Reboot

5. Verify the plugins are present

 root@debian-imx6:~# gst-inspect-1.0 | grep imx  
imxipu: imxipuvideotransform: Freescale IPU video transform element
imxipu: imxipusink: Freescale IPU video sink
imxvpu: imxvpudec: Freescale VPU video decoder
imxvpu: imxvpuenc_h263: Freescale VPU h.263 video encoder
imxvpu: imxvpuenc_h264: Freescale VPU h.264 video encoder
imxvpu: imxvpuenc_mpeg4: Freescale VPU MPEG-4 video encoder
imxvpu: imxvpuenc_mjpeg: Freescale VPU motion JPEG video encoder
imxeglvivsink: imxeglvivsink: Freescale EGL video sink
imxv4l2src: imxv4l2src: V4L2 CSI Video Source

6. Test video playback (under X11)

 gst-launch-1.0 playbin uri=file://<video file> video-sink=imxeglvivsink  

Unfortunately the elements/sinks aren't documented so you may need to refer to the source code to determine features or properties. There is also a new plugin for CSI camera sources (imxv4l2src) provided by  Philip Craig.

Viewing all articles
Browse latest Browse all 72

Trending Articles