AnsweredAssumed Answered

Can 'vpuenc' support UYVY(YUV422) input?

Question asked by Robbie Jiang on Mar 3, 2015
Latest reply on Mar 18, 2015 by Joan Xie

Hi,

 

I'm trying to stream video from a CSI camera on MX6Q/Linux platform,

using the following pipeline:

gst-launch -v tvsrc  device=/dev/video0 ! 'video/x-raw-yuv,format=(fourcc)UYVY,width=1920,height=1080,framerate=25/1' ! vpuenc codec=avc ! video/x-h264,width=1920,height=1080 ! rtph264pay ! udpsink host=192.168.0.68 port=5434 sync=false async=false

 

But the pipeline failed to work.

 

Note my camera output is 1920x1080@25fps UYVY format.

 

According to tvsrc element source code,

tvsrc on MX6 platform fix its source pad caps to NV12,

but I can make it support UYVY after modifying source code and rebuilding.

 

However, it seems that vpuenc element can NOT support UYVY input format.

Following is the output of 'gst-inspect vpuenc':

 

Pad Templates:

  SRC template: 'src'

    Availability: Always

    Capabilities:

      video/mpeg

            mpegversion: 4

      video/x-h263

      video/x-h264

      image/jpeg

 

  SINK template: 'sink'

    Availability: Always

    Capabilities:

      video/x-raw-yuv

                 format: TNVP

      video/x-raw-yuv

                 format: NV12

      video/x-raw-yuv

                 format: I420

....

 

Seems that 'vpuenc' only supports TNVP, NV12 and I420 input on its sink pad.

 

Is it possible to make vpuenc to support UYVY input format?

 

I note there is 'mfw_ipucsc' element which can output format accepted by vpuenc.

However,  'gst-inspect mfw_ipuscs' shows that 'mfw_ipucsc' still can not support UYVY on its sink pad:

Pad Templates:

  SINK template: 'sink'

    Availability: Always

    Capabilities:

      video/x-raw-yuv

                 format: NV12

                  width: [ 1, 2147483647 ]

                 height: [ 1, 2147483647 ]

              framerate: [ 0/1, 2147483647/1 ]

      video/x-raw-yuv

                 format: I420

                  width: [ 1, 2147483647 ]

                 height: [ 1, 2147483647 ]

              framerate: [ 0/1, 2147483647/1 ]

      video/x-raw-yuv

                 format: UYUV

                  width: [ 1, 2147483647 ]

                 height: [ 1, 2147483647 ]

              framerate: [ 0/1, 2147483647/1 ]

      video/x-raw-rgb

                    bpp: 16

                  depth: 16

             endianness: 1234

               red_mask: 63488

             green_mask: 2016

              blue_mask: 31

                  width: [ 1, 2147483647 ]

                 height: [ 1, 2147483647 ]

              framerate: [ 0/1, 2147483647/1 ]

 

...

 

Any idea on how to stream the UYVY camera output with gstreamer?

 

Regards,

Robbie

Outcomes