Rembg Video Virtual Green Screen Edition

Overview

Rembg Virtual Greenscreen Edition (Dr. Tim Scarfe)

Rembg Virtual Greenscreen Edition is a tool to create a green screen matte for videos

Video Virtual Green Screen Edition

15th Jan 2021 -- made a new YouTube explainer

  • Take any video file and convert it to an alpha matte to apply for a virtual green screen
  • It runs end-to-end non-interactively
  • You need ffmpeg installed and on your path
  • There is also a powershell script ./remove-bg.ps1 which will do the job in a manual way i.e. first create frames, then run the rembg -p ... command and then run ffmpeg to create the matte movie. This was my first approach to solve this problem but then I migrated onto just making a new version of rembg.

If you have any ideas for speeding this up further, please let us know. We have tried quite a few things at this stage and are a bit stuck on how to proceed from here. See some of the "evolution" in the Whimsical notes.

Usage;

pip install rembg-greenscreen

greenscreen -g "path/video.mp4"

Experimental parallel green screen version;

greenscreen --parallelgreenscreen "path/video.mp4" --workernodes 3 --gpubatchsize 5

The command above will produce a video.matte.mp4 in the same folder, also works with mov and avi extensions. Uses ffmpeg under the hood to stream and re-encode the frames into a grayscale matte video.

Be careful with the default parameters, my 11GB GPU is already pretty much maxed with 3 instances of the NN with 5 image gpu batches in forward pass.

You can see how much free GPU ram you have with

nvidia-smi

CLI interface

Important notes

  • Don't use VBR videos, it will run forever -- use Handbrake to convert them to CFR

References

License

  • Copyright (c) 2020-present Daniel Gatis
  • Copyright (c) 2020-present Dr. Tim Scarfe
  • Copyright (c) 2020-present Lucas Nestler (Making it go faster and more stuff running on the GPU, thanks Lucas!)

Licensed under MIT License

Owner
Tim Scarfe
Principal Software Engineer @Microsoft. Ph.D in Machine Learning.
Tim Scarfe
Python based script to operate FFMPEG.

FMPConvert Python based script to operate FFMPEG. Ver 1.0 -- 2022.02.08 Feature ✅ Maximum compatibility: Third-party dependency libraries unused ✅ Che

cybern000b 1 Feb 28, 2022
Python bindings for FFmpeg - with complex filtering support

ffmpeg-python: Python bindings for FFmpeg Overview There are tons of Python FFmpeg wrappers out there but they seem to lack complex filter support. ff

Karl Kroening 7.7k Jan 03, 2023
Code for the manim-generated scenes used in 3blue1brown videos

Code for the manim-generated scenes used in 3blue1brown videos

Grant Sanderson 4.1k Jan 09, 2023
goal: render videos on eu4's timeline function

Rendering Videos on the EU4 Time Line This repository contains code to create an eu4-savefile that plays back a video in question.

29 Dec 24, 2022
TkVideoplayer - This is a simple library to play video files in tkinter.

TkVideoplayer - This is a simple library to play video files in tkinter.

Art/Paul 38 Dec 23, 2022
Converts Betaflight blackbox gyro to MP4 GoPro Meta data so it can be used with ReelSteady GO

Here are a bunch of scripts that I created some time ago as a proof of concept that Betaflight blackbox gyro data can be converted to GoPro Metadata F

108 Oct 05, 2022
A multithreaded view bot for YouTube

Simple program to increase YouTube views written in Python.

Monirul Shawon 906 Jan 09, 2023
In this project, we will be blurring the background in a live video feed

In this project, we will be blurring the background in a live video feed. This can be further integrated into online meetings, streamings etc.

Hassan Shahzad 2 Jan 06, 2022
pyYotubemanager is full web automated bot capable of General tasks like:- Uploading a Video , Downloading , adding Title , Description , Listing types , adding Thumbnail

PyYoutubemanager Explore the docs » View Demo · Report Bug · Request Feature About The Project PyYotubemanager is full web automated bot capable of Ge

4 Jun 29, 2022
KonomiTV: Kind and Optimized Next brOadcast watching systeM Infrastructure for TV

備考・注意事項 現在 α 版で、まだ実験的なプロダクトです。通常利用には耐えないでしょうし、サポートもできません。 安定しているとは到底言いがたい品質ですが、それでも構わない方のみ導入してください。 使い方などの説明も用意できていないため、自力でトラブルに対処できるエンジニアの方以外には現状おすすめ

tsukumi 244 Dec 31, 2022
GStreamer Inspector GUI

gst-explorer GStreamer GUI Interface Tool GUI interface for inspecting GStreamer Plugins, Elements and Type Finders. Expects Python3 Qt, PyQt5 and GSt

Jetsonhacks 31 Nov 29, 2022
Streamlink is a CLI utility which pipes video streams from various services into a video player

Streamlink is a CLI utility which pipes video streams from various services into a video player

8.2k Dec 26, 2022
A project that uses optical flow and machine learning to detect aimhacking in video clips.

waldo-anticheat A project that aims to use optical flow and machine learning to visually detect cheating or hacking in video clips from fps games. Che

RicanSamurai 542 Dec 03, 2022
Wonkey - an open source programming language for the creation of cross-platform video games

Wonkey Programming Language Wonkey is an open source programming language for the creation of cross-platform video games, highly inspired by the “Blit

Wonkey Coders 110 Nov 09, 2022
LL-HLS implementation written in Python3

biim mpegts stream to Apple Low Latency HLS Feature mpegts demuxing in pure python3 (using asyncio) mpegts stream to fragmented ts use piping from ffm

もにょ~ん 15 Jan 03, 2023
Extracting frames from video and create video using frames

Extracting frames from video and create video using frames This program uses opencv library to extract the frames from video and create video from ext

1 Nov 19, 2021
Add a "flame" effect on each hand's index onto a video stream.

Add a "flame" effect on each hand's index onto a video stream. recording.webm.mov This script is just a quick hack, it's a bit of glue between mediapi

Paul Willot 7 Sep 15, 2022
A way to run youtube videos in TTY

TTY youtube client its finally here, the one thing literally NO ONE ASKED FOR!! A way to run youtube videos in TTY Dependencies: (pip) yt-search (syst

1 Nov 28, 2021
pyffstream - A CLI frontend for streaming over SRT and RTMP specializing in sending off files

pyffstream - A CLI frontend for streaming over SRT and RTMP specializing in sending off files

Gregory Beauregard 3 Mar 04, 2022
Media player custom component which works with MQTT.

Media player custom component which works with MQTT. I designed this to specifically work with a ESP32 which i used to control a speakercraft amp.

2 Feb 10, 2022