Command using compositor with .mp4 and .webm files.

Hi everyone,

I’m trying to build a pipeline to run in a terminal to verify its functionality. My main goal is to play a .webm video with transparency over an .mp4 video. That is, the mp4 video will be the background and the webm video will be displayed on top of it. The command I have is the following:

gst-launch-1.0 compositor name=comp sink_1::xpos=50 sink_1::ypos=50 ! videoconvert ! autovideosink filesrc location=78241210016.mp4 ! qtdemux name=demux0 demux0.video_0 ! queue ! h264parse ! avdec_h264 ! videoconvert ! videoscale ! video/x-raw,format=UYVY,width=1920,height=1080,framerate=30000/1001,interlace-mode=interleaved ! comp. filesrc location=01240430007.webm ! matroskademux ! vp9parse ! avdec_vp9 ! videoconvert ! videoscale ! video/x-raw,format=UYVY,width=320,height=240,framerate=30000/1001 ! comp. demux0.audio_0 ! queue ! aacparse ! avdec_aac ! audioconvert ! audioresample ! audio/x-raw,format=S16LE,rate=48000,channels=2 ! autoaudiosink

According to the terminal output, I don’t see any errors, but the video doesn’t seem to reach the playing state. The output is (sorry, I’m a spanish speaker):

Estableciendo el conducto a PAUSA …
El conducto está PREPARÁNDOSE …
Redistribuir latencia…
Redistribuir latencia…
Redistribuir latencia…
Redistribuir latencia…
Redistribuir latencia…
Redistribuir latencia…
0:00:00.0 / 0:12:19.0 (0.0 %)

I can’t figure out what the problem is. If it’s helpful, here are the properties of both videos, according to ffprobe:

Input #0, matroska,webm, from '01240430007.webm':
  Metadata:
    ENCODER         : Lavf58.45.100
  Duration: 00:00:10.01, start: 0.000000, bitrate: 1103 kb/s
  Stream #0:0: Video: vp9 (Profile 0), yuv420p(tv), 1920x1080, SAR 1:1 DAR 16:9, 29.97 fps, 29.97 tbr, 1k tbn (default)
      Metadata:
        ALPHA_MODE      : 1
        ENCODER         : Lavc58.91.100 libvpx-vp9
        DURATION        : 00:00:10.010000000
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '78241210016.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isomiso2avc1mp41
    creation_time   : 2024-12-10T06:51:33.000000Z
    encoder         : FFmbc 0.7
  Duration: 00:12:19.01, start: 0.000000, bitrate: 15393 kb/s
  Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(top first), 1920x1080 [SAR 1:1 DAR 16:9], 15089 kb/s, 29.97 fps, 29.97 tbr, 30k tbn (default)
      Metadata:
        creation_time   : 2024-12-10T06:51:33.000000Z
        handler_name    : VideoHandler
        vendor_id       : [0][0][0][0]
  Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 296 kb/s (default)
      Metadata:
        creation_time   : 2024-12-10T06:51:33.000000Z
        handler_name    : SoundHandler
        vendor_id       : [0][0][0][0]

I’m using 1.24.2 and Ubuntu 24.04.2 LTS

You may try something like (only overlaying videos):

gst-launch-1.0 -v \
filesrc location=background.mp4 ! decodebin ! videoscale ! videorate ! autovideoconvert ! video/x-raw,format=RGBA,width=1920,height=1080,framerate=30/1 ! queue ! comp.sink_0 \
filesrc location=yourVP9alpha.webm ! matroskademux ! queue ! parsebin ! vp9alphadecodebin ! video/x-raw,format=A420 ! queue ! videoconvert ! video/x-raw,format=RGBA ! queue ! videoscale ! videorate ! video/x-raw,format=RGBA,width=1920,height=1080,framerate=30/1 ! queue ! comp.sink_1 \
compositor name=comp \
  sink_0::width=1920 sink_0::height=1080 sink_0::zorder=1 \
  sink_1::width=1920 sink_1::height=1080 sink_1::zorder=2 \
  ! video/x-raw,format=RGBA,width=1920,height=1080,framerate=30/1 ! autovideoconvert ! autovideosink  

Thank you for your reply. I try the command you gave me and it didn’t work. The output I get is:

