08 February 2018 - Remove Grain and Black Frames Detection
almost 7 years ago by Encoding.com Product Team
Remove Grain Video Filter
<?xml version="1.0"?>
<query>
<action>AddMedia</action>
<userid><<id>></userid>
<userkey><<key>></userkey>
<format>
<output>[SingleBitrateVideoOutput]</output>
<remove_grain>[m1:m2:m3:m4]</remove_grain>
</format>
</query>
{
"query": {
"action": "AddMedia",
"userid": "<<id>>",
"userkey": "<<key>>",
"format": {
"output": "[SingleBitrateVideoOutput]",
"remove_grain": "[m1:m2:m3:m4]"
}
}
}
<?xml version="1.0"?>
<query>
<action>AddMedia</action>
<userid><<id>></userid>
<userkey><<key>></userkey>
<format>
<output>[AdvancedMultiBitrateVideoOutput]</output>
<stream>
<remove_grain>[m1:m2:m3:m4]</remove_grain>
</stream>
</format>
</query>
{
"query": {
"action": "AddMedia",
"userid": "<<id>>",
"userkey": "<<key>>",
"format": {
"output": "[AdvancedMultiBitrateVideoOutput]",
"stream": {
"remove_grain": "[m1:m2:m3:m4]"
}
}
}
}
Field Name | Description | Allowed Values | Default Values |
---|---|---|---|
remove_grain | The removegrain filter is a spatial denoiser for progressive video. | 4 integer numbers(from 0 to 23 including) separated with colon. Each number specifies filter for each plane. For example: 4:4:4:4 Available modes: 0 - Leave input plane unchanged. Default. 1 - Clips the pixel with the minimum and maximum of the 8 neighbour pixels. 2 - Clips the pixel with the second minimum and maximum of the 8 neighbour pixels. 3 - Clips the pixel with the third minimum and maximum of the 8 neighbour pixels. 4 - Clips the pixel with the fourth minimum and maximum of the 8 neighbour pixels. This is equivalent to a median filter. 5 - Line-sensitive clipping giving the minimal change. 6 - Line-sensitive clipping, intermediate. 7 - Line-sensitive clipping, intermediate. 8 - Line-sensitive clipping, intermediate. 9 - Line-sensitive clipping on a line where the neighbours pixels are the closest. 10 - Replaces the target pixel with the closest neighbour. 11 - [1 2 1] horizontal and vertical kernel blur. 12 - Same as mode 11. 13 - Bob mode, interpolates top field from the line where the neighbours pixels are the closest. 14 - Bob mode, interpolates bottom field from the line where the neighbours pixels are the closest. 15 - Bob mode, interpolates top field. Same as 13 but with a more complicated interpolation formula. 16 - Bob mode, interpolates bottom field. Same as 14 but with a more complicated interpolation formula. 17 - Clips the pixel with the minimum and maximum of respectively the maximum and minimum of each pair of opposite neighbour pixels. 18 - Line-sensitive clipping using opposite neighbours whose greatest distance from the current pixel is minimal. 19 - Replaces the pixel with the average of its 8 neighbours. 20 - Averages the 9 pixels ([1 1 1] horizontal and vertical blur). 21 - Clips pixels using the averages of opposite neighbour. 22 - Same as mode 21 but simpler and faster. 23 - Small edge and halo removal, but reputed useless. |
Note
This feature doesn't work with subtitles.
Note
Maximum number of "black" segments to clip out is limited to 150.
<?xml version="1.0"?>
<query>
<action>AddMedia</action>
<userid><<id>></userid>
<userkey><<key>></userkey>
<format>
<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>
</cut_black>
</format>
</query>
{
"query": {
"action": "AddMedia",
"userid": "<<id>>",
"userkey": "<<key>>",
"format": {
"cut_black": {
"enable": "[yes|no]",
"black_min_duration": "[Duration]",
"pixel_black": "[PixelThreshold]",
"picture_black_ratio": "[PictureThreshold]"
}
}
}
}
Field Name | Description | Allowed Values | Default Values |
---|---|---|---|
enable | Enable "black" detection and clipping out | yes, no | no |
black_min_duration | The shortest "black" duration in seconds | Positive float number | 2 |
pixel_black | Threshold for classification pixels as "black" | Positive float number lesser than 1 0 - Pixel must be absolutely black to be classified as "black" 0.99 - The lightest pixels would be classified as "black" | 0 |
picture_black_ratio | Threshold 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 |