Skip to content

remove black frames from a video. Simple python file to create ffmpeg commands. Originally started in a stackexchange question (https://superuser.com/a/1697654/739491)

License

Notifications You must be signed in to change notification settings

FarisHijazi/deblack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

deblack

remove black frames from a video. Simple python file to create ffmpeg commands

Usage

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.

prerequisites

Click to expand

Python3

You need to have python 3 installed in the command line

FFmpeg

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

History

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

Development

Click to expand

Create test video

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

Add pre-commit hooks

this will format files before commiting

pip install pre-commit
pre-commit install

(github actions available)

About

remove black frames from a video. Simple python file to create ffmpeg commands. Originally started in a stackexchange question (https://superuser.com/a/1697654/739491)

Topics

Resources

License

Stars

Watchers

Forks

Languages