Estableciendo el conducto a PAUSA …
El conducto está PREPARÁNDOSE …
/GstPipeline:pipeline0/GstQueue:queue1.GstPad:sink: caps = video/x-vp9, codec-alpha=(boolean)true, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001
/GstPipeline:pipeline0/GstQueue:queue1.GstPad:src: caps = video/x-vp9, codec-alpha=(boolean)true, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001
/GstPipeline:pipeline0/GstParseBin:parsebin0.GstGhostPad:sink.GstProxyPad:proxypad17: caps = video/x-vp9, codec-alpha=(boolean)true, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001
/GstPipeline:pipeline0/GstParseBin:parsebin0/GstTypeFindElement:typefind.GstPad:src: caps = video/x-vp9, codec-alpha=(boolean)true, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src: caps = video/quicktime, variant=(string)iso
/GstPipeline:pipeline0/GstParseBin:parsebin0/GstVp9Parse:vp9parse0.GstPad:sink: caps = video/x-vp9, codec-alpha=(boolean)true, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001
/GstPipeline:pipeline0/GstParseBin:parsebin0/GstTypeFindElement:typefind.GstPad:sink: caps = video/x-vp9, codec-alpha=(boolean)true, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001
/GstPipeline:pipeline0/GstParseBin:parsebin0.GstGhostPad:sink: caps = video/x-vp9, codec-alpha=(boolean)true, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001
/GstPipeline:pipeline0/GstParseBin:parsebin0/GstVp9Parse:vp9parse0.GstPad:src: caps = video/x-vp9, codec-alpha=(boolean)true, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, alignment=(string)super-frame, profile=(string)0
/GstPipeline:pipeline0/GstParseBin:parsebin0/GstCapsFilter:capsfilter11.GstPad:src: caps = video/x-vp9, codec-alpha=(boolean)true, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, alignment=(string)super-frame, profile=(string)0
/GstPipeline:pipeline0/GstParseBin:parsebin0.GstParsePad:src_0: caps = video/x-vp9, codec-alpha=(boolean)true, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, alignment=(string)super-frame, profile=(string)0
/GstPipeline:pipeline0/GstVp9AlphaDecodeBin:vp9alphadecodebin0.GstGhostPad:sink.GstProxyPad:proxypad18: caps = video/x-vp9, codec-alpha=(boolean)true, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, alignment=(string)super-frame, profile=(string)0
/GstPipeline:pipeline0/GstVp9AlphaDecodeBin:vp9alphadecodebin0/GstCodecAlphaDemux:codecalphademux0.GstPad:src: caps = video/x-vp9, codec-alpha=(boolean)false, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, alignment=(string)super-frame, profile=(string)0
/GstPipeline:pipeline0/GstVp9AlphaDecodeBin:vp9alphadecodebin0/GstQueue:queue2.GstPad:sink: caps = video/x-vp9, codec-alpha=(boolean)false, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, alignment=(string)super-frame, profile=(string)0
/GstPipeline:pipeline0/GstVp9AlphaDecodeBin:vp9alphadecodebin0/GstCodecAlphaDemux:codecalphademux0.GstPad:alpha: caps = video/x-vp9, codec-alpha=(boolean)false, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, alignment=(string)super-frame, profile=(string)0
/GstPipeline:pipeline0/GstVp9AlphaDecodeBin:vp9alphadecodebin0/GstQueue:queue2.GstPad:src: caps = video/x-vp9, codec-alpha=(boolean)false, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, alignment=(string)super-frame, profile=(string)0
/GstPipeline:pipeline0/GstVp9AlphaDecodeBin:vp9alphadecodebin0/GstQueue:queue3.GstPad:sink: caps = video/x-vp9, codec-alpha=(boolean)false, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, alignment=(string)super-frame, profile=(string)0
/GstPipeline:pipeline0/GstVp9AlphaDecodeBin:vp9alphadecodebin0/GstCodecAlphaDemux:codecalphademux0.GstPad:sink: caps = video/x-vp9, codec-alpha=(boolean)true, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, alignment=(string)super-frame, profile=(string)0
/GstPipeline:pipeline0/GstVp9AlphaDecodeBin:vp9alphadecodebin0/GstVP9Dec:maindec.GstPad:sink: caps = video/x-vp9, codec-alpha=(boolean)false, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, alignment=(string)super-frame, profile=(string)0
/GstPipeline:pipeline0/GstParseBin:parsebin0.GstParsePad:src_0.GstProxyPad:proxypad37: caps = video/x-vp9, codec-alpha=(boolean)true, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, alignment=(string)super-frame, profile=(string)0
/GstPipeline:pipeline0/GstVp9AlphaDecodeBin:vp9alphadecodebin0/GstVP9Dec:alphadec.GstPad:sink: caps = video/x-vp9, codec-alpha=(boolean)false, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, alignment=(string)super-frame, profile=(string)0
/GstPipeline:pipeline0/GstVp9AlphaDecodeBin:vp9alphadecodebin0/GstVP9Dec:alphadec.GstPad:sink: caps = video/x-vp9, codec-alpha=(boolean)false, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, alignment=(string)super-frame, profile=(string)0
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMultiQueue:multiqueue0.GstMultiQueuePad:src_0: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)4.1, profile=(string)high, codec_data=(buffer)01640029ffe1001967640029acd94078044fde022000007d20001d4c03e2c5b2c001000468fbaf2c, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001, pixel-aspect-ratio=(fraction)1/1
Redistribuir latencia…
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)4.1, profile=(string)high, codec_data=(buffer)01640029ffe1001967640029acd94078044fde022000007d20001d4c03e2c5b2c001000468fbaf2c, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001, pixel-aspect-ratio=(fraction)1/1, coded-picture-structure=(string)field, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true
/GstPipeline:pipeline0/GstVp9AlphaDecodeBin:vp9alphadecodebin0/GstVP9Dec:alphadec.GstPad:src: caps = video/x-raw, format=(string)I420, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001
/GstPipeline:pipeline0/GstVp9AlphaDecodeBin:vp9alphadecodebin0/GstVP9Dec:maindec.GstPad:src: caps = video/x-raw, format=(string)I420, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001
/GstPipeline:pipeline0/GstVp9AlphaDecodeBin:vp9alphadecodebin0/GstAlphaCombine:alphacombine0.GstPad:src: caps = video/x-raw, format=(string)A420, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001
/GstPipeline:pipeline0/GstVp9AlphaDecodeBin:vp9alphadecodebin0.GstGhostPad:src: caps = video/x-raw, format=(string)A420, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001
/GstPipeline:pipeline0/GstCapsFilter:capsfilter7.GstPad:src: caps = video/x-raw, format=(string)A420, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001
/GstPipeline:pipeline0/GstQueue:queue4.GstPad:sink: caps = video/x-raw, format=(string)A420, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001
/GstPipeline:pipeline0/GstCapsFilter:capsfilter7.GstPad:sink: caps = video/x-raw, format=(string)A420, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001
/GstPipeline:pipeline0/GstVp9AlphaDecodeBin:vp9alphadecodebin0.GstGhostPad:src.GstProxyPad:proxypad19: caps = video/x-raw, format=(string)A420, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001
/GstPipeline:pipeline0/GstVp9AlphaDecodeBin:vp9alphadecodebin0/GstAlphaCombine:alphacombine0.GstPad:sink: caps = video/x-raw, format=(string)I420, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001
/GstPipeline:pipeline0/GstQueue:queue4.GstPad:src: caps = video/x-raw, format=(string)A420, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001
/GstPipeline:pipeline0/GstQueue:queue4.GstPad:src: caps = video/x-raw, format=(string)A420, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001
/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:src: caps = video/x-raw, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001, format=(string)RGBA
/GstPipeline:pipeline0/GstCapsFilter:capsfilter8.GstPad:src: caps = video/x-raw, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001, format=(string)RGBA
/GstPipeline:pipeline0/GstQueue:queue5.GstPad:sink: caps = video/x-raw, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001, format=(string)RGBA
/GstPipeline:pipeline0/GstCapsFilter:capsfilter8.GstPad:sink: caps = video/x-raw, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001, format=(string)RGBA
/GstPipeline:pipeline0/GstQueue:queue5.GstPad:src: caps = video/x-raw, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001, format=(string)RGBA
/GstPipeline:pipeline0/GstVideoScale:videoscale1.GstPad:src: caps = video/x-raw, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001, format=(string)RGBA
/GstPipeline:pipeline0/GstVideoRate:videorate1.GstPad:src: caps = video/x-raw, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, format=(string)RGBA
/GstPipeline:pipeline0/GstCapsFilter:capsfilter9.GstPad:src: caps = video/x-raw, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, format=(string)RGBA
/GstPipeline:pipeline0/GstQueue:queue6.GstPad:sink: caps = video/x-raw, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, format=(string)RGBA
/GstPipeline:pipeline0/GstCapsFilter:capsfilter9.GstPad:sink: caps = video/x-raw, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, format=(string)RGBA
/GstPipeline:pipeline0/GstCapsFilter:capsfilter9.GstPad:sink: caps = video/x-raw, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, format=(string)RGBA
/GstPipeline:pipeline0/GstVideoRate:videorate1.GstPad:sink: caps = video/x-raw, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001, format=(string)RGBA
/GstPipeline:pipeline0/GstVideoScale:videoscale1.GstPad:sink: caps = video/x-raw, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001, format=(string)RGBA
/GstPipeline:pipeline0/GstCompositor:comp.GstCompositorPad:sink_1: caps = video/x-raw, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, format=(string)RGBA
/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:sink: caps = video/x-raw, format=(string)A420, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001
Se obtiene contexto del elemento 'vah264dec0': gst.va.display.handle=context, gst-display=(GstObject)"\(GstVaDisplayDrm\)\ vadisplaydrm1", description=(string)"Intel\(R\)\ Haswell\ Desktop", path=(string)/dev/dri/renderD128;
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstVaH264Dec:vah264dec0: device-path = /dev/dri/renderD128
Redistribuir latencia…
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstVaH264Dec:vah264dec0.GstPad:sink: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)4.1, profile=(string)high, codec_data=(buffer)01640029ffe1001967640029acd94078044fde022000007d20001d4c03e2c5b2c001000468fbaf2c, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001, pixel-aspect-ratio=(fraction)1/1, coded-picture-structure=(string)field, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstCapsFilter:capsfilter12.GstPad:src: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)4.1, profile=(string)high, codec_data=(buffer)01640029ffe1001967640029acd94078044fde022000007d20001d4c03e2c5b2c001000468fbaf2c, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001, pixel-aspect-ratio=(fraction)1/1, coded-picture-structure=(string)field, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstCapsFilter:capsfilter12.GstPad:sink: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)4.1, profile=(string)high, codec_data=(buffer)01640029ffe1001967640029acd94078044fde022000007d20001d4c03e2c5b2c001000468fbaf2c, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001, pixel-aspect-ratio=(fraction)1/1, coded-picture-structure=(string)field, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstH264Parse:h264parse0.GstPad:sink: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)4.1, profile=(string)high, codec_data=(buffer)01640029ffe1001967640029acd94078044fde022000007d20001d4c03e2c5b2c001000468fbaf2c, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMultiQueue:multiqueue0.GstMultiQueuePad:src_1: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, stream-format=(string)raw, level=(string)2, base-profile=(string)lc, profile=(string)lc, codec_data=(buffer)119056e500, rate=(int)48000, channels=(int)2
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/avdec_aac:avdec_aac0.GstPad:sink: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, stream-format=(string)raw, level=(string)2, base-profile=(string)lc, profile=(string)lc, codec_data=(buffer)119056e500, rate=(int)48000, channels=(int)2
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstAacParse:aacparse0.GstPad:src: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, stream-format=(string)raw, level=(string)2, base-profile=(string)lc, profile=(string)lc, codec_data=(buffer)119056e500, rate=(int)48000, channels=(int)2
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstAacParse:aacparse0.GstPad:sink: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, stream-format=(string)raw, level=(string)2, base-profile=(string)lc, profile=(string)lc, codec_data=(buffer)119056e500, rate=(int)48000, channels=(int)2
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMultiQueue:multiqueue0: max-size-buffers = 5
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMultiQueue:multiqueue0: max-size-time = 0
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMultiQueue:multiqueue0: max-size-bytes = 8388608
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMultiQueue:multiqueue0.GstMultiQueuePad:sink_0: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)4.1, profile=(string)high, codec_data=(buffer)01640029ffe1001967640029acd94078044fde022000007d20001d4c03e2c5b2c001000468fbaf2c, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMultiQueue:multiqueue0.GstMultiQueuePad:sink_1: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, stream-format=(string)raw, level=(string)2, base-profile=(string)lc, profile=(string)lc, codec_data=(buffer)119056e500, rate=(int)48000, channels=(int)2
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstAacParse:aacparse0.GstPad:src: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, stream-format=(string)raw, level=(string)2, base-profile=(string)lc, profile=(string)lc, codec_data=(buffer)119056e500, rate=(int)48000, channels=(int)2
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/avdec_aac:avdec_aac0.GstPad:sink: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, stream-format=(string)raw, level=(string)2, base-profile=(string)lc, profile=(string)lc, codec_data=(buffer)119056e500, rate=(int)48000, channels=(int)2
Redistribuir latencia…
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMultiQueue:multiqueue0: max-size-buffers = 5
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMultiQueue:multiqueue0: max-size-time = 0
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMultiQueue:multiqueue0: max-size-bytes = 8388608
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMultiQueue:multiqueue0: max-size-buffers = 5
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMultiQueue:multiqueue0: max-size-time = 0
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMultiQueue:multiqueue0: max-size-bytes = 8388608
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/avdec_aac:avdec_aac0.GstPad:src: caps = audio/x-raw, format=(string)F32LE, layout=(string)non-interleaved, rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstVaH264Dec:vah264dec0.GstPad:src: caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, interlace-mode=(string)mixed, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001
/GstPipeline:pipeline0/GstVideoScale:videoscale0.GstPad:src: caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, interlace-mode=(string)mixed, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001
/GstPipeline:pipeline0/GstVideoRate:videorate0.GstPad:src: caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, interlace-mode=(string)mixed, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001
/GstPipeline:pipeline0/GstAutoVideoConvert:autovideoconvert0/GstBin:autovideoconvert-capsfiltervideoconvertscale.GstGhostPad:sink.GstProxyPad:proxypad6: caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, interlace-mode=(string)mixed, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001
/GstPipeline:pipeline0/GstAutoVideoConvert:autovideoconvert0/GstBin:autovideoconvert-capsfiltervideoconvertscale/GstCapsFilter:capsfilter1.GstPad:src: caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, interlace-mode=(string)mixed, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001
/GstPipeline:pipeline0/GstAutoVideoConvert:autovideoconvert0/GstBin:autovideoconvert-capsfiltervideoconvertscale/GstCapsFilter:capsfilter1.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, interlace-mode=(string)mixed, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001
/GstPipeline:pipeline0/GstAutoVideoConvert:autovideoconvert0/GstBin:autovideoconvert-capsfiltervideoconvertscale.GstGhostPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, interlace-mode=(string)mixed, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001
/GstPipeline:pipeline0/GstAutoVideoConvert:autovideoconvert0.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, interlace-mode=(string)mixed, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001
/GstPipeline:pipeline0/GstVideoRate:videorate0.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, interlace-mode=(string)mixed, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001
/GstPipeline:pipeline0/GstVideoScale:videoscale0.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, interlace-mode=(string)mixed, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstDecodePad:src_0.GstProxyPad:proxypad39: caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, interlace-mode=(string)mixed, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30000/1001
ERROR: del elemento /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQTDemux:qtdemux0: Internal data stream error.
Información adicional de depuración:
../gst/isomp4/qtdemux.c(7439): gst_qtdemux_loop (): /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQTDemux:qtdemux0:
streaming stopped, reason not-negotiated (-4)
ERROR: el conducto no quiere prepararse.
Estableciendo el conducto a NULL …
Liberando el conducto…

