Determines how often we check for aspect ratio changes.
More frequent aspect ratio checks can result in insane RAM usage.
Less frequent aspect ratio checks result in bigger delay between aspect ratio change and correction.
Delays are given in milliseconds.
Frequency while playing:
Frequency while paused:
Error timeout:
Setting values under 100 milliseconds will have no effect unless you also reduce the tickrate.
Show advanced options
Tick rate:
Fallback mode
Some streaming sites implement stuff (DRM) that prevents us from detecting aspect ratio using our favourite way.
Fortunately for us, some browsers (most notably: Firefox) allow us to work around that limitation using an alternative.
Said alternative is not without downsides, though:
it's less accurate and leaves a thin black edge all around the video
Uses bigger image sample, which translates into slightly to moderately increased RAM and CPU usage (increase in resource usage depends on your monitor resolution)
This is why fallback mode can be toggled off separately from the main thing.
Unfortunately for you, this option doesn't seem to be available in the browser you're using.
Enable fallback mode because I'm super duper sure I'm using firefox right now.
Safety border thickness (in px)
Don't react if detected edge is less than this many pixels thick:
Letterbox misallignment threshold
If top and bottom bar differ by more than this (0 — 0%, 1 — 100%), we do not correct aspect ratio.
Letterbox misalignment threshold
Sampling options
Various sampling related options. Some options may be hidden behind advanced options Static columns: Image is sampled in this many columns, spaced at regular intervals between both edges. Random columns: (ADVANCED; NOT IMPLEMENTED/PLANNED) In addition to static colums, sample image at this many random columns. Static rows: (ADVANCED) Image is sampled in this many rows, spaced at regular intervals between both edges. Sample width, height: (ADVANCED) size of the sample. Bigger -> more accurate aspect ratio detection, but uses more resources.
Static sample columns:
Random sample columns:
Static rows:
Sample width:
Static rows:
Blackbar
These settings determine what's considered black and what's considered non-black. Black level: 0-255, where 0 is black. Anything below this number across all RGB components is considered black.
Black level can decrease if we detect darker blacks in the video. Lower values —> more accurate edge detection;
higher values —> detection is more forgiving to videos with less-than-ideal contrast ratios. Threshold: If pixel is darker than the sum of black level and this value, it's considered black. In theory, lower -> better.
In practice, this value needs to be kept surprisingly high (8 might not be high enough), otherwise compression artifacts in videos
start having an adverse effect on quality of automatic detection.
Gradient detection: Attempt to discriminate between hard edges and gradients. 'Strict' and 'Lax' prevent aspect ratio
changes if we detected gradients instead of a legit edge. This results in fewer false positives, but may cause aspect ratio
detection to not work on darker frames. Image threshold: When gradient detection is enabled, everything that's brighter than the sum of black level, threshold and
ths is considered to be non-black. Gradient threshold: If the distance between last black pixel and the first non-black pixel in a given column is more than this value,
we're looking at a gradient. If this happens while gradient detection is on, we don't change aspect ratio. Gradient sample size: This option is really only relevant when using 'lax' gradient detection. If we don't find a non-black pixel
within this distance after last known black pixel when scanning a column, we presume we're not on a gradient.
Black level:
Threshold:
Gradient detection:
TODO: insert select here
Image threshold
Gradient threshold:
Gradient sample size:
Black frame detection
Black frame detection is a quick test that tries to determine whether we're looking at a black frame. This test prevents
us from wasting precious time trying to detect aspect ratio on frames that are too dark for reliable aspect ratio detection. Sample width, height: Sample size. Since we're checking every pixel in this sample, dimensions should be kept small. Cumulative threshold: If we add the maximum of red, green, blue values of every pixel in the sample and they total more than this, the frame is bright enough. Black pixel threshold: If more than this fraction of pixels from the sample are "black", we consider the frame black. This overrules cumulative threshold.
Blackframe sample width:
Blackframe sample height:
Cumulative threshold:
Black pixel threshold:
Edge detection
Options in this section govern edge detection. Sample width — In a bid to detect "false" edges, we take two samples this many pixels wide near the point of our potential edge. One sample must be completely black, the other must contain a set
amount of non-black pixels. Detection threshold — non-black sample mentioned above needs to contain at least this many non-black pixels. Single side confirmation threshold — quorum needed to establish aspect ratio in case we manage to detect an edge only on one side of the video. (0-0.5) Logo threshold — if edge candidate sits with count greater than this*all_samples, it can't be a logo or a watermark. Ignore middle area — When trying to detect area, ignore area between middle and canvasHeight * {this value} pixels towards the edge. Detect limit — stop search after finding a potential candidate in this many sample columns (%, 0-1)
Sample width:
Detection threshold (px):
Single side confirmation threshold:
Logo threshold:
Ignore middle area:
Detect limit:
Guard line
Quick test to determine whether aspect ratio hasn't changed. Test is performed by taking two samples on each edge of the image —
one in the last row of the letterbox (blackbar), and one in the first row of the video (image). Ignore edge margin: We don't take blackbar and image samples {width * this} many pixels from left and right edge. Image threshold: If all pixels in blackbar are black and this fraction (0-1) of pixels in image are non-black, we presume that aspect ratio hasn't changed. Edge tolerance (px): I lied. Blackbar test happens this many pixels away from the last row of the letterbox.
Enable guardline
Ignore edge margin:
Image threshold:
Edge tolerance (px):
Aspect ratio change threshold
New and old aspect ratio must differ by at least this much (%, 1=100%) before we trigger aspect ratio correction.