This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TIVidenc1 and UYVY format

Hello everyone,

 I am using our custom DM368 evolution module with DVSDK 4.02.  With the pipeline below,

i can get the camera output succesfully:

gst-launch v4l2src always-copy=FALSE input-src=composite ! 'video/x-raw-yuv, width=(int)720, height=(int)576,\

format=(fourcc)UYVY, framerate=(fraction)25/1' ! queue ! tidisplaysink2 video-standard=NTSC display-output=composite 

But when i want to encode the stream, with h264, this pipeline doesn't work:

gst-launch v4l2src always-copy=FALSE input-src=composite num-buffers=500 ! 'video/x-raw-yuv, width=(int)720, \

height=(int)576, format=(fourcc)UYVY' ! TIVidenc1 codecName=h264enc engineName=codecServer \

contiguousInputFrame=TRUE ! rtph264pay pt=96 ! udpsink port=5500 host=192.168.1.255

The output of the pipeline is:

......

Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)UYVY, framerate=(fraction)30000/1001, width=(int)720, height=(int)576
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw-yuv, format=(fourcc)UYVY, framerate=(fraction)30000/1001, width=(int)720, height=(int)576
/GstPipeline:pipeline0/GstTIVidenc1:tividenc10.GstPad:sink: caps = video/x-raw-yuv, format=(fourcc)UYVY, framerate=(fraction)30000/1001, width=(int)720, height=(int)576
ERROR: from element /GstPipeline:pipeline0/GstTIVidenc1:tividenc10: failed to create video encoder: h264enc

Additional debug info:
gsttividenc1.c(1272): gst_tividenc1_codec_start (): /GstPipeline:pipeline0/GstTIVidenc1:tividenc10
Execution ended after 61934917 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
/GstPipeline:pipeline0/GstTIVidenc1:tividenc10.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = NULL
Setting pipeline to NULL ...
Freeing pipeline ...
i think this is because color format used (UYVY). Because it seems to work with format=(fourcc)NV12,
 but client side receives corrupted video.   Isn't there support for UYVY color format in TIVidenc1?


Thank you very much
Ayhan Yuksel
www.sste.com.tr




  • Hi, Ayhan

      I've the same question to you. according to this document, http://processors.wiki.ti.com/index.php/GstTIPlugin_Elements#TIVidenc1, TIVidenc1 should support UYVY, but I never succeed with it. 

    TIVidenc1

    Used for encoding XDM 1.x video

    Depending the codecs used, the element will outputs data in MPEG-2, MPEG-4, H.264 formats.

    Pad Elements

    • UYVY
     YUV422 interleaved corresponding to V4L2_PIX_FMT_UYVY in v4l2 standard.
  • yixin, i found my own answer months ago, i cold not able to use UVYV but if i use NV12 with following caps (my video size is 720x576):

    video/x-raw-yuv, format=\(fourcc\)NV12, height=576, width=736

    the remote side can get video without problem. I think UVYV is not an option for encoder. My final pipeline is:

    gst-launch v4l2src always-copy=FALSE input-src=composite ! video/x-raw-yuv, format=\(fourcc\)NV12, height=576, width=736 ! TIVidenc1 codecName=h264enc engineName=codecServer contiguousInputFrame=TRUE ! rtph264pay pt=96 ! udpsink port=5500 host=192.168.1.255

    Best regards

    Ayhan Yuksel

  • Hi, Ayhan

      Thanks. Yes, I can use NV12 for TIVidenc1 also. But my real problem is, I want capture picture when doing live streaming. So, if I use NV12 for h.264 encoder, it need another resizer to convert NV12 to UYVY for the jpeg encoder, that is TIImgenc1。 I've tried many times, but failed to make the two encoder running concurrently.