Decoding 2 channels of 1080p videos the same time on i.MX6 SDB

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Decoding 2 channels of 1080p videos the same time on i.MX6 SDB

跳至解决方案
4,053 次查看
vincentchou
Contributor IV

Hi!  We would like to set up a demonstration based on i.MX6 SDB.  In addition to the HDMI output, we would like to output a second channel of 1080p video to a different video output channel.  In addition, the Linux OS needs to decode two 1080p for two different video output channels with the VPU in i.MX6.  Has anyone had any idea upon how to do it?  Your suggestion is greatly appreciated!

Vincent

1 解答
2,051 次查看
daiane_angolini
NXP Employee
NXP Employee

Vincent Chou wrote:

Sorry to cause your confusion.  I assume there is a possibility to switch frame buffer in order to switch HD1080p video without delay.

No problem. I think you can switch framebuffer, but I have never tested and I don´t think it will work "on the fly" and "out of box". I mean I´m not sure if you will be able to swicth framebuffer during the playback and I think you will need to make some changes in the source code.

  In fact, we even think it may be possible to shrink the original 1080p video into a window with a smaller size when the second 1080p video is played on the main window.  This is a scenario for a digital signage and we plan to propose such a digital signage box based on i.MX6 to my customer.  The first technical requirement is seamless switching HD video.

Do you mean, like a PiP?

Anyway, I shall try to send one HD video to HDMI output and the other HD video to a virtual display and then try to switch the frame buffer for these two streams.  By the way, do you know any command I could use to send an HD stream to a virtual display from gst-launch?

I would use fake sink

在原帖中查看解决方案

0 项奖励
回复
12 回复数
2,051 次查看
johnturnur
Contributor III

Hi,

I want to do two 1080p  video playback and display it on two different screen. I want to do it on Android.

What modification i have to do in fsl imx-android-13.4.1.

Is there any alternative soltion without gStreamer?

Thanks,

John

0 项奖励
回复
2,051 次查看
daiane_angolini
NXP Employee
NXP Employee

Do you want 2 displays or 4 displays?

One of then must be HDMI, what would be the second?

0 项奖励
回复
2,051 次查看
vincentchou
Contributor IV

We would like to use HDMI as the first channel and LVDS output as the second channel.  Is that possible?

Vincent

0 项奖励
回复
2,051 次查看
daiane_angolini
NXP Employee
NXP Employee

Yes, it is possible.

Do you need to change your kernel command line, in order to enable dual display (please, take a look in release notes)

And you will need to configure your gstreamer command line in order to let it know where to display.

Please, take a look on

GStreamer iMX6 Dual-Display

Message was edited by: Daiane Angolini And please, let me know the result.

0 项奖励
回复
2,051 次查看
vincentchou
Contributor IV

I did an experiment to play two 1080p mp4 on the same HDMI output with reduced size.  For some videos, it works, for other, it does not.  I figure there is a computation power issue.  Is it possible for us to use gst-launch command option to change the decoding frame rate?  I guess this will save some computation power on decoding. 

0 项奖励
回复
2,051 次查看
daiane_angolini
NXP Employee
NXP Employee

sure, at least you can use videorate. But, if you decode the 1080p with a different resolution, you still need to resize.

What are your real goal?

Are your imx6 solo, duo or quad?

0 项奖励
回复
2,051 次查看
vincentchou
Contributor IV

I am evaluating the possibility to use imx6 as the cpu for a digital signage box.  The end product needs to switch two HD1080p video seamlessly.  In that case, I need to have the capability to decode two HD1080p stream with two frame buffer.  The next I need to test is to switch the output of HDMI from one frame buffer to the second one without any time delay. 

However, I suspect my logic to test on the iMX6SDB is wrong.  Do you have any suggestion?  My customer's criteria is to see no time lag on the HDMI output when switching video files. 

0 项奖励
回复
2,051 次查看
daiane_angolini
NXP Employee
NXP Employee

Well, I get confused because you said you want 2 1080p output at once, and you was testing 2 1080p/2 output at once.

I´m not sure you have a board with 2 HDMI connector. I believe it would be the perfect environment to your test. But you can test 2 1080p output at once using one HDMI and any other output (please, let me know what would be your available outputs).

imx6q can decode 2 1080p at once, and I think you can determinate 2 different framerates. But, I haven´t tested the frame buffer swapping, so I´m not sure home many time it will take. And I would say you to test it, and determinate what would be a reasonable time. Then enter a SR asking for improving this time.

It´s a non tested "feature", so I would say it may be improved depending on the usecase.

But, first things first, we need to see 2 movies being played at the same time, with different frame rates.

So, please, share:

1- what output you will work with

2- what is the kernel command line for those output

3- what is the movie codec. Is it audio+video or video only

4- what is the gstreamer command line for each video

0 项奖励
回复
2,051 次查看
vincentchou
Contributor IV

Sorry to cause your confusion.  I assume there is a possibility to switch frame buffer in order to switch HD1080p video without delay.  In fact, we even think it may be possible to shrink the original 1080p video into a window with a smaller size when the second 1080p video is played on the main window.  This is a scenario for a digital signage and we plan to propose such a digital signage box based on i.MX6 to my customer.  The first technical requirement is seamless switching HD video.

Anyway, I shall try to send one HD video to HDMI output and the other HD video to a virtual display and then try to switch the frame buffer for these two streams.  By the way, do you know any command I could use to send an HD stream to a virtual display from gst-launch?

0 项奖励
回复
2,052 次查看
daiane_angolini
NXP Employee
NXP Employee

Vincent Chou wrote:

Sorry to cause your confusion.  I assume there is a possibility to switch frame buffer in order to switch HD1080p video without delay.

No problem. I think you can switch framebuffer, but I have never tested and I don´t think it will work "on the fly" and "out of box". I mean I´m not sure if you will be able to swicth framebuffer during the playback and I think you will need to make some changes in the source code.

  In fact, we even think it may be possible to shrink the original 1080p video into a window with a smaller size when the second 1080p video is played on the main window.  This is a scenario for a digital signage and we plan to propose such a digital signage box based on i.MX6 to my customer.  The first technical requirement is seamless switching HD video.

Do you mean, like a PiP?

Anyway, I shall try to send one HD video to HDMI output and the other HD video to a virtual display and then try to switch the frame buffer for these two streams.  By the way, do you know any command I could use to send an HD stream to a virtual display from gst-launch?

I would use fake sink

0 项奖励
回复
2,051 次查看
EricNelson
Senior Contributor II

I just ran across this post. I wish there was a subscribe to "all things i.MX6" feature on i.MX Community,

because we did this a while back:

     http://boundarydevices.com/playing-multiple-hd-videos-on-i-mx6/

That post shows three video windows on a single display using mfw_isink and multiple processes.

You can also use the "tee" element and output to multiple displays using mfw_v4lsink

and specifying the "device". This example will display the video portion on two displays,

though I'm not sure how to route the audio in this example.

     gst-launch filesrc location=kungfu.flv \

          ! 'video/quicktime' \

          ! aiurdemux name=demux demux. \

          ! queue max-size-buffers=0 max-size-time=0 \

          ! vpudec ! tee name=both \

               ! queue ! mfw_v4lsink device=/dev/video17 both. \

               ! queue ! mfw_v4lsink device=/dev/video19

2,051 次查看
vincentchou
Contributor IV

Thanks!  When we get the board back from the customer, we shall try your suggestion!  Thanks a lo!

Vincent

0 项奖励
回复