Overlay & Video encoding problem in i.MX53

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Overlay & Video encoding problem in i.MX53

ソリューションへジャンプ
2,472件の閲覧回数
nandkishorbirad
Contributor I

Hi all,

     I am working on a project which involves,

          1. Capture the video from the camera in a I420 (YUV 4:2:0 interlaced) format.

          2. De-interlace the video & overlay it.

          3. Display the output video.

          4. Simultaneously encode it in H.264 format & save it in a file.

I am able to achieve the first three points, by modifying the "mxc_ipudev_test, to capture the video from the camera.

The input buffer & output buffer is allocated internally by IPU V3 lib. Output format is RGBP.

Now I want to encode the video simultaneously. I have some queries,
1. How to convert the RGBP to YUV 420 format? As VPU supports YUV 4:2:0 format.
2. What is the efficient method to pass the frame from IPU to VPU?

Kishore.

タグ(4)
0 件の賞賛
返信
1 解決策
2,021件の閲覧回数
LeonardoSandova
Specialist I

Hi,

the 'tee' gstreamer element may help but the performance wont be good (copies are done on heap) but worth giving it a try. The pipeline would look like

gst-launch mfw_v4lsrc ! tee name=t ! \

     queue ! <all the elements doing the overlay and display> t. ! \

     queue ! <all the elements doing the encode and store>

元の投稿で解決策を見る

0 件の賞賛
返信
5 返答(返信)
2,021件の閲覧回数
YixingKong
Senior Contributor IV

Nandkishor

Had your issue got resolved? If yes, we are going to close the discussion in 3 days. If you still need help, please feel free to reply with an update to this discussion.

Thanks,

Yixing

0 件の賞賛
返信
2,022件の閲覧回数
LeonardoSandova
Specialist I

Hi,

the 'tee' gstreamer element may help but the performance wont be good (copies are done on heap) but worth giving it a try. The pipeline would look like

gst-launch mfw_v4lsrc ! tee name=t ! \

     queue ! <all the elements doing the overlay and display> t. ! \

     queue ! <all the elements doing the encode and store>

0 件の賞賛
返信
2,021件の閲覧回数
rogerio_silva
NXP Employee
NXP Employee

Hi,

I would suggest you to use the V4L2 API instead IPU LIB. The IPU lib is more suitable to work with still images while V4L2 works with video.

The V4L2 also uses IPU to accomplish its tasks, so some procedures will be made by hardware.

You can take a look at "mxc_vpu_test.out" unit test. It has options to capture, display, encode and transcode videos.

Rgds

Rogerio

0 件の賞賛
返信
2,021件の閲覧回数
nandkishorbirad
Contributor I

Hi Rogerio,

What is the command line options to simultaneously display & encode the camera feed in "mxc_vpu_output".

Regards,

Nandkishor.

0 件の賞賛
返信
2,021件の閲覧回数
rogerio_silva
NXP Employee
NXP Employee

Hi nandkishorbiradar,

I made some tests on mxc_vpu_output and seems that it's not ready to encode and display at the same time.

You can also do it using gstreamer using the "preview" property of mfw_v4lsrc plugin to display the captured image while encoding.

There are some examples on the following thread:

https://community.freescale.com/message/292568#292568

Rgds

Rogerio

0 件の賞賛
返信