Merge 2 videos side-by-side

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Merge 2 videos side-by-side

Ormi
Hi,

My machine is ArchLinux 4.8.13-1-ARCH
I am trying to mix 2 videos together side by side, simultaneously with Gstreamer(months before I was using ffmpeg so far).

I was trying different approaches like...

1)
gst-launch-0.10 -v \
filesrc location=drop.avi ! avidemux name=demux1 \
filesrc location=drop.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=256 sink_2::ypos=0 \
    ! xvimagesink \
videotestsrc pattern="black" \
    ! video/x-raw-yuv,width=512,height=240 \
    ! mix.sink_0 \
demux1.video_00 \
    ! queue ! decodebin ! ffmpegcolorspace ! videoscale \
    ! video/x-raw-yuv,width=256,height=240 \
    ! mix.sink_1 \
demux2.video_00 \
    ! queue ! decodebin ! ffmpegcolorspace ! videoscale \
    ! video/x-raw-yuv,width=256,height=240 \
    ! mix.sink_2


But this crash on:
ERROR: pipeline doesn't want to preroll.
(which is my most common error in all approaches)
I can't really understand what is the meaning of this error.

2)
gst-launch filesrc location=Flamingo_HD.mp4 ! decodebin2 ! queue2 ! videoscale ! ffmpegcolorspace ! video/x-raw-rgb,width=320,height=180 ! ffmpegcolorspace ! videobox left=-320 border-alpha=0 ! videomixer2 name=mix ! ffmpegcolorspace ! ximagesink filesrc location=Flamingo_HD.mp4 ! decodebin2 ! videoscale ! ffmpegcolorspace ! queue2 ! video/x-raw-rgb,width=320,height=180 ! ffmpegcolorspace ! videobox border-alpha=0 ! mix.


I have working version of merge 2 videos to 1 in queue, is there a posibility to change to to side-by-side?
gst-launch-1.0 concat name=c ! queue ! avdec_h264 ! queue ! videoconvert ! videoscale ! autovideosink filesrc location=video1.mp4 ! qtdemux ! h264parse ! c. filesrc location=video2.mp4 ! qtdemux ! h264parse ! c.

Thanks!
Ormi