MX53: screen is flashing when using mfw_isink

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

MX53: screen is flashing when using mfw_isink

Jump to solution
5,088 Views
PatrickChau
Contributor II

Hi All:

         I am using mx53qsb board for my project, since I need to play the same video on two different display (VGA + LVDS) at the same time, I need to use mfw_isink in order to achieve that, but when test the mfw_isink, we found that the screen is flashing, attached with the video for your reference. It is like when updating the video, the framebuffer fb0, which is running ubuntu desktop, is being accessed as well. but when try to play the video with mfw_v4lsink, the flashing is not happened, but since mfw_v4lsink doesn't support multi video output on different screen, we have to use mfw_isink.

         I am using the ubuntu image comes with the mx53qsb board, the release version is L2.6.3.5_1109, I am using the following command to play the video:

                    gst-launch playbin2 uri=file:///tmp/bunny.m4v video-sink='mfw_isink display=LVDS   disp-width=240 disp-height=240 axis-top=400 axis-left=0 display-1=VGA disp-width-1=240 disp-height-1=240 axis-top-1=400 axis-left-1=0 '   

        Does any body have the idea why the screen is flashing? and how to fix that? Thanks in advance.

Patrick

Labels (3)
0 Kudos
1 Solution
1,819 Views
LeonardoSandova
Specialist I

Hi Patrick,

can you try using the  mfw_v4lsink element? Some iMX6 GST pipelines examples can be found here.

GStreamer iMX6 Dual-Display

Adapt your pipelines according to the Linux Multimedia  Framework User Guide please.

View solution in original post

0 Kudos
11 Replies
1,819 Views
PatrickChau
Contributor II

Hi All:

       By setting the file /usr/share/vssconfig as below:

          [LVDS]

          type = framebuffer

          format = RGBP

          fb_num = 1

          vs_max = 4

          [VGA]

          type = framebuffer

          format = RGBP

          fb_num = 2

          main_fb_num = 0

          vs_max = 4

     and "export VSALPHA=1" the VGA is not flashing, but the LVDS still flashing, attached with the captured video for your reference, any one have the idea about what is wrong?

        Thanks in advance!

Patrick

0 Kudos
1,820 Views
LeonardoSandova
Specialist I

Hi Patrick,

can you try using the  mfw_v4lsink element? Some iMX6 GST pipelines examples can be found here.

GStreamer iMX6 Dual-Display

Adapt your pipelines according to the Linux Multimedia  Framework User Guide please.

0 Kudos
1,819 Views
PatrickChau
Contributor II

Hi Leonardo:

          Thx for your reply!

          I tried your suggestion with the following setting:

          Boot arguments to configure HDMI & LVDS:

          console=ttymxc0,115200 video=mxcdi0fb:RGB24,1024x768M@60 hdmi di0_primary video=mxcdi1fb:RGB24,XGA ldb=di1 root=/dev/sda1 rootwait rw system_rev=0x53300 gpu_nommu

          Commands to run:

               # gst-launch playbin2 uri=file:///usr/local/info2/config/schedule/video/blomberg_r0_crop.avi video-sink="mfw_v4lsink device=/dev/video17" &

               # gst-launch playbin2 uri=file:///usr/local/info2/config/schedule/video/blomberg_r0_crop.avi video-sink="mfw_v4lsink device=/dev/video19"

          The two videos can  be played, but they are in HDMI screen only, nothing is shown on LVDS screen, they are overlay to each other, so the screen is like keep swapping between the two video.

          Indeed, I don't have video17 & video19, only video16:

          # root@cwmx535:~# ls /dev/video* -al                                                                                                                                              

          crw-rw----    1 root     video      81,   0 Dec 18 03:29 /dev/video16

Patrick

0 Kudos
1,819 Views
lily_zhang
NXP Employee
NXP Employee

Hope the following information is helpful to you.

mfw_isink plugin for gstreamer is a IPU lib based sink element which provides multi-overlay support of video playback. It means several video playback can run the same time on the same display device or different one, eg. DVI and/or TV and DVI and/or WVGA* , each video can setting the display windows size and position. Currently, mfw_isink plugin is only available on i.MX51 and i.MX53 platform.

NOTE

Default setting for mfw_isink is DVI and TV, if you want use DVI and WVGA please replace vssconfig with vssconfig.div_wvga under /usr/share directory.

Each mfw_isink supports 2 configs for the same input video. It can also construct more gstreamer pipelines with mfw_isink to support different video playback contents.

In multi-overlay case, the video maybe not be smoothly due to performance limitation. Generally, i.MX51/ i.MX53 can support 2-way D1 resolution video playback smoothly.

How to use mfw_isink

As a standard gstreamer plugin, gst-launch tool and gstreamer-based application (like totem) can use mfw_isink as video sink element.