I forgot to mention that the caps I need for this example are the following:

For video:

  • Format UYVY
  • 1920x1080
  • Interlace mode: Interleaved
  • Framerate: 30000/1001

For audio:

  • Format S16LE
  • Rate: 48000
  • Channels: 2

That’s why I was using that caps in my original command.
Curiously, the mp4 video I’m using can’t be played using the decodebin element, and I only managed to do so using the qtdemux, h264parse and avdec_h264 elements. I’m a begginer using Gstreamer, so if I am providing little or incorrect information, please let me know.

Sorry, I don’t get why you need YUYV. For composing with transparency, AFAIK you would need to use a video format with alpha channel such as RGBA.

If it doesn’t work with decodebin, it should be harmless to try replacing that part of the pipeline with the part that you have working:

gst-launch-1.0 -v \
filesrc location=background.mp4 ! qtdemux name=demux \
 demux.audio_0 ! queue ! aacparse ! avdec_aac ! audioconvert ! audioresample ! audio/x-raw,format=S16LE,rate=48000,channels=2 ! autoaudiosink \
 demux.video_0 ! queue ! h264parse ! avdec_h264 ! videoscale ! videorate ! autovideoconvert ! video/x-raw,format=RGBA,width=1920,height=1080,framerate=30000/1001 ! queue ! comp.sink_0 \
filesrc location=yourVP9alpha.webm ! matroskademux ! queue ! parsebin ! vp9alphadecodebin ! video/x-raw,format=A420 ! queue ! videoconvert ! video/x-raw,format=RGBA ! queue ! videoscale ! videorate ! video/x-raw,format=RGBA,width=1920,height=1080,framerate=30000/1001 ! queue ! comp.sink_1 \
compositor name=comp \
  sink_0::width=1920 sink_0::height=1080 sink_0::zorder=1 \
  sink_1::width=1920 sink_1::height=1080 sink_1::zorder=2 \
  ! video/x-raw,format=RGBA,width=1920,height=1080,framerate=30000/1001 ! autovideoconvert ! autovideosink