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/AM5708: H.264 Encoding for USB Camera in AM57xx Board

Part Number: AM5708
Other Parts Discussed in Thread: AM5728

Tool/software: Linux


Dear All,

We have one Development kit in which we are using AM5708 & AM5728 Soc. We are using "processor-SDK-02.00.01.07" SDK with Yocto Build System.

We need to use H.264 Compression on /dev/video1 (USB Webcam) Video. We download the source code from below link but we need support For Compiling and Testing on Board.

https://git.ti.com/ivimm/ipumm/trees/master/extrel/ti/ivahd_codecs/packages/ti/sdo/codecs

Please provide us the support for both compiling and testing quickly.

Thanks & Best Regards,

Nikunj Patel

  • Hello,

    You could build  the IPUMM firmware with this command:

    ...

    MACHINE=am57xx-evm bitbake ipumm-fw

    Here is the Multimedia guide:

    processors.wiki.ti.com/.../Processor_Training:_Multimedia

    Hope this helps.

    Best Regards,

    Margarita

  • Dear Margarita,

    I tried with your command but it provide the below error(Also attached image) so can you please help us for the same.

    ERROR: Nothing PROVIDES 'ti-ccsv6-native' (but /home/nikunj.patel.369/workspace/bt656/tisdk/sources/meta-ti/recipes-bsp/ipumm-fw/ipumm-fw_git.bb DEPENDS on or otherwise requires it). Close matches:
      ti-cgt6x-native
      ti-llvm3.6-native
      util-macros-native
    ERROR: Required build target 'ipumm-fw' has no buildable providers.
    Missing or unbuildable dependency chain was: ['ipumm-fw', 'ti-ccsv6-native']

    Thanks & Best Regards,

    Nikunj Patel

  • Hello,

    PSDK 2.x is very old.

    But in this case you must follow this guide:

    http://processors.wiki.ti.com/index.php?title=Processor_SDK_Building_The_SDK&oldid=212096 

    But you could use 

    MACHINE=am57xx-evm bitbake ipumm-fw

    instead of

    MACHINE=am57xx-evm bitbake arago-core-tisdk-image

    In the link in my previous post there is a chapter "Rebuild IPUMM firmaware"  also but I would recommend to use 

    MACHINE=am57xx-evm bitbake ipumm-fw

    In fact, this firmware is already included in psdk. No need to build it. If you already have installed PSDK on sd card for example you could test pipeline like:

    gst-launch-1.0 videotestsrc num-buffers=1000 ! 'video/x-raw,format=(string)NV12,width=1280,height=720,framerate=(fraction)30/1' ! ducatih264enc ! queue ! h264parse  ! qtmux ! filesink location=test.mov

    One more note about USB capture please check this thread;

    https://e2e.ti.com/support/processors/f/791/t/523614#pi320966=2 

  • Hello,

    Please if this answers your question click the "This resolved my issue" button.

    Thank you!

    Best Regards,

    Margarita

  • Dear Margarita,

    Still, I am checking this issue and I am not the success due to building error.

    I will update post after resolve my issue.

    Thanks

  • Dear Margarita,

    I have ported the SDK 4 on my board and run below command but still, a am facing the below error.

    root@am57xx-evm:~# gst-launch-1.0 v4l2src device=/dev/video1 num-buffers=1000 io-mode=4 ! 'video/x-raw, format=(string)YUY2, width=(int)1280, height=(int)720' ! queue !  vpe ! queue ! kmssink                                       
    Setting pipeline to PAUSED ...
    A pipeline is live and does not need PREROLL ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error.
    Additional debug info:
    ../../../../gstreamer-1.8.3/libs/gst/base/gstbasesrc.c(2948): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
    streaming task paused, reason not-negotiated (-4)
    Execution ended after 0:00:00.009048658
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    Setting pipeline to NULL ...
    Freeing pipeline ...

    Please help us to solve the issue.

    Thanks & Best Regards,

    Nikunj Patel

  • Hello,

    v4l2src0:streaming task paused, reason not-negotiated (-4)

    From gstreamer point of view streaming task paused, reason not-negotiated (-4) most of the cases means the video format  you get from your video source (v4l2src) is not compatible with the sink. Please check the capsfilter 

    'video/x-raw, format=(string)YUY2, width=(int)1280, height=(int)720'


    is the resolution or format or both match with what video source provides. 

    Hope this helps.

    BR
    Margarita

  • Dear Margarita,

    Thanks for a quick reply.

    I am using vivid driver for my testing which support 640 x 480 reolution.

    still i am facing below issue.

    root@am57xx-evm:/mnt# gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=1000 io-mode=4 ! 'video/x-raw, format=(string)YUYV, width=(int)640, height=(int)480' ! queue !  vpe ! kmssink     
    WARNING: erroneous pipeline: could not link v4l2src0 to queue0


    Thanks & Best Regards,

    Nikunj Patel

  • Hello,

    could not link v4l2src0 to queue0


    I guess v4l2src's src can not be linked to queue's sink because of capsfilter(they do not match).

    Try:

    gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=1000 io-mode=4 ! 'video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480' ! queue ! vpe num-input-buffers=8 ! kmssink

    Make sure you have applied the patch in my first answer. Please refer the below thread also:

    e2e.ti.com/.../668287

    Hope this helps.

    BR
    Margarita

  • Dear Margarita,

    root@am57xx-evm:~# gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=1000 io-mode=4 ! 'video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480' ! queue ! vpe num-input-buffers=8 ! kmssink
    Setting pipeline to PAUSED ...
    Pipeline is live and does not need PREROLL ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    Got EOS from element "pipeline0".
    Execution ended after 0:00:25.005795809
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    Setting pipeline to NULL ...
    Freeing pipeline ...

    I got above Debug log but still did not get any file.

    I am doing the test on Vivid Driver.

    Thanks & Best Regards,

    Nikunj Patel

  • Hello,

    What file? This pipeline is working as I see : Execution ended after 0:00:25.005795809

    If you want to encode and save in file you must use pipeline like this one :

    gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=1000 io-mode=4 ! 'video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480' ! queue ! vpe num-input-buffers=8 !  'video/x-raw,format=(string)NV12,width=1280,height=720' ! ducatih264enc ! queue ! h264parse  ! qtmux ! filesink location=test.mov

    Best Regards,

    Margarita

  • Dear Margarita,


    sorry, by mistake this button is clicked but still, I am facing below error.

    root@am57xx-evm:~#gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=1000 io-mode=4 ! 'video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480' ! queue ! vpe num-input-buffers=8 !  'video/x-raw,format=(string)NV12,width=640,height=480' ! ducatih264enc ! queue ! h264parse  ! qtmux ! filesink location=test.mov

    Setting pipeline to PAUSED ...
    MmRpc_create: Error: open failed, name=/dev/rpmsg-dce
    ERROR: Pipeline doesn't want to pause.
    ERROR: from element /GstPipeline:pipeline0/GstDucatiH264Enc:ducatih264enc0: Could not initialize supporting library.
    Additional debug info:
    ../../../../gst-plugins-base-1.8.3/gst-libs/gst/video/gstvideoencoder.c(1541): gst_video_encoder_change_state (): /GstPipeline:pipeline0/GstDucatiH264Enc:ducatih264enc0:
    Failed to start encoder
    ../git/libdce.c:416:    dce_ipc_init    ERROR: Failed eError == DCE_EOK error val -4../git/libdce.c:479:        Engine_open     ERROR: Failed dce_ipc_init(coreIdx) == DCE_EOK error val -4Setting pipeline to NULL ...
    Freeing pipeline ...


    can you please help me to share any document/link related to this  Pipeline document so I can better understand.?

    Thanks & Best Regards,

    Nikunj Patel

  • Hello,

    Please open a new thread about this new error. 

    Thank you!

    Best Regards,

    Margarita