benasio
benasio

Reputation: 529

GStreamer Picture in Picture rtmp to rtmp

How to mix two rtmp streams in gstreamer?

Src: nginx-rtmp cams - h.264/speex Sink: nginx-rtmp

GStreamer 0.10 or 1.0

 ----------        -------
| rtmp src |----->|       |
 ----------       |       |       ---------- 
                  | video |----->| rtmp sink|
 ----------       | mixer |       ----------  
| rtmp src |----->|       |
 ----------       |       |
                   -------

Upvotes: 3

Views: 1371

Answers (2)

Santosh Shingare
Santosh Shingare

Reputation: 281

I manually publish two stream on Red5 server (Santosh, Amit), using following pipeline I can able to mix two stream and publish another stream on Red5 (Test).

GST_DEBUG=videomixer:6 gst-launch-1.0 videomixer sink_1::xpos=10\ sink_1::ypos=0 sink_2::xpos=10 sink_1::ypos=220 sink_3::xpos=50 \sink_1::ypos=120  name=mix ! videoconvert ! video/x-raw, height=500, \width=1000 ! x264enc tune=zerolatency bitrate=2000 ! flvmux ! rtmpsink \location='rtmp://xx.xx.xx.xx/oflaDemo/Test live=1'  rtmpsrc name=src1 \location='rtmp://xx.xx.xx.xx/oflaDemo/Amit live=1' ! decodebin ! \mix.sink_1 rtmpsrc name=src2 \location='rtmp://xx.xx.xx.xx/oflaDemo/Santosh live=1' ! decodebin !\ mix.sink_2

Upvotes: 2

Havard Graff
Havard Graff

Reputation: 2840

You can achieve this with videomixer, videoscale and videobox.

This answer should give you some ideas: Can I use the Gstreamer API to merge 2 videos?

Upvotes: 3

Related Questions