Since mfw_isink need access IPU and framebuffer devices, please use as root user or run following command in a terminal window to change corresponding device permission. chmod 666 /dev/mxc_ipu /dev/fb0 /dev/fb1 /dev/fb2 /sys/class/graphics/fb1/mode /sys/class/graphics/fb1/pan /sys/class/graphics/fb2/pan

mfw_isink default use fb2 as display frame buffer on LCD. Since fb2 is default invisible, Please run following command in a terminal window to enable mfw_isink local alpha feature when use mfw_isink with gst-launch "export VSALPHA=1"

A.1.1 gst-launch

The following command illustrates a complete pipe to playback an avi file by mfw_isink as a video sink element with advanced property settings. It will playback video on LCD and video position start at (100, 100) with window size 640x480. gst-launch filesrc location=test.avi typefind=true ! aiurdemux ! mfw_vpudecoder ! mfw_isink axis-top=100 axis-left=100 disp-width=640 disp-height=480

or gst-launch playbin2 uri=file:///test.avi video-sink=”mfw_isink axis-top=100 axis-left=100 disp-width=640 disp-height=480”

mfw_isink also support other properties for display settings. Please use gst-inspect mfw_isink

to get detail support property list

Following are the detailed information of some of the properties

display: set display device(name) for config 0 (Setting for DVI and TV case is “DVI” or “TV”, please refer vssconfig file under /usr/share for detail output device name).

axis-top: y position for top-left corner of video window in pixel for config 0

axis-left: x position for top-left corner of video window in pixel for config 0

disp-width: width of display window in pixel for config 0

disp-height: height of display window in pixel for config 0

mode: display mode for config 0(available value please refer “mode” section in vssconfig file under /usr/share)

display-1: set display device(name) for config 1 (Setting for DVI and TV case is “DVI” or “TV”, please refer vssconfig file under /usr/share for detail output device name).

axis-top-1: y position for top-left corner of video window in pixel for config 1

axis-left-1: x position for top-left corner of video window in pixel for config 1

disp-width-1: width of display window in pixel for config 1

disp-height-1: height of display window in pixel for config 1

mode-1: display mode for config 1(available value please refer “mode” section in vssconfig file under /usr/share)

Run the several gst-launch command with mfw_isink will show several videos.

Following command illustrate some cases

Playback one video in same display, PIP gst-launch playbin2 uri=file:///1.avi video-sink=”mfw_isink display=DVI display-1=DVI axis-top=100 axis-left=100 disp-width=640 disp-height=480”

Playback two videos in two displays gst-launch playbin2 uri=file:///1.avi video-sink=”mfw_isink display=DVI” playbin2 uri=file:///2.avi video-sink=”mfw_isink display=TV”

0 Kudos
1,819 Views
PatrickChau
Contributor II

Hi XiaoLi:

        Thx for your information, But it still can't resolve my problem.

          I am wondering it is impossible to do that, it is only working when both videos are full scree, but that is not what we want, we want both videos are only shown on part of the screen on both displays, and the other area will be used to display other information. I check the value of fsl_disp_property:

          root@mx535:~# cat /sys/class/graphics/fb0/fsl_disp_property

          2-layer-fb-bg

          root@mx535:~# cat /sys/class/graphics/fb1/fsl_disp_property

          1-layer-fb

          root@mx535:~# cat /sys/class/graphics/fb2/fsl_disp_property

          2-layer-fb-fg

        display 1 is using 2 fb devices, fb2 is on top of fb0, but the second display is only using 1 fb layer, when video playback on second display and some other program is displaying something at the same time, both processes will try to write data, this will cause the flashing. I am not sure whether that is the case, but it is what I seen so far.

         I made the service request few months ago, but haven't got the reply yet.

Patrick

0 Kudos
1,819 Views
lily_zhang
NXP Employee
NXP Employee

Hello, Patrick:

I don't think your case was supported by default. I am taking holiday and will be back on Feb 17th.

I will consult internal team and see whether we can give some advices.

Sent from my iPad

0 Kudos
1,819 Views
PatrickChau
Contributor II

Hi XiaoLi:

        Thx for your reply & help. Enjoy your Chinese New Year.

Patrick

0 Kudos
1,819 Views
lily_zhang
NXP Employee
NXP Employee

if there's only 1 fb in the second display, you need special program to mix the video and informantion and then try to pan to display.

0 Kudos
1,819 Views
PatrickChau
Contributor II

Hi Xiaoli:

          Is that the answer for internal team? Would you pls confirm?

Thx

Patrick

0 Kudos
1,818 Views
lily_zhang
NXP Employee
NXP Employee

This is the answer for all.

Best Regards

Lily Zhang

Freescale MPU Support

0 Kudos
1,818 Views
PatrickChau
Contributor II

Hi XiaoLi:

        OK, thanks for your help!

Patrick

0 Kudos