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: GStreamer capture to file issue

Part Number: AM5728
Other Parts Discussed in Thread: TVP5150

Tool/software: Linux

Hi,

I am using ti-processor-sdk-linux-am57xx-evm-04.02.00.09 release to develop the custom board. I design to apply tvp5150 to decode NTSC from AIP1A port and pass YUV 8-BIT 4:2:2 data to VIN1B_D0 ~ VIN1B_D7 pin of AM5728. First, we config tvp5150 to AIP1A input (Address 0x00, Bit[1:0]) and enable YUV output (Address 0x03, Bit[3]) via I2C.

While entering 「gst-launch-1.0 v4l2src device=/dev/video0 io-mode=4 ! 'video/x-raw, format=(string)NV12, width=(int)1280, height=(int)720' ! vpe ! filesink location=capture.yuv」, we got error message 「Device '/dev/video0' is not a capture device.」as below: 

root@am57xx-evm:~#
root@am57xx-evm:~# gst-launch-1.0 v4l2src device=/dev/video0 io-mode=4 ! 'video/
x-raw, format=(string)NV12, width=(int)1280, height=(int)720' ! vpe ! filesink l
ocation=capture.yuv
Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Device '/dev/vid
eo0' is not a capture device.
Additional debug info:
../../../gst-plugins-good-1.8.3/sys/v4l2/v4l2_calls.c(628): gst_v4l2_open (): /G
stPipeline:pipeline0/GstV4l2Src:v4l2src0:
Capabilities: 0x84204000
Setting pipeline to NULL ...
Freeing pipeline ...
root@am57xx-evm:~#

But video0 has been registered by vpe while entering kernel. The dmesg is attached. In the dmesg, the tvp5150 is found, vpe firmware vpdma-1b8.bin loaded and registered as video0.

0458.dmesg.TXT

I am new to AM5728 and Linux, Is there anything wrong in my configuration? 

Please kindly point out the root cause, I am very appreciate.

Regards,

Collin

  • Hello,

    Gtsreamer point of view, the error is that you are trying to open not a capture device /dev/video0.
    Please execute ls /dev/video* and check what is your capture device node.
     


    Hope this helps.

    Best Regards,
    Margarita

  • Hi Margarita,

    Thanks for your reply.
    I tried ls /dev/video* and got video0/video10/video11. By applying video10/video11 as input port, I got messages below.
    root@am57xx-evm:~#
    root@am57xx-evm:~# ls /dev/video*
    /dev/video0 /dev/video10 /dev/video11
    root@am57xx-evm:~#
    root@am57xx-evm:~#
    root@am57xx-evm:~# gst-launch-1.0 v4l2src device=/dev/video10 io-mode=4 ! 'video
    /x-raw, format=(string)NV12, width=(int)1280, height=(int)720' ! vpe ! filesink
    location=capture.yuv
    Setting pipeline to PAUSED ...
    ERROR: Pipeline doesn't want to pause.
    ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Device '/dev/vid
    eo10' is not a capture device.
    Additional debug info:
    ../../../gst-plugins-good-1.8.3/sys/v4l2/v4l2_calls.c(628): gst_v4l2_open (): /G
    stPipeline:pipeline0/GstV4l2Src:v4l2src0:
    Capabilities: 0x84204000
    Setting pipeline to NULL ...
    Freeing pipeline ...
    root@am57xx-evm:~#
    root@am57xx-evm:~#
    root@am57xx-evm:~# gst-launch-1.0 v4l2src device=/dev/video11 io-mode=4 ! 'video
    /x-raw, format=(string)NV12, width=(int)1280, height=(int)720' ! vpe ! filesink
    location=capture.yuv
    Setting pipeline to PAUSED ...
    Pipeline is live and does not need PREROLL ...
    ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data fl
    ow 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)
    ERROR: pipeline doesn't want to preroll.
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    Setting pipeline to NULL ...
    Freeing pipeline ...
    root@am57xx-evm:~#
    root@am57xx-evm:~#

    Is that result means the capture device is video11?
    Currently we do not have the camera on hand. So we try to prepare the software ready, left the AIP1A input port of TVP5150 open and hope to capture video like white noise screen. Is it okay to capture video from TVP5150 without camera?

    Regards,
    Collin
  • Hello,

    As I said /dev/video0/10/11 are used by default and there are not a capture device.
    Here is exmaple of my booting log:
    [ 9.462454] vip2-s0: Port A: Using subdev ov1063x 4-0030 for capture
    [ 9.500375] vip2-s0: device registered as video1
    In my case, is /dev/video1

    I see this in your dmesg log:
    vip 48990000.vip: Direct firmware load for vpdma-1b8.bin failed with error -2
    and I see that this question was answered here:
    e2e.ti.com/.../718756
    Please follow Manisha's instructions.

    This explains why gstreamer fails with this error.
    I would recommend you to check this thread :
    e2e.ti.com/.../2619619
    and this wiki page:
    processors.wiki.ti.com/.../Linux_Core_VIP_User's_Guide
    -Debugging chapter
    I would recommend before to use gstreamer to verify the capture with yavta (chapter yavta example) also.



    BR
    Margarita

  • Collin Lin12 said:
    Is that result means the capture device is video11?

    No. /dev/video11 is used for omapwb-cap.

    I do not see in your log the capture device node. You must fix this first before to try with gsreamer or yavta.

    BR
    Margarita

  • Hi Margarita,

    I solved the VIP problem and the video1 is registered. Also, I apply the 「yavta -c60 -fYUYV -Fvout_800x600_yuyv.yuv -s800x600 /dev/video1」command to capture video. Since I don't have NTSC camera on hand, the captured video screen are black. I think it's reasonable. 

    2438.dmesg.TXT

    Further, I tried 「gst-launch-1.0 v4l2src device=/dev/video1 io-mode=4 ! 'video/x-raw, format=(string)NV12, width=(int)640, height=(int)480' ! vpe ! filesink location=capture.yuv」command. But I got messages as below. 

    root@am57xx-evm:~# echo 3 > /sys/class/video4linux/video1/dev_debug
    root@am57xx-evm:~# echo 3 > /sys/module/videobuf2_core/parameters/debug
    root@am57xx-evm:~# echo 3 > /sys/module/ti_vip/parameters/debug
    root@am57xx-evm:~#
    root@am57xx-evm:~# gst-launch-1.0 v4l2src device=/dev/video1 io-mode=4 ! 'video/x-raw, format=(string)NV12, width=(int)640, height=(int)480' ! vpe ! filesink location=capture.yuv
    Setting pipeline to PAUSED ...
    Pipeline is live and does not need PREROLL ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    [ 797.123668] systemd-journald[122]: /dev/kmsg buffer overrun, some messages lost.
    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.026770053
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    Setting pipeline to NULL ...
    Freeing pipeline ...
    root@am57xx-evm:~#

    Regards,

    Collin

  • Hello Collin,

    Collin Lin12 said:
    ../../../../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)

    Gstreamer point of view streaming task paused, reason not-negotiated (-4) most of the cases means the video format or framerate or resolution you get from your video source (v4l2src) is not compatible with the sink.

    In other words, you caps filter is wrong ('video/x-raw, format=(string)NV12, width=(int)640, height=(int)480')

    Please make sure that the format NV12, framerate and resolution are right.

    Here is the multimedia user guide

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

    there, you could find gst capture examples.

    BR
    Margarita

  • Hello,

    Please if this answers your question click the "This resolved my issue" button.
    If you have new questions/issues you could open a new thread.

    Thank You!

    Best Regards,
    Margarita