remove black frames from a video. Simple python file to create ffmpeg commands
Download:
pip install git+https://github.com/FarisHijazi/deblack
And then just run the bellow command, and the output should be saved as myvideo.out.mp4
deblack path/to/myvideo.mp4
If the above doesn't work, then check the prerequisites section for more detailed installation instructions.
Click to expand
You need to have python 3 installed in the command line
You need to have ffmpeg
installed somehow, there are many ways to download it, one way is to download the binary (.exe) and put it in the same directory (make sure it's called ffmpeg.exe)
https://ffmpeg.org/download.html
# windows (run this in powershell)
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
choco install -y ffmpeg
# linux ubuntu
sudo apt install -y ffmpeg
# mac
brew install ffmpeg
Click to expand
This project originally started in as a Gist here.
This is a combination from multiple solutions found in the bellow 2 links:
helpful resources
Click to expand
python test/gen_bw_video.py --outpath test/bw.mp4 # create test video
python deblack/deblack.py test/bw.mp4 # run deblack on test video
this will format files before commiting
pip install pre-commit
pre-commit install
(github actions available)