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.

Linux/AM5728: File to file H.264 encode and YUYV to NV12

Part Number: AM5728

Tool/software: Linux

(1)when i want to use gstreamer pipeline to encode the H.264 stream,it can execution succeed。but the compiled stream is problematic。

the pipeline :

gst-launch-1.0 filesrc location=waterfall-352-288-nv12-inp.yuv ! videoparse width=352 height=288 format=nv12 ! ducatih264enc ! filesink location=waterfall-352-288-nv12-inp_gst.h264

(2)VPE by default convert the video to NV12 format. Kmssink only supports NV12 video format。It means to say i must Color space conversion (YUY2->NV12)??because I capture the video use the Usb Camera
the format only support YUYV。
(3)TI provide the gst-plugin,it only support the vip input。can I get the gst-plugin source code? I want to capture the video use the usb input
  • The video experts have been notified. They will respond here.
  • Hello,

    user4594142 said:
    (2)VPE by default convert the video to NV12 format. Kmssink only supports NV12 video format。It means to say i must Color space conversion (YUY2->NV12)??because I capture the video use the Usb Camera
    the format only support YUYV。

    Yes, you must use vpe for CSC for yuy2->nv12 conversion.

    Please check this guide:

    http://processors.wiki.ti.com/index.php/Processor_Training:_Multimedia

    There are examples for CSC by VPE. In chapter Capabilities of IVA-HD, VPE, DSP, and ARM you could find more information regarding gst-vpe.

    user4594142 said:
    can I get the gst-plugin source code

    You could check this guide regarding sources:

    http://processors.wiki.ti.com/index.php/Processor_SDK_Building_The_SDK

    BR
    Margarita

  • I have to install the SDK-am57xx-evm,now I use the usb3.0 to capture the YUYV video,I want to know how to use the VPE(video process engine) in the C/C++ code ? In the SDK example-application directory,I can't find the related source code。can you give me a simple C/C++ demo about the YUYV->save the yuv file->-H.264 Encode(VPE)->LCD display ,or the GStreamer Command Line source code 。

    The realization of function such as:gst-launch-1.0 -e v4l2src device=/dev/video2 num-buffers=1000 io-mode=4 ! 'video/x-raw, \
    format=(string)YUY2, width=(int)1280, height=(int)720, framerate=(fraction)30/1' ! vpe num-input-buffers=8 ! tee name=t ! \
    queue ! ducatih264enc bitrate=4000 ! queue ! h264parse ! qtmux ! filesink location=x.h264 t. ! queue ! kmssink
  • Hello,

    Please check  the guide in my previous post. As I said there is an CSC example which is uses vpe.

    For low level vpe driver you could check here:

    http://processors.wiki.ti.com/index.php/Linux_Core_VPE_User's_Guide

    user4594142 said:
    can't find the related source code。can you give me a simple C/C++ demo about the YUYV->save the yuv file->-H.264 Encode(VPE)->LCD display

    Are you mean gstreamer application? If yes please refer to this tutorials :

    BR
    Margarita

  • Hello,

    user4594142 said:
    gst-launch-1.0 -e v4l2src device=/dev/video2 num-buffers=1000 io-mode=4 ! 'video/x-raw, \
    format=(string)YUY2, width=(int)1280, height=(int)720, framerate=(fraction)30/1' ! vpe num-input-buffers=8 ! tee name=t ! \
    queue ! ducatih264enc bitrate=4000 ! queue ! h264parse ! qtmux ! filesink location=x.h264 t. ! queue ! kmssink

    You could also set the caps filter after vpe element.

    Something like:

    .....! 'video/x-raw, format=(string)YUY2, width=(int)1280, height=(int)720, framerate=(fraction)30/1' ! vpe num-input-buffers=8 !  'video/x-raw, format=(string)NV12, width=(int)1280, height=(int)720' ! .......

    BR
    Margarita

  • Hello,

    Previous description may have errors,not necessarily needed the VPE module to deal with the stream 。In fact ,I want know how to use the IVA-HD subsystem to encode the YUYV ->H.264,so I also need a user guider like Linux_Core_VPE_User's_Guide,or a simple C/C++ demo,can I get it?
  • Hello,

    I am sorry I can not understand your question completely.

    TI h264 encoder expects the input to be in NV12 format. Please refer to h264 encoder user guide (H264_Encoder_HDVICP2_UserGuide.pdf).

    BR
    Margarita