Putting a video inside another video

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Putting a video inside another video

myaspm
Hi,

I was trying to play a video inside another video but i couldn't get it. I could get a videotestsrc inside webcam with this pipe :

gst-launch-1.0 -e videomixer name=mix  sink_0::xpos=0   sink_0::ypos=0  sink_1::xpos=0   sink_1::ypos=0  ! queue ! videoconvert ! x264enc ! h264parse ! rtph264pay ! udpsink host=127.0.0.1 port=5200 v4l2src ! video/x-raw, framerate=30/1  ! mix.sink_0 videotestsrc pattern="ball" ! alphacolor ! videoconvert ! videoscale  ! video/x-raw,format=AYUV,width=100,height=100  ! mix.sink_1

but i couldn't get this work with two file sources. What should i do? Thanks in advance.
Reply | Threaded
Open this post in threaded view
|

Re: Putting a video inside another video

Vinod Kesti
file source and decode bin replacing videotestsrc it should possible.
Can you share your pipeline ??
Reply | Threaded
Open this post in threaded view
|

Re: Putting a video inside another video

myaspm
Yeah i got it working now, i forgot to use decodebin.

Final pipeline :

gst-launch-1.0 -ve videomixer name=mixer sink_1::alpha=0.5 sink_1::xpos=50 sink_1::ypos=50 ! videoconvert ! autovideosink sync=true \
          filesrc location=FILE1 ! decodebin name=db ! queue2 ! mixer. \
          filesrc location=FILE2 ! decodebin ! queue2 ! mixer. \
          db. ! audioconvert ! pulsesink

This also plays first videos sound. Any advice about improvements? How should i encode the raw videos coming out from decodebin for more smoothness and/or performance?
Reply | Threaded
Open this post in threaded view
|

Re: Putting a video inside another video

Tim Müller
On Thu, 2017-08-24 at 00:03 -0700, myaspm wrote:

Hi

I'd recommend using compositor instead of videomixer - it's basically
the future replacement for videomixer.

You might want to also put a "queue" element between
compositor/videomixer and the sink.

Cheers
 -Tim

--
Tim Müller, Centricular Ltd - http://www.centricular.com

Join us at the GStreamer Conference!
21-22 October 2017 in Prague, Czech Republic
http://gstreamer.freedesktop.org/conference/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel