Combining Multiple Live streams to one

Hi,

I have a requirement of combining multiple live streams into one (assume a layout where 4 live streams are present and every stream is occupying 25% of screen) . The resultant stream should be again published back to wowza (which can be broadcasted.) I want a solution which is fully automated and can fit well with wowza workflow. The streams mentioned above have both audio and video .

I am currently exploring xuggler(api on top of ffmpeg) which looks promising but havnt had much success with writing working code . I need someone who can help me with xuggler modules. if there are better solutions than xuggler then i am ok with that too.

-Gaurav

Hi,

I’ve removed the replies from the consultants as it resulted in a sparring match between them which was not constructive at all for the original poster. Romano, please keep your replies professional and to the point and don’t engage in banter with other consultants when it comes to addressing the initial question. By all means reply again but please do stick to the question in hand.

Kind regards,

Paul

This is why special solution is needed to achieve stable overlays with reconnection functionality and so on :slight_smile:

So if someone will need this special tool, please ping me here: rshmelev@gmail.com

from command line i was able to do it using ffmpeg. thanks to a tutorial - https://trac.ffmpeg.org/wiki/Create%20a%20mosaic%20out%20of%20several%20input%20videos

but from command line i cannot put in retry logics for input streams. ie if one of the incoming streams gets dropped for sometime, the ffmpeg command continues to show that stream as dropped till i restart the command. Thats why i was trying to make xuggler work so that i can monitor the incoming streams from code and reconnect in case some stream drops for sometime. Do you think this is possible just from a ffmpeg command ?

Hi Gaurav ,here is the person you are looking for , trust me :slight_smile: about 2 years ago I was close to lose my mind about this topic :slight_smile:

If I’m not mistaken xuggler use ffmpeg library , the only difference is you can use java .

I searched all the way , join the mail group etc etc etc , finally I found a way that merging two stream with ffmpeg .

ffmpeg -i rtmp://localhost/cam/1 -vf “[in] scale=iw/2:ih/2, pad=2*iw:ih [left]; scale=iw/4:ih/4
; [left]
overlay=main_w/2:0 [out]” -b:v 768k output.

but two streams not enough for me , I tried to make it dynamically and wanna stream 4 to 16 ip camera as 1 stream .

I guess you try to do something similar.

You need to use ffmpeg filter or third party tool . Further more information please contact to me

Kind Regards,

Emre Karatasoglu

emre.karatasoglu@hotmail.com

LetheaSoftware

http://letheasoftware.com

http://emrekaratasoglu.com

Hello Gaurav, for a single stream I can do a retry logic , but actually I didn’t tested yet while combining stream. Only you can block the stream stop by shortest=0

@echo off

title receiver

call:emreFunc12

echo.&pause&goto:eof

:emreFunc12

cd c:/ffmpeg/bin

ffmpeg.exe -i “rtp://192.168.100.100:1236” bla bla bla -f flv rtmp://192.168.100.100/live?doPublish=1kLasKoqpCzxvB/receiverTv

ping -n 5 127.0.0.1

echo ping attim bitti

call:emreFunc12

goto:eof

I tried to use the same way like you , I walked the way that you are walking now , none of them actually cant solve my problem cause I wanna change the view dynamically , so I found a cheaper solution like tv channel combine programme .

Here is my question about two years ago :slight_smile:

http://stackoverflow.com/questions/12383753/how-to-create-mosaic-with-live-stream-with-ffmpeg-or-with-xuggle.

Kind Regards,

Emre Karatasoglu

emre.karatasoglu@hotmail.com

LetheaSoftware

http://letheasoftware.com

http://emrekaratasoglu.com