Multiple Video Decode and display using i.MX QSB

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Multiple Video Decode and display using i.MX QSB

2,759 Views
AmolN
Contributor I

Hello,

Is it possible to decode 3 H264 streams simultaneously and display it with proper layout. Can someone provide a gstreamer pipleine for demonstrating the same on an i.MX QSB.

Thanks.

Amol

Tags (1)
4 Replies

788 Views
ripple
Contributor I


Rogerio Pimentel said:

You can use:

gst-launch playbin2 uri=file:///home/movie1.mp4 video-sink='mfw_isink disp-width=240 disp-height=240 axis-top=0 axis-left=0' &

gst-launch playbin2 uri=file:///home/movie2.mp4 video-sink='mfw_isink disp-width=240 disp-height=240 axis-top=0 axis- eft=640' &

gst-launch playbin2 uri=file:///home/movie3.mp4 video-sink='mfw_isink disp-width=240 disp-height=240 axis-top=400 axis- eft=0'

 

Rgds

Rogerio

Hello Rogerio

I met one problem when used "mfw_isink" plugin. Can you help me? Thank you!

The following command is tried on the QSB board, but failed to display.

"gst-launch-0.10 -v videotestsrc ! mfw_isink"

The log shows such error information:

"there may be a timestamping problem, or this computer is too slow"
"mxc_ipu_hl_lib.c:3060 wait for irq 22 time out!"

However the plugin "mfw_v4lsink" worked well and show the
image normally.

My rootfs is build from
"L2.6.35_11.09.01_ER_source_bundle.tar.gz" with latest
patches.

Is there any mistake in configuration or any BSP patch missed?

Thank you!

Rgds
Paul

0 Kudos

788 Views
rogerio_silva
NXP Employee
NXP Employee

You can use:

gst-launch playbin2 uri=file:///home/movie1.mp4 video-sink='mfw_isink disp-width=240 disp-height=240 axis-top=0 axis-left=0' &

gst-launch playbin2 uri=file:///home/movie2.mp4 video-sink='mfw_isink disp-width=240 disp-height=240 axis-top=0 axis- eft=640' &

gst-launch playbin2 uri=file:///home/movie3.mp4 video-sink='mfw_isink disp-width=240 disp-height=240 axis-top=400 axis- eft=0'

Rgds

Rogerio

788 Views
AmolN
Contributor I

Thanks Rogerio. But my query is to decode multiple videos simultaneously and display it on a single display device. For e.g. Mosaic kind of application where multiple videos are decoded and displayed simultaneously on a single display device.

Regards.

Amol

0 Kudos

788 Views
rogerio_silva
NXP Employee
NXP Employee

You can try the following solution:

(Thanks to Sario and Fei Chen)

1. UBoot Configuration: (depending on the SoC platform)
bootargs_base=sete bootargs console=ttymxc0,115200
bootargs_comm=sete bootargs ${bootargs} ip=dhcp root=/dev/mmcblk0p1 rootwait
bootargs_video_hdmi=sete bootargs ${bootargs} video=mxcdi0fb:RGB24,1024x768M@60 hdmi
bootargs_video_lvds=sete bootargs ${bootargs} video=mxcdi1fb:RGB666,XGA ldb=di1 di1_primary
bootcmd_phil=run setvol; run bootargs_base bootargs_comm bootargs_video_hdmi bootargs_video_lvds; run loadk; bootm

2. Check if display device is ok or not:
dmesg | grep sii
more /sys/class/graphics/fb1/modes

3. Modify vssconfig under /usr/share directory, like below:
[WVGA]
type = framebuffer
format = RGBP
fb_num = 1
vs_max = 4
[DVI]
type = framebuffer
format = RGBP
fb_num = 2
vs_max = 4
Note:

  • The names in [] will be used for mfw_isink's display and/or display-1 parameters.
  • Make sure to delete /dev/shm/sem.vss_lock and /dev/shm/vss_shmem after modification.
  • The format is fourcc of framebuffer format. For 2 display device, there should only be one support color space conversion, so the other device should only support yuv or rgb.
  • The fb_num is the framebuffer number for target display device, typical configuration is fb0(GUI) and fb2(Video) on Master device, fb1(Video) on Slave display.

4. Play same video on 2 displays:
gst-launch filesrc location=a.avi typefind=true ! aiurdemux name=d ! queue max-size-bytes=0 max-size-time=0 max-size-buffers=0 ! mfw_mp3decoder ! alsasink d. ! queue max-size-bytes=0 max-size-time=0 max-size-buffers=0 ! mfw_vpudecoder ! mfw_isink display=WVGA disp-width=640 disp-height=480 display-1=DVI disp-width-1=640 disp-height-1=480

5. Play different videos on 2 displays:
gst-launch filesrc location=a1.avi typefind=true ! aiurdemux name=d ! queue max-size-bytes=0 max-size-time=0 max-size-buffers=0 ! mfw_mp3decoder ! alsasink d. ! queue max-size-bytes=0 max-size-time=0 max-size-buffers=0 ! mfw_vpudecoder ! mfw_isink display=WVGA disp-width=640 disp-height=480 filesrc location=a2.avi typefind=true ! aiurdemux name=d ! queue max-size-bytes=0 max-size-time=0 max-size-buffers=0 ! mfw_mp3decoder ! alsasink d. ! queue max-size-bytes=0 max-size-time=0 max-size-buffers=0 ! mfw_vpudecoder ! mfw_isink display=DVI disp-width=640 disp-height=480

Regards,

Rogerio

0 Kudos