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: About am5728 gstream videomixer problem



Tool/software: Linux

HI:

we want to use the videomixer plugin  to stitching the video

out board is a custom board and the processor sdk is 3.3

 below is my test command but videotestsrc pattern=18 not show, only videotestsrc pattern=13 show

gst-launch-1.0 --gst-debug=3 -v videotestsrc pattern=18 ! 'video/x-raw, format=(string)AYUV,framerate=(fraction)60/1, width=(int)100, height=(int)100' ! videomixer name=mix ! videoconvert ! waylandsink videotestsrc pattern=13 ! 'video/x-raw, format=(string)AYUV,framerate=(fraction)60/1, width=(int)320, height=(int)240' ! mix.

     please see the debug info:

Setting pipeline to PAUSED ...
0:00:00.094462411 1209 0x1441b0 FIXME default gstutils.c:3766:gst_pad_create_stream_id_internal:<videotestsrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)AYUV\,\ width\=\(int\)100\,\ height\=\(int\)100\,\ framerate\=\(fraction\)60/1\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive"
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)AYUV\,\ width\=\(int\)100\,\ height\=\(int\)100\,\ framerate\=\(fraction\)60/1\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive"
0:00:00.096469377 1209 0x1442f0 FIXME default gstutils.c:3766:gst_pad_create_stream_id_internal:<videotestsrc1:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:00.096838036 1209 0x1441b0 WARN waylandsink wlvideoformat.c:102:gst_wl_shm_format_to_video_format: gst video format not found
0:00:00.096886681 1209 0x1441b0 WARN waylandsink wlvideoformat.c:102:gst_wl_shm_format_to_video_format: gst video format not found
0:00:00.098620324 1209 0x1441b0 WARN waylandsink wlvideoformat.c:102:gst_wl_shm_format_to_video_format: gst video format not found
0:00:00.098656930 1209 0x1441b0 WARN waylandsink wlvideoformat.c:102:gst_wl_shm_format_to_video_format: gst video format not found
/GstPipeline:pipeline0/GstVideoMixer2:mix.GstVideoMixer2Pad:sink_0: caps = "video/x-raw\,\ format\=\(string\)AYUV\,\ width\=\(int\)100\,\ height\=\(int\)100\,\ framerate\=\(fraction\)60/1\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive"
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)AYUV\,\ width\=\(int\)100\,\ height\=\(int\)100\,\ framerate\=\(fraction\)60/1\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive"
/GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc1.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)AYUV\,\ width\=\(int\)320\,\ height\=\(int\)240\,\ framerate\=\(fraction\)60/1\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive"
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)AYUV\,\ width\=\(int\)320\,\ height\=\(int\)240\,\ framerate\=\(fraction\)60/1\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive"
0:00:00.102205562 1209 0x1442f0 WARN waylandsink wlvideoformat.c:102:gst_wl_shm_format_to_video_format: gst video format not found
0:00:00.102321724 1209 0x1442f0 WARN waylandsink wlvideoformat.c:102:gst_wl_shm_format_to_video_format: gst video format not found
0:00:00.104142733 1209 0x1442f0 WARN waylandsink wlvideoformat.c:102:gst_wl_shm_format_to_video_format: gst video format not found
0:00:00.104389862 1209 0x1442f0 WARN waylandsink wlvideoformat.c:102:gst_wl_shm_format_to_video_format: gst video format not found
/GstPipeline:pipeline0/GstVideoMixer2:mix.GstVideoMixer2Pad:sink_1: caps = "video/x-raw\,\ format\=\(string\)AYUV\,\ width\=\(int\)320\,\ height\=\(int\)240\,\ framerate\=\(fraction\)60/1\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive"
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)AYUV\,\ width\=\(int\)320\,\ height\=\(int\)240\,\ framerate\=\(fraction\)60/1\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive"
0:00:00.108904070 1209 0x1442f0 FIXME basesink gstbasesink.c:3117:gst_base_sink_default_event:<waylandsink0> stream-start event without group-id. Consider implementing group-id handling in the upstream elements
0:00:00.109268012 1209 0x1442f0 WARN waylandsink wlvideoformat.c:102:gst_wl_shm_format_to_video_format: gst video format not found
0:00:00.109358305 1209 0x1442f0 WARN waylandsink wlvideoformat.c:102:gst_wl_shm_format_to_video_format: gst video format not found
/GstPipeline:pipeline0/GstVideoMixer2:mix.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)AYUV\,\ width\=\(int\)320\,\ height\=\(int\)240\,\ interlace-mode\=\(string\)progressive\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ chroma-site\=\(string\)jpeg\,\ colorimetry\=\(string\)bt601\,\ framerate\=\(fraction\)60/1"
0:00:00.110926003 1209 0x1442f0 WARN waylandsink wlvideoformat.c:102:gst_wl_shm_format_to_video_format: gst video format not found
0:00:00.111009464 1209 0x1442f0 WARN waylandsink wlvideoformat.c:102:gst_wl_shm_format_to_video_format: gst video format not found
0:00:00.111908499 1209 0x1442f0 WARN waylandsink wlvideoformat.c:102:gst_wl_shm_format_to_video_format: gst video format not found
0:00:00.111990170 1209 0x1442f0 WARN waylandsink wlvideoformat.c:102:gst_wl_shm_format_to_video_format: gst video format not found
/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:src: caps = "video/x-raw\,\ width\=\(int\)320\,\ height\=\(int\)240\,\ interlace-mode\=\(string\)progressive\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)60/1\,\ format\=\(string\)BGRA"
0:00:00.112456444 1209 0x1442f0 WARN waylandsink wlvideoformat.c:102:gst_wl_shm_format_to_video_format: gst video format not found
0:00:00.112535350 1209 0x1442f0 WARN waylandsink wlvideoformat.c:102:gst_wl_shm_format_to_video_format: gst video format not found
/GstPipeline:pipeline0/GstWaylandSink:waylandsink0.GstPad:sink: caps = "video/x-raw\,\ width\=\(int\)320\,\ height\=\(int\)240\,\ interlace-mode\=\(string\)progressive\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)60/1\,\ format\=\(string\)BGRA"
/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)AYUV\,\ width\=\(int\)320\,\ height\=\(int\)240\,\ interlace-mode\=\(string\)progressive\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ chroma-site\=\(string\)jpeg\,\ colorimetry\=\(string\)bt601\,\ framerate\=\(fraction\)60/1"
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:01.664458708
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

  • Hello,

    Did you try pipeline like:

    gst-launch-1.0 videomixer name=mixer  ! \
      videoconvert !  waylandsink \
      videotestsrc pattern=snow  ! \
      "video/x-raw,format=AYUV,width=640,height=480,framerate=(fraction)30/1" ! \
       queue ! mixer. \
      videotestsrc pattern=13 ! \
      "video/x-raw,format=AYUV,width=800,height=600,framerate=(fraction)10/1" ! \
       queue  ! mixer.

    You could check this element also:

    https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad-plugins/html/gst-plugins-bad-plugins-compositor.html

    BR

    Margarita

  • Hi:
    This program verified thing?

    I tried using this command,videotestsrc pattern=snow not show。

    Note:
    our board the processor sdk is 3.3
  • Hello,

    I am so sorry. The order of resolutions does matter.
    The pipeline in my previous post is working just the "snow" is below the colorbar and you can not see it.

    This is working on my side:

    1. With compositor element:
    gst-launch-1.0 compositor name=mixer ! videoconvert ! waylandsink videotestsrc pattern=18 ! "video/x-raw,format=AYUV,width=800,height=600,framerate=(fraction)30/1" ! queue ! mixer. videotestsrc pattern=13 ! "video/x-raw,format=AYUV,width=320,height=240,framerate=(fraction)10/1" ! queue ! mixer.

    gst-launch-1.0 compositor name=mixer ! videoconvert ! waylandsink videotestsrc pattern=snow ! "video/x-raw,format=AYUV,width=800,height=600,framerate=(fraction)30/1" ! queue ! mixer. videotestsrc pattern=13 ! "video/x-raw,format=AYUV,width=320,height=240,framerate=(fraction)10/1" ! queue ! mixer.

    2.With videomixer element:
    gst-launch-1.0 videomixer name=mixer ! videoconvert ! waylandsink videotestsrc pattern=snow ! "video/x-raw,format=AYUV,width=800,height=600,framerate=(fraction)30/1" ! queue ! mixer. videotestsrc pattern=13 ! "video/x-raw,format=AYUV,width=320,height=240,framerate=(fraction)10/1" ! queue ! mixer.

    gst-launch-1.0 videomixer name=mixer ! videoconvert ! waylandsink videotestsrc pattern=18 ! "video/x-raw,format=AYUV,width=800,height=600,framerate=(fraction)30/1" ! queue ! mixer. videotestsrc pattern=13 ! "video/x-raw,format=AYUV,width=320,height=240,framerate=(fraction)10/1" ! queue ! mixer.

    BR
    Margarita

  • Hello:
    thank you very much !
    The video is displayed correctly.But I still have a question to ask about.

    cpu occupancy rate is very high, how to optimize ??

  • Hello:


    When I use v4l2src to capture video when found, not link v4l2src to mixer. Io-mode is set to 0-5 any number is the same result

    root@am57xx-evm:~# gst-launch-1.0 --gst-debug=3 videomixer name=mixer ! videoconvert ! wayl
    andsink v4l2src device=/dev/video1 io-mode=0 ! 'video/x-raw, format=YUY2,width=(int)800, h
    eight=(int)600,framerate=(fraction)30/1' ! mixer. videotestsrc pattern=13 ! 'video/x-raw, for
    mat=AYUV,width=(int)320, height=(int)240,framerate=(fraction)10/1' ! mixer.

    Setting pipeline to PAUSED ...
    Pipeline is live and does not need PREROLL ...
    0:00:00.110164239 1222 0x16bb80 WARN basesrc gstbasesrc.c:2943:gst_base_
    src_loop:<v4l2src0> error: Internal data flow error.
    0:00:00.110242649 1222 0x16bb80 WARN basesrc gstbasesrc.c:2943:gst_base_
    src_loop:<v4l2src0> error: streaming task paused, reason not-negotiated (-4)
    0:00:00.110591589 1222 0x142c60 FIXME default gstutils.c:3766:gst_pad_cre
    ate_stream_id_internal:<videotestsrc0:src> Creating random stream-id, consider implementing
    a deterministic way of creating a stream-id
    ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error.
    Additional debug info:
    ../../../../gstreamer-1.6.3/libs/gst/base/gstbasesrc.c(2943): gst_base_src_loop (): /GstPip
    eline: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 ...
    0:00:00.112514583 1222 0x142c60 WARN waylandsink wlvideoformat.c:102:gst_wl_
    shm_format_to_video_format: gst video format not found
    0:00:00.112567616 1222 0x142c60 WARN waylandsink wlvideoformat.c:102:gst_wl_
    shm_format_to_video_format: gst video format not found
    0:00:00.114362258 1222 0x142c60 WARN waylandsink wlvideoformat.c:102:gst_wl_
    shm_format_to_video_format: gst video format not found
    0:00:00.114397721 1222 0x142c60 WARN waylandsink wlvideoformat.c:102:gst_wl_
    shm_format_to_video_format: gst video format not found
    Setting pipeline to NULL ...
    Freeing pipeline ...
    root@am57xx-evm:~#


    Picture-in-picture mode How to add v4l2src Video source???
  • Hello,

    I would recommend you to check this wiki page:
    processors.wiki.ti.com/.../Processor_Training:_Multimedia
    and try to run the capture pipelines to verify that the capture is working.

    I would recommend:
    1.you to add --gst-debug=v4l2src:5 for more debug prints.
    2. to set the format in the videotestsrc caps filter as for v4l2. Or better remove the videotestsrc branch at all.
    3. to check with compositor element also.

    BR
    Margarita
  • Hello:

    1、

    gst-launch-1.0 --gst-debug=v4l2src:5  videomixer name=mix  ! videoconvert ! waylandsink  v4l2src device=/dev/video1 io-mode=0 ! 'video/x-raw, format=YUY2,width=(int)1280, height=(int)720,framerate=(fraction)60/1' ! mix. videotestsrc pattern=13 ! 'video/x-raw, format=AYUV,width=(int)320, height=(int)240,framerate=(fraction)10/1' ! mix.

    Set v4l2 format to YUY2

    After entering the above command to print debug information: 

    Setting pipeline to PAUSED ...

    Pipeline is live and does not need PREROLL ...
    0:00:00.109879887 1198 0x16b980 DEBUG v4l2src gstv4l2src.c:300:gst_v4l2src_negotiate:<v4l2src0> caps of src: video/x-raw, format=(string)YUY2, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw, format=(string)UYVY, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw, format=(string)NV12, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw, format=(string)YVYU, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, framerate=(fraction)[ 0/1, 2147483647/1 ]
    0:00:00.110150731 1198 0x16b980 DEBUG v4l2src gstv4l2src.c:301:gst_v4l2src_negotiate:<v4l2src0> thiscaps: video/x-raw, format=(string)YUY2, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw, format=(string)UYVY, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw, format=(string)NV12, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw, format=(string)YVYU, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, framerate=(fraction)[ 0/1, 2147483647/1 ]
    0:00:00.110522429 1198 0x16b980 DEBUG v4l2src gstv4l2src.c:309:gst_v4l2src_negotiate:<v4l2src0> caps of peer: video/x-raw, format=(string)YUY2, width=(int)1280, height=(int)720, framerate=(fraction)60/1, pixel-aspect-ratio=(fraction)1/1
    0:00:00.110590099 1198 0x16b980 DEBUG v4l2src gstv4l2src.c:310:gst_v4l2src_negotiate:<v4l2src0> peercaps: video/x-raw, format=(string)YUY2, width=(int)1280, height=(int)720, framerate=(fraction)60/1, pixel-aspect-ratio=(fraction)1/1
    0:00:00.110661511 1198 0x16b980 DEBUG v4l2src gstv4l2src.c:320:gst_v4l2src_negotiate:<v4l2src0> peer: video/x-raw, format=(string)YUY2, width=(int)1280, height=(int)720, framerate=(fraction)60/1, pixel-aspect-ratio=(fraction)1/1
    0:00:00.110717632 1198 0x16b980 DEBUG v4l2src gstv4l2src.c:321:gst_v4l2src_negotiate:<v4l2src0> ipcaps: video/x-raw, format=(string)YUY2, width=(int)1280, height=(int)720, framerate=(fraction)60/1, pixel-aspect-ratio=(fraction)1/1
    0:00:00.110811004 1198 0x16b980 DEBUG v4l2src gstv4l2src.c:333:gst_v4l2src_negotiate:<v4l2src0> intersect: video/x-raw, format=(string)YUY2, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, framerate=(fraction)60/1
    0:00:00.110895266 1198 0x16b980 DEBUG v4l2src gstv4l2src.c:334:gst_v4l2src_negotiate:<v4l2src0> icaps: video/x-raw, format=(string)YUY2, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, framerate=(fraction)60/1
    0:00:00.111047036 1198 0x16b980 DEBUG v4l2src gstv4l2src.c:256:gst_v4l2src_fixate:<v4l2src0> fixating caps video/x-raw, format=(string)YUY2, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, framerate=(fraction)60/1
    0:00:00.111129672 1198 0x16b980 DEBUG v4l2src gstv4l2src.c:282:gst_v4l2src_fixate:<v4l2src0> fixated caps video/x-raw, format=(string)YUY2, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, framerate=(fraction)60/1
    0:00:00.111199782 1198 0x16b980 DEBUG v4l2src gstv4l2src.c:384:gst_v4l2src_negotiate:<v4l2src0> fixated to: video/x-raw, format=(string)YUY2, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, framerate=(fraction)60/1
    0:00:00.111265663 1198 0x16b980 DEBUG v4l2src gstv4l2src.c:385:gst_v4l2src_negotiate:<v4l2src0> caps: video/x-raw, format=(string)YUY2, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, framerate=(fraction)60/1
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock

    2、

    gst-launch-1.0 --gst-debug=v4l2src:5  videomixer name=mix  ! videoconvert ! waylandsink  v4l2src device=/dev/video1 io-mode=0 ! 'video/x-raw, format=AYUV,width=(int)1280, height=(int)720,framerate=(fraction)60/1' ! mix. videotestsrc pattern=13 ! 'video/x-raw, format=AYUV,width=(int)320, height=(int)240,framerate=(fraction)10/1' ! mix.

    Set v4l2 format to AYUV

    After entering the above command to print debug information:

    WARNING: erroneous pipeline: could not link v4l2src0 to mix

    3、When I use compositor, the CPU load is still high

     

  • Hello,

    1. I see this pipeline is moving into PLAYING state.
    2. I assume that AYUV is not supported by v4l2 element. I would recommend you to try: gst-inspect-1.0 "v4l2src" to check the formats that are supported.
    3. One of the reasons could be videoconvert element in the pipeline since it is converting the format for every frame.

    BR
    Margarita

  • Hello:

     1、Sorry, yesterday may not be clear. Although the first command  did not show the debug err, but the video did not show

          Run the following v4l2 command, the image can be displayed correctly, but add the videomixer element video does not show

         gst-launch-1.0 -v v4l2src device=/dev/video1 io-mode=4 ! 'video/x-raw, format=(string)YUY2, width=(int)1280, height=(int)720, framerate=(fraction)60/1' ! vpe num-input-buffers=8 ! 'video/x-raw, format=(string)NV12, width=(int)1280, height=(int)720, framerate=(fraction)60/1'! queue ! waylandsink

    2、The following is the “gst-inspect-1.0 v4l2src ” display support format

    video/x-raw
    format: { RGB15, RGB16, BGR, RGB, BGRx, BGRA, xRGB, ARGB, GRAY8, YVU9, YV12, YUY2, UYVY, Y42B, Y41B, NV12_64Z32, YUV9, I420, YVYU, NV21, NV12 }

    3、Is there a way to optimize cpu high load?

  • Hi:
    Who can help answer this question?
  • Hello,

    3.We have gstreamer VPE element base on VPE m2m driver.
    This element supports : CSC, deinterlace and scaling.
    You could check this wiki page for VPE:
    processors.wiki.ti.com/.../Linux_Core_VPE_User's_Guide
    In the multimedia guide you could find gstreamer pipelines for color space conversion.
    Gstreamer VPE element supports YUYV, NV12 and YUY2 format on src and on sink.

    1.2. I would recommend you to try pipeline with videomixer and compositor element but only add the capture branch(remove videotestsrc branch).


    BR
    Margarita
  • I am Sorry,I think I should describe my issue again

    When we use the below command to test PIPIt can work!

    gst-launch-1.0 videomixer name=mix  ! videoconvert ! waylandsink  videotestsrc pattern=18 ! 'video/x-raw, format=AYUV,width=(int)800, height=(int)600,framerate=(fraction)30/1' ! queue ! mix. videotestsrc pattern=13 ! 'video/x-raw, format=AYUV,width=(int)320, height=(int)240,framerate=(fraction)10/1' ! queue ! mix.

     

    So we want to use the v4l2src to replace the videotestsrc to test PIP.

    Because it is closer to our application.

    The below is my test commandBut it will fail

    gst-launch-1.0 --gst-debug=3  videomixer name=mix  ! videoconvert ! waylandsink  v4l2src device=/dev/video1 io-mode=4 ! 'video/x-raw, format=YUY2,width=(int)1280,height=(int)720,framerate=(fraction)60/1' ! mix. v4l2src device=/dev/video2 io-mode=4 ! 'video/x-raw, format=YUV2,width=(int)1280,height=(int)720,framerate=(fraction)60/1' ! mix. 

    This is the error:

    WARNING: erroneous pipeline: could not link v4l2src0 to mix

    We also changed the format to

    ‘video/x-raw, format=AYUV,width=(int)1280,height=(int)720,framerate=(fraction)60/1'

    it also reporter the same error

    From the errorwe can know videomixer does not support v4l2src, it can not linked to the v4l2src.

     

    We can make sure the element v4l2src can work, Because the loopback pipeline can work when using the below command

    gst-launch-1.0 -v v4l2src device=/dev/video1 io-mode=4 ! 'video/x-raw, format=(string)YUY2, width=(int)1280, height=(int)720, framerate=(fraction)60/1' ! vpe num-input-buffers=8 ! 'video/x-raw, format=(string)NV12, width=(int)1280, height=(int)720, framerate=(fraction)60/1'! queue ! waylandsink

  • HI:
    I raise the --gst-debug value to 5. Get more detailed information.
    gst-launch-1.0 --gst-debug=5 videomixer name=mix ! videoconvert ! waylandsink v4l2src device=/dev/video1 io-mode=4 ! 'video/x-raw, format=YUY2,width=(int)1280,height=(int)720,framerate=(fraction)60/1' ! mix. v4l2src device=/dev/video2 io-mode=4 ! 'video/x-raw, format=YUV2,width=(int)1280,height=(int)720,framerate=(fraction)60/1' ! mix. 

    This is the error:

    0:00:00.000699792 1104 0x2e400 DEBUG GST_MEMORY ../../gstreamer-1.2.3/gst/gstallocator.c:586:_priv_gst_memory_initialize: memory alignment: 7
    0:00:00.001131184 1104 0x2e400 DEBUG GST_MEMORY ../../gstreamer-1.2.3/gst/gstallocator.c:563:gst_allocator_sysmem_init: init allocator 0x32018
    0:00:00.001228784 1104 0x2e400 DEBUG GST_MEMORY ../../gstreamer-1.2.3/gst/gstallocator.c:212:gst_allocator_register: registering allocator 0x32018 with name "SystemMemory"
    0:00:00.001790146 1104 0x2e400 DEBUG GST_ELEMENT_PADS ../../gstreamer-1.2.3/gst/gstelement.c:278:gst_element_base_class_init: type GstElement : factory (nil)
    0:00:00.001950698 1104 0x2e400 DEBUG GST_ELEMENT_PADS ../../gstreamer-1.2.3/gst/gstelement.c:278:gst_element_base_class_init: type GstBin : factory (nil)
    0:00:00.002128493 1104 0x2e400 DEBUG bin ../../gstreamer-1.2.3/gst/gstbin.c:475:gst_bin_class_init: creating bin thread pool
    0:00:00.003296440 1104 0x2e400 INFO GST_INIT ../../gstreamer-1.2.3/gst/gstmessage.c:123:_priv_gst_message_initialize: init messages
    0:00:00.003559309 1104 0x2e400 INFO GST_INIT ../../gstreamer-1.2.3/gst/gstcontext.c:77:_priv_gst_context_initialize: init contexts
    0:00:00.003864797 1104 0x2e400 INFO GST_PLUGIN_LOADING ../../gstreamer-1.2.3/gst/gstplugin.c:317:_priv_gst_plugin_initialize: registering 0 static plugins
    0:00:00.004100338 1104 0x2e400 DEBUG GST_REGISTRY ../../gstreamer-1.2.3/gst/gstregistry.c:574:gst_registry_add_feature:<registry0> adding feature 0x40800 (bin)
    0:00:00.004143282 1104 0x2e400 DEBUG GST_REFCOUNTING ../../gstreamer-1.2.3/gst/gstobject.c:684:gst_object_set_parent:<bin> set parent (ref and sink)
    0:00:00.004228032 1104 0x2e400 DEBUG GST_ELEMENT_PADS ../../gstreamer-1.2.3/gst/gstelement.c:278:gst_element_base_class_init: type GstPipeline : factory 0x40890
    0:00:00.004320264 1104 0x2e400 DEBUG GST_REGISTRY ../../gstreamer-1.2.3/gst/gstregistry.c:574:gst_registry_add_feature:<registry0> adding feature 0x40890 (pipeline)
    0:00:00.004359141 1104 0x2e400 DEBUG GST_REFCOUNTING ../../gstreamer-1.2.3/gst/gstobject.c:684:gst_object_set_parent:<pipeline> set parent (ref and sink)
    0:00:00.004392976 1104 0x2e400 INFO GST_PLUGIN_LOADING ../../gstreamer-1.2.3/gst/gstplugin.c:225:gst_plugin_register_static: registered static plugin "staticelements"
    0:00:00.004480165 1104 0x2e400 DEBUG GST_REGISTRY ../../gstreamer-1.2.3/gst/gstregistry.c:463:gst_registry_add_plugin:<registry0> adding plugin 0x40020 for filename "(NULL)"
    0:00:00.004524736 1104 0x2e400 INFO GST_PLUGIN_LOADING ../../gstreamer-1.2.3/gst/gstplugin.c:227:gst_plugin_register_static: added static plugin "staticelements", result: 1
    0:00:00.004581506 1104 0x2e400 INFO GST_REGISTRY ../../gstreamer-1.2.3/gst/gstregistry.c:1680:ensure_current_registry: reading registry cache: /home/root/.cache/gstreamer-1.0/registry.arm.bin
    0:00:00.004670973 1104 0x2e400 DEBUG GST_REGISTRY ../../gstreamer-1.2.3/gst/gstregistrybinary.c:560:priv_gst_registry_binary_read_cache: File data at address 0xb6a3e000
    0:00:00.004703506 1104 0x2e400 DEBUG GST_REGISTRY ../../gstreamer-1.2.3/gst/gstregistrybinary.c:471:gst_registry_binary_check_magic: Reading/casting for GstBinaryRegistryMagic at address 0xb6a3e000
    0:00:00.352392607 1104 0x2e400 DEBUG GST_REGISTRY ../../gstreamer-1.2.3/gst/gstregistrybinary.c:602:priv_gst_registry_binary_read_cache: reading binary registry 72(48)/566955
    0:00:00.352484513 1104 0x2e400 DEBUG GST_REGISTRY ../../gstreamer-1.2.3/gst/gstregistry.c:463:gst_registry_add_plugin:<registry0> adding plugin 0x400e0 for filename "/usr/lib/gstreamer-1.0/libgstaudiofx.so"
    0:00:00.352524367 1104 0x2e400 DEBUG GST_REGISTRY ../../gstreamer-1.2.3/gst/gstregistrychunks.c:815:_priv_gst_registry_chunks_load_plugin: Added plugin 'audiofx' plugin with 13 features from binary registry
    0:00:00.352559503 1104 0x2e400 DEBUG GST_REGISTRY ../../gstreamer-1.2.3/gst/gstregistrychunks.c:547:gst_registry_chunks_load_feature: Plugin 'audiofx' feature 'audiopanorama' typename : 'GstElementFactory'
    0:00:00.352623756 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2126:gst_structure_parse_field: trying field name 'long-name'
    0:00:00.352664585 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2177:gst_structure_parse_value: trying type name 'string'
    0:00:00.352701673 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2126:gst_structure_parse_field: trying field name 'klass'
    0:00:00.352730628 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2177:gst_structure_parse_value: trying type name 'string'
    0:00:00.352764137 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2126:gst_structure_parse_field: trying field name 'description'
    0:00:00.352792929 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2177:gst_structure_parse_value: trying type name 'string'
    0:00:00.352826276 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2126:gst_structure_parse_field: trying field name 'author'
    0:00:00.352854417 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2177:gst_structure_parse_value: trying type name 'string'
    0:00:00.352884673 1104 0x2e400 DEBUG GST_REGISTRY ../../gstreamer-1.2.3/gst/gstregistrychunks.c:590:gst_registry_chunks_load_feature: Element factory : npadtemplates=2
    0:00:00.352912327 1104 0x2e400 DEBUG GST_REGISTRY ../../gstreamer-1.2.3/gst/gstregistrychunks.c:490:gst_registry_chunks_load_pad_template: Reading/casting for GstRegistryChunkPadTemplate at address 0xb6a3e210
    0:00:00.352945673 1104 0x2e400 DEBUG GST_REGISTRY ../../gstreamer-1.2.3/gst/gstregistrychunks.c:503:gst_registry_chunks_load_pad_template: Added pad_template src
    0:00:00.352972839 1104 0x2e400 DEBUG GST_REGISTRY ../../gstreamer-1.2.3/gst/gstregistrychunks.c:490:gst_registry_chunks_load_pad_template: Reading/casting for GstRegistryChunkPadTemplate at address 0xb6a3e294
    0:00:00.353005860 1104 0x2e400 DEBUG GST_REGISTRY ../../gstreamer-1.2.3/gst/gstregistrychunks.c:503:gst_registry_chunks_load_pad_template: Added pad_template sink
    0:00:00.353040345 1104 0x2e400 DEBUG GST_REGISTRY ../../gstreamer-1.2.3/gst/gstregistry.c:574:gst_registry_add_feature:<registry0> adding feature 0x40920 (audiopanorama)
    0:00:00.353075644 1104 0x2e400 DEBUG GST_REFCOUNTING ../../gstreamer-1.2.3/gst/gstobject.c:684:gst_object_set_parent:<audiopanorama> set parent (ref and sink)
    0:00:00.709513283 1104 0x2e400 DEBUG GST_REGISTRY ../../gstreamer-1.2.3/gst/gstregistrychunks.c:667:gst_registry_chunks_load_feature: Added feature audiopanorama, plugin 0x400e0 audiofx
    0:00:00.709553462 1104 0x2e400 DEBUG GST_REGISTRY ../../gstreamer-1.2.3/gst/gstregistrychunks.c:547:gst_registry_chunks_load_feature: Plugin 'audiofx' feature 'audioinvert' typename : 'GstElementFactory'
    0:00:00.709621619 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2126:gst_structure_parse_field: trying field name 'long-name'
    0:00:00.709652038 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2177:gst_structure_parse_value: trying type name 'string'
    0:00:00.709684083 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2126:gst_structure_parse_field: trying field name 'klass'
    0:00:00.709712062 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2177:gst_structure_parse_value: trying type name 'string'
    0:00:00.709743294 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2126:gst_structure_parse_field: trying field name 'description'
    0:00:00.709771110 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2177:gst_structure_parse_value: trying type name 'string'
    0:00:00.709803480 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2126:gst_structure_parse_field: trying field name 'author'
    0:00:00.709831296 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2177:gst_structure_parse_value: trying type name 'string'
    0:00:00.709862203 1104 0x2e400 DEBUG GST_REGISTRY ../../gstreamer-1.2.3/gst/gstregistrychunks.c:590:gst_registry_chunks_load_feature: Element factory : npadtemplates=2
    0:00:00.709889856 1104 0x2e400 DEBUG GST_REGISTRY ../../gstreamer-1.2.3/gst/gstregistrychunks.c:490:gst_registry_chunks_load_pad_template: Reading/casting for GstRegistryChunkPadTemplate at address 0xb6a3e438
    0:00:00.709922390 1104 0x2e400 DEBUG GST_REGISTRY ../../gstreamer-1.2.3/gst/gstregistrychunks.c:503:gst_registry_chunks_load_pad_template: Added pad_template src
    0:00:00.709949067 1104 0x2e400 DEBUG GST_REGISTRY ../../gstreamer-1.2.3/gst/gstregistrychunks.c:490:gst_registry_chunks_load_pad_template: Reading/casting for GstRegistryChunkPadTemplate at address 0xb6a3e4e0
    0:00:00.709979648 1104 0x2e400 DEBUG GST_REGISTRY ../../gstreamer-1.2.3/gst/gstregistrychunks.c:503:gst_registry_chunks_load_pad_template: Added pad_template sink
    0:00:00.710013320 1104 0x2e400 DEBUG GST_REGISTRY ../../gstreamer-1.2.3/gst/gstregistry.c:574:gst_registry_add_feature:<registry0> adding feature 0x409b0 (audioinvert)
    0:00:00.710046830 1104 0x2e400 DEBUG GST_REFCOUNTING ../../gstreamer-1.2.3/gst/gstobject.c:684:gst_object_set_parent:<audioinvert> set parent (ref and sink)
    0:00:00.710079200 1104 0x2e400 DEBUG GST_REGISTRY ../../gstreamer-1.2.3/gst/gstregistrychunks.c:667:gst_registry_chunks_load_feature: Added feature audioinvert, plugin 0x400e0 audiofx
    0:00:00.710111408 1104 0x2e400 DEBUG GST_REGISTRY ../../gstreamer-1.2.3/gst/gstregistrychunks.c:547:gst_registry_chunks_load_feature: Plugin 'audiofx' feature 'audiokaraoke' typename : 'GstElementFactory'
    0:00:01.066675927 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2126:gst_structure_parse_field: trying field name 'long-name'
    0:00:01.066714805 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2177:gst_structure_parse_value: trying type name 'string'
    0:00:01.066748477 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2126:gst_structure_parse_field: trying field name 'klass'
    0:00:01.066776781 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2177:gst_structure_parse_value: trying type name 'string'
    0:00:01.066808826 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2126:gst_structure_parse_field: trying field name 'description'
    0:00:01.066836479 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2177:gst_structure_parse_value: trying type name 'string'
    0:00:01.066868525 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2126:gst_structure_parse_field: trying field name 'author'
    0:00:01.066896666 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2177:gst_structure_parse_value: trying type name 'string'
    0:00:01.066927410 1104 0x2e400 DEBUG GST_REGISTRY ../../gstreamer-1.2.3/gst/gstregistrychunks.c:590:gst_registry_chunks_load_feature: Element factory : npadtemplates=2
    0:00:01.066954250 1104 0x2e400 DEBUG GST_REGISTRY ../../gstreamer-1.2.3/gst/gstregistrychunks.c:490:gst_registry_chunks_load_pad_template: Reading/casting for GstRegistryChunkPadTemplate at address 0xb6a3e674
    0:00:01.066988085 1104 0x2e400 DEBUG GST_REGISTRY ../../gstreamer-1.2.3/gst/gstregistrychunks.c:503:gst_registry_chunks_load_pad_template: Added pad_template src
    0:00:01.067015575 1104 0x2e400 DEBUG GST_REGISTRY ../../gstreamer-1.2.3/gst/gstregistrychunks.c:490:gst_registry_chunks_load_pad_template: Reading/casting for GstRegistryChunkPadTemplate at address 0xb6a3e724
    0:00:01.067046157 1104 0x2e400 DEBUG GST_REGISTRY ../../gstreamer-1.2.3/gst/gstregistrychunks.c:503:gst_registry_chunks_load_pad_template: Added pad_template sink
    0:00:01.067080317 1104 0x2e400 DEBUG GST_REGISTRY ../../gstreamer-1.2.3/gst/gstregistry.c:574:gst_registry_add_feature:<registry0> adding feature 0x40a40 (audiokaraoke)
    0:00:01.067115127 1104 0x2e400 DEBUG GST_REFCOUNTING ../../gstreamer-1.2.3/gst/gstobject.c:684:gst_object_set_parent:<audiokaraoke> set parent (ref and sink)
    0:00:01.067147986 1104 0x2e400 DEBUG GST_REGISTRY ../../gstreamer-1.2.3/gst/gstregistrychunks.c:667:gst_registry_chunks_load_feature: Added feature audiokaraoke, plugin 0x400e0 audiofx
    0:00:01.067180845 1104 0x2e400 DEBUG GST_REGISTRY ../../gstreamer-1.2.3/gst/gstregistrychunks.c:547:gst_registry_chunks_load_feature: Plugin 'audiofx' feature 'audioamplify' typename : 'GstElementFactory'
    0:00:01.067238266 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2126:gst_structure_parse_field: trying field name 'long-name'
    0:00:01.067268359 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2177:gst_structure_parse_value:47:gst_registry_chunks_load_feature: Plugin 'audiofx' feature 'audiokaraoke' typename : 'GstElementFactory'
    0:00:01.066675927 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2126:gst_structure_parse_field: trying field name 'long-name'
    0:00:01.066714805 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2177:gst_structure_parse_value: trying type name 'string'
    0:00:01.066748477 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2126:gst_structure_parse_field: trying field name 'klass'
    0:00:01.066776781 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2177:gst_structure_parse_value: trying type name 'string'
    0:00:01.066808826 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2126:gst_structure_parse_field: trying field name 'description'
    0:00:01.066836479 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2177:gst_structure_parse_value: trying type name 'string'
    0:00:01.066868525 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2126:gst_structure_parse_field: trying field name 'author'
    0:00:01.066896666 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2177:gst_structure_parse_value: trying type name 'string'
    0:00:01.066927410 1104 0x2e400 DEBUG GST_REGISTRY ../../gstreamer-1.2.3/gst/gstregistrychunks.c:590:gst_registry_chunks_load_feature: Element factory : npadtemplates=2
    0:00:01.066954250 1104 0x2e400 DEBUG GST_REGISTRY ../../gstreamer-1.2.3/gst/gstregistrychunks.c:490:gst_registry_chunks_load_pad_template: Reading/castiElementFactory'
    0:00:01.066675927 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2126:gst_structure_parse_field: trying field name 'long-name'
    0:00:01.066714805 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2177:gst_structure_parse_value: trying type name 'string'
    0:00:01.066748477 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2126:gst_structure_parse_field: trying field name 'klass'
    0:00:01.066776781 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2177:gst_structure_parse_value: trying type name 'string'
    0:00:01.066808826 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2126:gst_structure_parse_field: trying field name 'description'
    0:00:01.066836479 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2177:gst_structure_parse_value: trying type name 'string'
    0:00:01.066868525 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2126:gst_structure_parse_field: trying field name 'author'
    0:00:01.066896666 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2177:gst_structure_parse_value: trying type name 'string'
    0:00:01.066927410 1104 0x2e400 DEBUG GST_REGISTRY ../../gstreamer-1.2.3/gst/gstregistrychunks.c:590:gst_registry_chunks_load_feature: Element factory : npadtemplates=2
    0:00:01.066954250 1104 0x2e400 DEBUG GST_REGISTRY ../../gstreamer-1.2.3/gst/gstregistrychunks.c:490:gst_registry_chunks_load_pad_template: Reading/casti547:gst_registry_chunks_load_feature: Plugin 'audiofx' feature 'audiokaraoke' typename : 'GstElementFactory'
    0:00:01.066675927 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2126:gst_structure_parse_field: trying field name 'long-name'
    0:00:01.066714805 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2177:gst_structure_parse_value: trying type name 'string'
    0:00:01.066748477 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2126:gst_structure_parse_field: trying field name 'klass'
    0:00:01.066776781 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2177:gst_structure_parse_value: trying type name 'string'
    0:00:01.066808826 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2126:gst_structure_parse_field: trying field name 'description'
    0:00:01.066836479 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2177:gst_structure_parse_value: trying type name 'string'
    0:00:01.066868525 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2126:gst_structure_parse_field: trying field name 'author'
    0:00:01.066896666 1104 0x2e400 DEBUG structure ../../gstreamer-1.2.3/gst/gststructure.c:2177:gst_structure_parse_value: trying type name 'string'
    0:00:01.066927410 1104 0x2e400 DEBUG GST_REGISTRY ../../gstreamer-1.2.3/gst/gstregistrychunks.c:590:gst_registry_chunks_load_feature: Element factory : npadtemplates=2