What command should I execute in gstreamer in order to compose two 320x240 videos into a single 640x240 side-by-开发者_如何学Goside video?
let's say I have video1.avi and video2.avi
videomixer plugin to the rescue:
gst-launch -v \
filesrc location=video1.avi ! avidemux name=demux1 \
filesrc location=video2.avi ! avidemux name=demux2 \
videomixer name=mix \
sink_0::xpos=0 sink_0::ypos=0 sink_0::alpha=0 \
sink_1::xpos=0 sink_1::ypos=0 \
sink_2::xpos=320 sink_2::ypos=0 \
! xvimagesink \
videotestsrc pattern="black" \
! video/x-raw-yuv,width=640,height=240 \
! mix.sink_0 \
demux1.video_00 \
! queue ! decodebin ! ffmpegcolorspace ! videoscale \
! video/x-raw-yuv,width=320,height=240 \
! mix.sink_1 \
demux2.video_00 \
! queue ! decodebin ! ffmpegcolorspace ! videoscale \
! video/x-raw-yuv,width=320,height=240 \
! mix.sink_2 \
精彩评论