How to create a mosaic with a stream in real time using ffmpeg (or using xuggle)

For a thousand minutes, I’ve been trying to find a way to stream multiple videos and combine them into one output. I want to do this with ffmpeg or xuggler with ffmpeg cmd. VirtualDub and avis cannot satisfy my needs. In fact, I could not find the path in avis. I can only make 4 8 16 videos on a virtualdub screen, but these are local videos, not my problem.

>cd c:\f\bin 

ffmpeg -i rtmp: // localhost / live / me -vf "[in] scale = iw / 2: ih / 2, pad = 2 * iw: ih [left]; movie = another stream, scale = iw / 4: ih / 4 [right]; [left] [right] overlay = main_w / 2: 0 [out] "-b: v output 768k

anyway join the two threads side by side, but I want more. Is this possible with ffmpeg? Also I can not use a program such as spycam, vlc, etc. Don't tell me vlc, the vlc console can do this easily.

+4
source share
2 answers

The FAQ for ffmpeg contains instructions for concatenating videos. Pay particular attention to the instructions in section 3.14.3, because if you understand how to use demux audio from a video and then convert each track to a raw stream, the streams can simply be concatenated.

+1
source

You can read this FFmpeg tutorial and try using real-time inputs instead of input files to achieve what you want. Also, I think you will want to use shortest=0 to avoid stopping your thread if one of your inputs becomes unavailable.

+1
source

Source: https://habr.com/ru/post/1433731/


All Articles