gstreamer命令编写(pip)两个视频

时间:2010-10-13 18:18:38

标签: video video-processing gstreamer video-editing

我应该在gstreamer中执行什么命令才能将两个320x240视频组合成一个640x240的并排视频?

假设我有video1.avi和video2.avi

1 个答案:

答案 0 :(得分:5)

videomixer插件拯救:

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 \