chatGPT 님께 물어보니 tee나 queue 대신 videomixer를 알려주시는데
videomixer의 경우 특이하게(?) sink_%u 라고 여러개의 sink를 받을 수 있는 엘리먼트이다.
Pad Templates sink_%u video/x-raw: format: { AYUV, BGRA, ARGB, RGBA, ABGR, Y444, Y42B, YUY2, UYVY, YVYU, I420, YV12, NV12, NV21, Y41B, RGB, BGR, xRGB, xBGR, RGBx, BGRx } width: [ 1, 2147483647 ] height: [ 1, 2147483647 ] framerate: [ 0/1, 2147483647/1 ] Presence – request Direction – sink Object type – GstPad src video/x-raw: format: { AYUV, BGRA, ARGB, RGBA, ABGR, Y444, Y42B, YUY2, UYVY, YVYU, I420, YV12, NV12, NV21, Y41B, RGB, BGR, xRGB, xBGR, RGBx, BGRx } width: [ 1, 2147483647 ] height: [ 1, 2147483647 ] framerate: [ 0/1, 2147483647/1 ] Presence – always Direction – src Object type – GstPad |
[링크 : https://gstreamer.freedesktop.org/documentation/videomixer/index.html?gi-language=c]
그럴싸 하게 주는데 막상 실행하면 에러 -_-
$ gst-launch-1.0 \ v4l2src device=/dev/video0 ! video/x-raw,width=640,height=480 ! videorate ! videoconvert ! videocrop top=0 left=0 right=640 bottom=480 ! \ videomixer name=mix \ sink_0::xpos=0 sink_0::ypos=0 sink_0::alpha=0 \ v4l2src device=/dev/video1 ! video/x-raw,width=640,height=480 ! videorate ! videoconvert ! videocrop top=0 left=0 right=640 bottom=480 ! \ sink_1::xpos=640 sink_1::ypos=0 sink_1::alpha=0 \ ! videoconvert ! autovideosink (gst-launch-1.0:11399): GStreamer-CRITICAL **: 12:04:11.113: gst_element_link_pads_filtered: assertion 'GST_IS_BIN (parent)' failed WARNING: erroneous pipeline: syntax error |
'프로그램 사용 > gstreamer' 카테고리의 다른 글
gst-inspector.c (0) | 2023.04.06 |
---|---|
gstreamer videomixer 반쪽 성공 (0) | 2023.03.27 |
gstreamer pad - sink 와 src (0) | 2023.03.27 |
gstreamer cheat sheet - tee, queue (0) | 2023.03.22 |
gstreamer를 이용하여 uvc 웹캠 (mjpg) 보기 (0) | 2023.03.22 |