Search code examples
videovideo-streamingvideo-processinglive-streamingtwitch

How to automate video editing for streaming


Let me describe the problem I am facing:

I would like to record a room with a fixed camera, and put the video live on Twitch. In the room will be present two ore three people talking around a table, wearing hoodies.
Here comes the problem: I would like to obscure the faces of the people in the shot, for example by making the region under the hood black, or by drastically reducing the luminosity of that region in the video. This editing work must be performed live and automatically, by some sort of script, since the video is to be streamed live.
Facing this challenge I came up with the following technique, let me know if it is any good: I though of putting colour markers on the faces of the people in the shot, or maybe colour markers all around the border of the hood, let's say yellow markers. Then I will clean the room of anything else yellow and use the color as reference to tell my script where to perform the video modding. This seems to me like a good plan; I have seen that OBS has a face recognition function, but I fear it will be not completely accurate, leading to faces getting flashed in the live footage.

Problem is I have no idea how to start implementing this functionality! I don't know, in practice, where to start. I need to get the video signal on my machine, somehow pass it to some script, and then pass it to Twitch. How can I do this? What language should I use? For example: is there some sort of python module to handle things like this? Should I somehow just use OBS?


Couple of last notes:

Hiding the faces is not a strict need, is just for mood and aesthetics purpose. So no top security is required.
Also at the table there will be drinks, so the method by which we hide the faces must be resilient to people putting glasses near their faces; for this reason I think colour markers around the borders of the hood is the best bet, but feel free to propose something else.


Solution

  • Hi so depending on what streaming software you are using there are different ways of going about it, can you drop a comment letting me know which software you are planning on using, if you haven't got streaming software then I would say that https://obsproject.com/ isn't a bad place to start. I haven't tried blurring my face before but this https://www.youtube.com/watch?v=fQmBs3PRpOA looks like a good place to start. I doubt you will have to use any coding.