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: error to save encode file of vivid using g streamer.

Part Number: AM5708

Tool/software: Linux

Dear All,

I am trying to below command to save the encoded video of vivid but got an error as below.

gst-launch-1.0 v4l2src device=/dev/video1 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

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 ...


I tested below command and it's working fine.

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)640, height=(int)480' ! queue ! vpe num-input-buffers=8 ! kmssink
Setting pipeline to PAUSED ...
A 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:24.999316471
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

Please help me to solve this issue as soon as possible because I am stuck due to this issue.

  • Hello Nikunj Patel,

    What you are using EVM or custom board?

    Gstreamer point of view the pipeline is fine but the error that you are observing seems like ipu2 firmware is not loaded.

    What is the output of this command:

    ls -l /dev/rpmsg* . This should shows /dev/rpmsg-dce.

    If this does not exist please search for dra7-ipu2.fw.xem4 in /lib/firmware.

    You may refer the below thread:

    https://e2e.ti.com/support/processors/f/791/t/729232 

    Best Regards,

    Margarita

  • Dear Margarita,

    We are using our custom board.

    Please check the output of below command. my board does not have created a link of /dev/rpmsg.  As per your suggestion, I check the /lib/firmware directory where I found the "dra7-ipu2-fw.xem4" but as per your suggestion file was "dra7-ipu2.fw.xem4" so there is little change in name. so this minor change is ok or still need to modify something?

    root@am57xx-evm:~# ls -l /dev/rpmsg*
    ls: /dev/rpmsg*: No such file or directory

    root@am57xx-evm:/lib/firmware# ls -la
    drwxr-xr-x    6 root     root          4096 Jul  8  2019 .
    drwxr-xr-x   10 root     root          4096 Jul 10  2019 ..
    lrwxrwxrwx    1 root     root            49 Jul 10  2019 am57xx-pru1_0-fw -> /lib/firmware/pru/PRU_RPMsg_Echo_Interrupt1_0.out
    lrwxrwxrwx    1 root     root            49 Jul 10  2019 am57xx-pru1_1-fw -> /lib/firmware/pru/PRU_RPMsg_Echo_Interrupt1_1.out
    lrwxrwxrwx    1 root     root            49 Jul 10  2019 am57xx-pru2_0-fw -> /lib/firmware/pru/PRU_RPMsg_Echo_Interrupt2_0.out
    lrwxrwxrwx    1 root     root            49 Jul 10  2019 am57xx-pru2_1-fw -> /lib/firmware/pru/PRU_RPMsg_Echo_Interrupt2_1.out
    lrwxrwxrwx    1 root     root            46 Jul 10  2019 dra7-dsp1-fw.xe66 -> /lib/firmware/dra7-dsp1-fw.xe66.opencl-monitor
    -rw-r--r--    1 root     root      19948008 Jul  9  2019 dra7-dsp1-fw.xe66.opencl-monitor
    -rw-r--r--    1 root     root       8970568 Jul  8 06:50 dra7-dsp1-fw.xe66.openvx
    lrwxrwxrwx    1 root     root            46 Jul 10  2019 dra7-dsp2-fw.xe66 -> /lib/firmware/dra7-dsp2-fw.xe66.opencl-monitor
    -rw-r--r--    1 root     root      19948008 Jul  9  2019 dra7-dsp2-fw.xe66.opencl-monitor
    -rw-r--r--    1 root     root       8970536 Jul  8 06:50 dra7-dsp2-fw.xe66.openvx
    lrwxrwxrwx    1 root     root            55 Jul 10  2019 dra7-ipu1-fw.xem4 -> ipc/ti_platforms_evmDRA7XX_ipu1/test_omx_ipu1_vayu.xem4
    lrwxrwxrwx    1 root     root            40 Jul 10  2019 dra7-ipu2-fw.xem4 -> /lib/firmware/dra7-ipu2-fw.xem4.ipumm-fw
    -rw-r--r--    1 root     root       3743108 Jul  8  2019 dra7-ipu2-fw.xem4.ipumm-fw
    -rw-r--r--    1 root     root        572507 Jul  8  2019 dra7-ipu2-fw.xem4.map
    lrwxrwxrwx    1 root     root            40 Jul  8  2019 dra7-ipu2.fw.xem4 -> /lib/firmware/dra7-ipu2-fw.xem4.ipumm-fw
    -rw-r--r--    1 root     root           186 Jul  8 06:50 goodix_9271_cfg.bin
    drwxr-xr-x    6 root     root          4096 Jul  8  2019 ipc
    -rw-r--r--    1 root     root         59400 Jul  8  2019 jailhouse.bin
    drwxr-xr-x    2 root     root          4096 Jul 10  2019 pru
    drwxr-xr-x    2 root     root          4096 Jul 10  2019 ti-connectivity
    drwxr-xr-x    2 root     root          4096 Jul 10  2019 ti-pruss
    -rw-r--r--    1 root     root          4002 Jul  8  2019 vpdma-1b8.bin

    Please help us to solve the issue.

    Thanks

  • Hello,

    Sorry I have pressed . instead of -. 

    So the firmware exist in /lib/firmaware.

    The problem is when you execute ls -l /dev/rpmsg*

    The output should be something like:

    ls -l /dev/rpmsg*
    crw------- 1 root root 242, 1 Apr 9 07:49 /dev/rpmsg-dce

     Please check these threads:

    https://e2e.ti.com/support/processors/f/791/t/729232 

    https://e2e.ti.com/support/processors/f/791/p/682075/2512742 

    and your dts  file it seems like ipu2 node is missing.

    Hope this helps.

    BR
    Margarita

  • Dear Margarita,

    Thanks for your reply.

    We did remove all the ourcustom changes from sourc code.

    Our dtb file already have enable ipu2 node but we got below error.


    root@am57xx-evm:~# dmesg | grep ipu
    [    6.779558] omap-rproc 58820000.ipu: device does not have specific CMA pool
    [    6.858100] remoteproc remoteproc0: releasing 58820000.ipu
    [    6.902383] omap-rproc: probe of 58820000.ipu failed with error -22
    [    6.908888] omap-rproc 55020000.ipu: device does not have specific CMA pool
    [    7.082548] remoteproc remoteproc0: releasing 55020000.ipu
    [    7.124464] omap-rproc: probe of 55020000.ipu failed with error -22

    Thanks & Best Regards,

    Nikunj Patel

  • Dear Margarita,

    I did remove all our changes and now I can see the device as per your list.

    root@am57xx-evm:/mnt# ls -la /lib/firmware/dra7-ipu2 fw.xem4
    lrwxrwxrwx    1 root     root            40 Jul 19  2019 /lib/firmware/dra7-ipu2-fw.xem4 -> /lib/firmware/dra7-ipu2-fw.xem4.ipumm-fw
    root@am57xx-evm:/mnt# ls -la /dev/rpmsg-dce
    crw-------    1 root     root      243,   2 Jul 18 14:24 /dev/rpmsg-dce

    But, still i am facing issue as below.

    Setting pipeline to PAUSED ...
    [ 3014.616428] omap-iommu 55082000.mmu: 55082000.mmu: version 2.1
    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.010782197
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    Setting pipeline to NULL ...
    Freeing pipeline ...

    Please, help us to solve this issue as soon as possible.

     

    Thanks & Bet Regards,

    Nikunj Patel

  • Dear Margarita,

    Gentle Reminder,

    Thanks & Best Regards,

    Nikunj Patel