Black Frame Detection

Detect video intervals that are (almost) completely black. Can be useful to detect chapter transitions, commercials, or invalid recordings. Output lines contains the time for the start, end and duration of the detected black interval expressed in seconds.

🚧

Note

Maximum number of “black” segments to clip out is limited to 150.

<?xml version="1.0"?>
<query>
    <userid>[UserID]</userid> <!-- required-->
    <userkey>[UserKey]</userkey> <!-- required-->
    <action>[Action]</action> <!-- required-->
    <source>[SourceFile]</source> <!-- required-->
    <format>
        <output>[output]</output> <!-- required -->
        <cut_black>
            <enable>[yes|no]</enable>
            <black_min_duration>[Duration]</black_min_duration>
            <pixel_black>[PixelThreshold]</pixel_black>
            <picture_black_ratio>[PictureThreshold]</picture_black_ratio>
            <trim>[yes|no]</trim>
            <pixel_black_mv>[PixelMillivoltsThreshold]</pixel_black_mv>
            <silence_check>[yes|no]</silence_check>
            <silence_threshold>[SilenceThreshold]</silence_threshold>
        </cut_black>
        <!-- format parameters -->
    </format>
</query>
{
    "query": {
        "userid": "[UserID]", // required
        "userkey": "[UserKey]", // required
        "action": "[Action]", // required
        "source": "[SourceFile]", // required
        "format": {
            "output": "[output]", // required
            "cut_black": {
                "enable": "[yes|no]",
                "black_min_duration": "[Duration]",
                "pixel_black": "[PixelThreshold]",
                "picture_black_ratio": "[PictureThreshold]",
                "trim": "[yes|no]",
                "pixel_black_mv": "[PixelMillivoltsThreshold]",
                "silence_check": "[yes|no]",
                "silence_threshold": "[SilenceThreshold]"
            }
            // format parameters
        }
    }
}
ParameterDescriptionAllowed ValuesDefault Value
enableEnable black frame detection and clipping.yes, nono
black_min_durationSpecify the shortest black frame duration in seconds.Positive float number2.0
pixel_blackThreshold for classification pixels as black.Positive float number less than 1.

0 – Pixel must be absolutely black to be classified as black.

0.99 – The lightest pixels would be classified as black.
0.00
picture_black_ratioThreshold for classification frame as black.Positive float number less or equals to 1.

1 – Frame must have only “black” pixels to be classified as “black” frame.

0 – Frame can have no black pixels to be classified as “black” frame.
1
trimTrim black frames only from start and end of the videoyes, nono
pixel_black_mvThreshold for classification pixels as black in millivolts.Float number between 0.00 and 714.00 inclusive0
silence_checkDetect black frames only if audio recognized as silentyes, nono
silence_thresholdNoise tolerance in dBInteger number-60