A program designed to detect 'bad eges', blanking issues ( inconsistency of black bars )
in video files.
This software's aim is to detect small black bars that can appear during the color grading process.This kind of issue is often caused by resized or tilt during color grading?
It runs on Macos 10.14 and up. It should be possible to run it on Windows and Linux with a
few code tweaks. Let me know if you're interested
- Video Codec and resolution agnostic (thanks to the ffmpeg library)
- Reports files as HTML and EDL to import in DaVinci Resolve
- Adjustable resolution offsets
The installer can be found in the Release a section or through this alternative link
You must have Python 3.6 installed on your system.
In an empty directory execute the following commands :
Start by cloning this repository
git clone https://github.com/NicolasReaItalo/CropDetect.git
cd CropDetectCreate a virtual environment
python3.6 -m venv env
source env/bin/activateUpgrade pip and install the libraries
pip install --upgrade pip
pip install -r requirements.txtLauch the program with :
fbs runOr buid the executable with :
fbs freezeOnce the executable is built you can create an installer with :
fbs installer- Add video files to test with the "Add job" button
- Foreach job you can specify the report folder location
- The start and end frames of th analysis
- The pixel offsets (to avoid false positive on masters with inner blanking)
- Press the start button to begin the analysis on all the job in the queue
Once the analysis is complete, you can open the report folder.
Open the html report to get a summary of the detected issues.
- Create a new project
- Import the tested video file
- Create a new timeline using this clip
- The timeline start TC must be set at 00:00:00:00
- Open the timeline and import the EDL as timeline markers
- The detected issues appear as red markers on the timeline
def test_line_blanking(self, line):
b_max = numpy.max(line[:, :, 0])
g_max = numpy.max(line[:, :, 1])
r_max = numpy.max(line[:, :, 2])
if (b_max <= LUMA_TRESHOLD and g_max <= LUMA_TRESHOLD and r_max <= LUMA_TRESHOLD):
nb_line = cv2.cvtColor(line, cv2.COLOR_BGR2GRAY)
var_line = numpy.var(nb_line)
if var_line <= VAR_TRESHOLD:
return True
return False- The version of python used is 3.6
- The video decoding is done using the FFMPEG library
- The calculation and dispaying are done using OPENCV and NUMPY
- The packaging is done thanks to the FBS packaging system
CropDetect is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.









