[vlc-devel] full screen overlay for automatic projection mapping

Steve Lhomme robux4 at ycbcr.xyz
Mon Oct 7 08:38:16 CEST 2019


On 2019-10-04 1:38, Andras Szalai wrote:
> I am trying to develop a filter plugin to fix some projection issues for 
> my home cinema setup. I got as far as writing and compiling a simple 
> out-of-tree video filter plugin that modifies the video by moving some 
> pixels around.
> Eventually I want to be able to do an automatic calibration. The filter 
> would work in tandem
> with a companion smartphone app. The filter plugin would render some 
> specific patterns on the full screen output, the smartphone app would 
> analyze the patterns and communicate back to the plugin somehow. This 
> would be great for correcting for wobbly projection screens.

That sounds like a great project.

> The problem I am having is that filter plugins work on the video, not on 
> the output, so I don't have a way to render to the "black areas".
> I want to avoid writing an output plugin as that would be a lot more 
> work and would be platform dependent.
> My video filter plugin can potentially resize the video to match the 
> size of the output, but this would be inefficient and everything 
> downstream of the plugin would be working on a larger resolution video.

I think in the current state of VLC a filter cannot really resize it's 
output, in the end a filter will be added to get back to the original 
size of the source.

When we have push (a couple of weeks away) things will change. You'll be 
able to add a filter to change the output size and all following filters 
(if any) will use that as the input/output size, and that's how it will 
be displayed.

IMO for your use case there's no other option than output the size of 
your projector with the black bars added on your side. That's the only 
way you can guarantee what you're modifying matches exactly your display 
physical properties.

> I am new to VLC internals. Is there a way to render an overlay (e.g. a 
> checkerboard pattern) from a filter plugin such that it potentially 
> covers the entire full screen output?

It might be doable with the logo plugin, the logo being your pattern of 
the size of the display and semi transparent.

More information about the vlc-devel mailing list