With this method, I was able to send Google Hangouts any video contents, such as me with a news broadcast background, while the small TV in that background is showing my desktop playing a live Youtube video.
Update: now there's an easier way: use OBS's v4l2sink plugin + v4l2loopback kernel module. See this article.
OBS is a fine tool that enables us to overlay various visual/audio sources, on the fly, for streaming and/or recording. Unfortunately, it doesn't support a virtual cam under Linux (there is a plugin that only works under Windows), i.e. I can't send a complex composition of a live desktop screen, webcam, video, etc. to Google Hangouts.
Webcamoid is another fine tool that supports output to a virtual cam under Linux, which Google Hangouts can directly use.
Several attempts were made, but I wasn't able to get a result with low enough latency for video conferencing. The video latency caused an unacceptable out-of-sync problem with the audio.
I reached an easy workaround, which is resource heavy, but works quite well.
- Use OBS to construct the target scene, say, a chroma keyed webcam, with a video background, and a logo foreground, as well as a live chat overlay.
- In OBS, right click on the preview, and project it under a separate screen.
- In Webcamoid, choose that screen as the source.
- In Google Hangouts, choose Webcamoid's virtual cam instead of the real webcam.
- Voila! Now I have full control of what others see in my video conferencing.
This solution needs one whole screen just to link OBS and webcamoid. Any of the following improvement of either project will make this workflow even better:
- When Webcamoid supports a window as a source (right now only whole screens can be sources), we can hide the window so it doesn't take up our screen real estate.
- When OBS can correctly piping a video stream into a linux virtual cam, or even better, correctly implements its own virtual cam.