Talk:VLC HowTo/Make a mosaic

From VideoLAN Wiki
Jump to navigation Jump to search

Hi all, I was wondering if it was possible to use a 'dynamic' background image, for example an image on which one could read the hour ?

When you define the mosaic, is the background image reloaded sometimes or just loaded once when starting ?

Several solutions are available : 1/ You can use several images with the switcher module (but i don't think those can be changed once the switcher module is launched) 2/ You can use another video stream as the background (instead of a fixed image). This image can be generated with VLC and you can use the marq, logo or time video filters that can be updated real time.


I've set up the mosaic example and I run the example with:

./vlc -- color -- extraintf telnet -- vlm-conf ../custom_vlc/mosaic.vlc.conf

Some times the mosaic stay inside of the "window" wxWindow, and other times the mosaic stay outside of the "window" wxWindow. Somebody knows as to assert that the mosaic always stays inside of the "window" wxWindows?



Would it be possible to compile a win32 binary with the older ffmpeg source so that mosaic can function under Windows?

I would really like to get this working and tried compiling under Mandriva LE 2005 but ran into too many troubles.


How I can change in execution time the mosaic-order, and others mosaic's attributes?

Something more in depth please

This page would really benefit from a more thorough description of the elements. An example is helpful, but there's not really a lot of description of what's going on under the hood.

So you want to know how mosaic really works from a developper's point of view? Or just some enhanced description of everything involved in setting up a mosaic in VLC? Dionoea 09:59, 14 December 2006 (CET)
Well, the problem is that it isn't clear how these components are connected. For example, what is mosaic-bridge, what is bridge-in, and what is bridge-out, and how do these things fit together? It seems like bg is having its output piped to bridge-in; however, where and how is mosaic-bridge connected to the main bridge? The example helps, but since no explanation is given for how the individual pieces together, it's tough to generalize and extend/change the example to fit my needs. I've been mostly trying to figure out how things work by changing things and seeing where the mosaic breaks.--Ianarcher 17:56, 14 December 2006 (CET)
Ok. I'll improve this howto (and put it in the VLC Documentation). Dionoea 18:07, 14 December 2006 (CET)
One thing I'm confused about, for example, is that running a mosaic with the transform filter causes weird artifacts in windows. For example, a vertical flip causes the streams to be both flipped and have their original displayed simultaneously! It is unclear where the display and the bridge fit together!

VLM example didn't quite work as expected

While a very good jumping-off point, at least for me the VLM example created extra streams of each input which opened an additional window for every mosaic stream on the client viewer. It also tended to crash the client whether the mosaic stream was opened via SAP or with a direct UDP URL.

So I changed the following:

 setup channel1 output #duplicate{dst=mosaic-bridge{id=1,height=144,width=180},select=video,dst=bridge-out{id=1},select=audio}                                                         

to:

 setup channel1 output #duplicate{dst=mosaic-bridge{id=1,height=144,width=180}} 

to make everything work as expected.

However, that said, none of my input streams contain audio, so I have no idea if this change created a problem I don't know about. Also, I'm not confident enough in this change to edit the Wiki page itself, so I will leave this to others to confirm.

As an aside, it might be mentioned somewhere along the line that mosaic processing takes considerable horsepower. My normal VLC test machine might be a wheezy old (1.2GHz) PC, and it has worked fine for everything... up to this. A four-tile mosaic brought it to its knees. Success took 60% on both CPUs of a 2 GHz dual-core Intel, which is pretty intense.

If you don't have any audio, a plain
setup channel1 output #mosaic-bridge{id=1,height=144,width=180}
should be enough. (Since you don't have to split the input stream in order to blend the video and append the audio elementary stream)
About your load problem, that's to be expected. You have to decode the 4 input videos, scale them, blend them on the background (decode the background too) and then encode the whole thing. So that takes a bit more processing power than the usual 1 video setups. If you're using the developpement version of VLC, you can add a chroma option the mosaic-bridge module. Setting it to I420 will improve your blending performance considerably.
I hope this helps,
Dionoea 14:30, 10 December 2007 (CET)