Difference between revisions of "Documentation:Modules/crop"

From VideoLAN Wiki
Jump to navigation Jump to search
(This is not a current module)
(→‎Options: Longhelp text, defaults)
Line 5: Line 5:
 
|name=crop-geometry
 
|name=crop-geometry
 
|value=string
 
|value=string
|description=Crop geometry (pixels)
+
|description=Set the geometry of the zone to crop. This is set as <code><nowiki><width> &times; <height> + <left offset> + <top offset></nowiki></code>
 
}}
 
}}
 
{{Option
 
{{Option
Line 11: Line 11:
 
|value=boolean
 
|value=boolean
 
|default=disabled
 
|default=disabled
|description=Automatic cropping
+
|description=Automatically detect black borders and crop them
 
}}
 
}}
 
{{Option
 
{{Option
 
|name=autocrop-ratio-max
 
|name=autocrop-ratio-max
 
|value=integer
 
|value=integer
 +
|default=2405
 
|min=0
 
|min=0
 
|max=15000
 
|max=15000
|description=Ratio max (&times; 1000)
+
|description=Maximum image ratio. The crop plugin will never automatically crop to a higher ratio (ie, to a more "flat" image). The value is &times;1000: 1333 means 4&frasl;3
 
}}
 
}}
 
{{Option
 
{{Option
 
|name=crop-ratio
 
|name=crop-ratio
 
|value=integer
 
|value=integer
 +
|default=0
 
|min=0
 
|min=0
 
|max=15000
 
|max=15000
|description=Manual ratio
+
|description=Force a ratio (0 for automatic). Value is &times;1000: 1333 means 4&frasl;3
 
}}
 
}}
 
{{Option
 
{{Option
 
|name=autocrop-time
 
|name=autocrop-time
 
|value=integer
 
|value=integer
|description=Number of images for change
+
|default=25
 +
|description=The number of consecutive images with the same detected ratio (different from the previously detected ratio) to consider that ratio changed and trigger recrop
 
}}
 
}}
 
{{Option
 
{{Option
 
|name=autocrop-diff
 
|name=autocrop-diff
 
|value=integer
 
|value=integer
|description=Number of lines for change
+
|default=16
 +
|description=The minimum difference in the number of detected black lines to consider that ratio changed and trigger recrop
 
}}
 
}}
 
{{Option
 
{{Option
 
|name=autocrop-non-black-pixels
 
|name=autocrop-non-black-pixels
 
|value=integer
 
|value=integer
|description=Number of non black pixels
+
|default=3
 +
|description=The maximum of non-black pixels in a line to consider that the line is black
 
}}
 
}}
 
{{Option
 
{{Option
 
|name=autocrop-skip-percent
 
|name=autocrop-skip-percent
 
|value=integer
 
|value=integer
 +
|default=17
 
|min=0
 
|min=0
 
|max=100
 
|max=100
|description=Skip percentage (%)
+
|description=Percentage of the line to consider while checking for black lines. This allows skipping logos in black borders and crop them anyway
 
}}
 
}}
 
{{Option
 
{{Option
 
|name=autocrop-luminance-threshold
 
|name=autocrop-luminance-threshold
 
|value=integer
 
|value=integer
 +
|default=40
 
|min=0
 
|min=0
 
|max=128
 
|max=128
|description=Luminance threshold
+
|description=Maximum luminance to consider a pixel as black (0-255)
 
}}</onlyinclude>
 
}}</onlyinclude>
  

Revision as of 04:29, 7 April 2019

Module: Crop
Type Video filter
First VLC version -
Last VLC version 2.0.9
Operating system(s) all
Description Remove borders of the video and replace them with black borders
Shortcut(s) -

Options

  • crop-geometry <string> : Set the geometry of the zone to crop. This is set as <width> × <height> + <left offset> + <top offset>
  • autocrop <boolean> : Automatically detect black borders and crop them default value: disabled
  • autocrop-ratio-max <integer [0 .. 15000]> : Maximum image ratio. The crop plugin will never automatically crop to a higher ratio (ie, to a more "flat" image). The value is ×1000: 1333 means 4⁄3 default value: 2405
  • crop-ratio <integer [0 .. 15000]> : Force a ratio (0 for automatic). Value is ×1000: 1333 means 4⁄3 default value: 0
  • autocrop-time <integer> : The number of consecutive images with the same detected ratio (different from the previously detected ratio) to consider that ratio changed and trigger recrop default value: 25
  • autocrop-diff <integer> : The minimum difference in the number of detected black lines to consider that ratio changed and trigger recrop default value: 16
  • autocrop-non-black-pixels <integer> : The maximum of non-black pixels in a line to consider that the line is black default value: 3
  • autocrop-skip-percent <integer [0 .. 100]> : Percentage of the line to consider while checking for black lines. This allows skipping logos in black borders and crop them anyway default value: 17
  • autocrop-luminance-threshold <integer [0 .. 128]> : Maximum luminance to consider a pixel as black (0-255) default value: 40

Source code

This page is part of official VLC media player Documentation (User GuideStreaming HowToHacker GuideModules)
Please read the Documentation Editing Guidelines before you edit the documentation
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.