NV12 video format to v4l2h264enc in gstreamer

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

NV12 video format to v4l2h264enc in gstreamer

2,132 Views
yibhan
Contributor III

Hi NXP,

I have custom board embeded in Imx8qxp and main purpose is camera streaming is connected to other site with network, So, I have to bring camera stream video format to v4l2h264enc with gstreamer and below is my flow:

capture camera YUYV(1920x1080) -> conversion to NV12 using G2D blitter -> feed to v4l2h264enc

but If i am trying to the above scheme, gstreamer occur negitiation error: doesn't seem to support  input video format to V4l2h264enc, so, If i have added "videoconvert" plug before v4l2h264enc, it works, but performance is bad.

When I am using g2d blitter, g2d blitter doesn't make any error, but i am not sure how to operate them in g2d.

camera resolution is 1920x1080 and YUYV, total size is 4147200, but after g2d conversion of YUYV to NV12, total size is 3112960, I think original size of NV12 for this case 3110400 and g2d has added some bytes for it, but i don't know which of bytes are added.

I am using Gstreamer 1.18.

My Questions are

: Why have to need "videoconvert" before v4l2h264enc ? : camera strream has been changed to NV12 video format

: With raw NV12 data streame, Can I get video stream type? because of gstreamer negotiation failure.

: Have Gstreamer 1.8 some of known issues about v4l2h264enc or videoconvert?

I hope you have concerned about my case and give some advices.

Thanks,

0 Kudos
4 Replies

1,548 Views
jiada
Contributor III

@yibhan 

could you let us know, which modifications you have done to add gstreamer caps to v4l2h264enc?

so that video format conversion can be avoided between Camera NV12 stream and v4l2h264enc?

 

thanks,

Jiada

0 Kudos

2,106 Views
joanxie
NXP TechSupport
NXP TechSupport

you can use "gst-inspect-1.0 v4l2h264enc" to check, it seems that v4l2h264enc only accept NV12, so you need convert it, maybe you can try v4l2convert again

 

0 Kudos

2,104 Views
yibhan
Contributor III

Hi NXP,

It's cause is gstreamer caps, So, I added caps making v4l2h264enc without video format conversion.

 

0 Kudos

1,976 Views
odd_bikes
Contributor III

Hi @yibhan 

Would you be able to post the resulting pipeline please? I'm having similar issues.

0 Kudos