Overlay & Video encoding problem in i.MX53

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

Overlay & Video encoding problem in i.MX53

Jump to solution
1,202 Views
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.

Tags (4)
0 Kudos
1 Solution
751 Views
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>

View solution in original post

0 Kudos
5 Replies
751 Views
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 Kudos
752 Views
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 Kudos
751 Views
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 Kudos
751 Views
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 Kudos
751 Views
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 Kudos