Playing multiple HD videos on i.MX6

Published on January 16, 2013

Archived Notice

This article has been archived and may contain broken links, photos and out-of-date information. If you have any questions, please Contact Us.

This is just a quick post with some details of some gstreamer-fu to decode and play back multiple HD videos using the VPU hardware acceleration on the i.MX6. The command-lines below use the mfw_isink gstreamer element to display the output from the 1920x816 Kung Fu Panda trailer from pocketmovies.net into three windows on a display configured at 1080P.

The only real trick to this is setting the display-width, display-height, axis-top, and axis-left parameters. For what it's worth, this was tested on our LTIB-No X userspace.

Window 1 at 0:0

 root@boundary ~/$ gst-launch filesrc location=kungfu.flv         ! 'video/quicktime'         ! aiurdemux name=demux demux.         ! queue max-size-buffers=0 max-size-time=0         ! vpudec         ! mfw_isink disp-width=960 disp-height=408 demux.         ! queue max-size-buffers=0 max-size-time=0         ! mfw_aacdecoder ! audioconvert         ! 'audio/x-raw-int,channels=2'         ! alsasink 

Window 2 at 960:480

 root@boundary ~/$ gst-launch filesrc location=kungfu.flv         ! 'video/quicktime'         ! aiurdemux name=demux demux.         ! queue max-size-buffers=0 max-size-time=0         ! vpudec         ! mfw_isink axis-top=408 axis-left=960 disp-width=960 disp-height=408 demux.         ! queue max-size-buffers=0 max-size-time=0         ! mfw_aacdecoder ! audioconvert         ! 'audio/x-raw-int,channels=2'         ! alsasink 

Window 3 at 0:672

 root@boundary ~/$ gst-launch filesrc location=kungfu.flv         ! 'video/quicktime'         ! aiurdemux name=demux demux.         ! queue max-size-buffers=0 max-size-time=0         ! vpudec         ! mfw_isink axis-top=672 axis-left=0 disp-width=960 disp-height=408 demux.         ! queue max-size-buffers=0 max-size-time=0         ! mfw_aacdecoder ! audioconvert         ! 'audio/x-raw-int,channels=2'         ! alsasink 

Note that audio blending from the three videos also just works.

I know this begs for a video, but it's late in the day and we thought this might be useful.