How to cut a movie by a quarter and display on 4 monitors?

I would like to make a large display by placing monitors side by side.

Any layout (3x4, etc.), but let now insert 2x2.

Presumably, I need to open a video file, get each frame, divide it into 4 and write each part to a new video file (with the corresponding title).

Are there any FOSS components or libraries that can help with this, or should I code this code myself?

Oh, by the way, I would also like to do the same with still images.


Update. Maybe I needed a lot, and I was thinking about a Windows-based controller that communicates over TCP / IP with a bunch of built-in devices, one per display. I thought this was not relevant to the issue, but it could prevent people from looking for alternative solutions.


Update: thanks for all the comments and questions. I may need up to 20x20 monitors or perhaps even more (think of a "video wall" made from 21 "TFT).

If one magic graphics card can handle this, then this is obviously the way to go.

Otherwise, I will have a computer with a β€œcontroller”, which allows the user to select video files, and then cut them accordingly and sends each section to one MCU, which controls one display. The microcontrollers will store their piece of each video stream, and then the controller will send a short command via TCP / IP to let each of them start playing the video fragment # X. This should synchronize them (I thought I would have to do this, so the original the question didn’t even bother to explain, just ask how to chop).

+4
source share
3 answers

Use mencoder with the -vf option and use crop=b:h:x:y as a filter.

By doing this (bxh = n) times, you can generate the required number of videos even from a batch file.

For still images, a similar solution is convert with the -crop option

+6
source

Using DirectShow, you can visualize part of the video image on different monitors using an infinite Pin-tee and several visualizers, as shown below.

enter image description here

The number of monitors supported by one PC depends on the CPU and graphics.

Syncing across multiple computers is not as simple as sending a playback message over TCP - it just won’t work. I would recommend setting up one computer as a synchronization master, which plays video normally, and each slave will listen and look for the time code sent from the master.

Video coding can also affect the ability to synchronize efficiently, so do not encode with any internal frames, the MJPEG codec can be a good choice.

Image overlays must be performed based on each renderer, and the method used depends on the choice of renderer. The above example uses EVR, and therefore overlays can be performed using IMFVideoMixerBitmap.

+1
source

You can use ffmpeg oe mencoder (based on ffmpeg), if you want to write codes to complete this task, you can do it with opencv.

+1
source

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


All Articles