This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Hi8 digitized video enhancement script | |
# Created on March 22, 2025 | |
# Enhancement parameters configuration | |
SATURATION=1.2 # Saturation value (1.0 = normal, 1.2 = +20%) | |
CONTRAST=1.1 # Contrast value (1.0 = normal, 1.1 = +10%) | |
BRIGHTNESS=0.05 # Brightness adjustment (-1.0 to 1.0) | |
VIDEO_DENOISING="4:3:6:3" # Denoising parameters (strength:spatial:temporal:spatial) | |
VIDEO_QUALITY=18 # CRF - lower = better quality (18-23 recommended) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Related with utf8 problems and based on differents answers from https://stackoverflow.com/a/19366999/3452348 | |
* This function is at the time of writing, for me, the best improved version existing actually. | |
* | |
* This function is designed to uniformly encode data as UTF-8. It handles strings by attempting | |
* to detect the current encoding and converting it to UTF-8. For arrays and objects, it applies | |
* the conversion recursively to each element or property. The function tries a predefined list | |
* of common encodings if automatic detection fails. Note that only public properties of objects |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public static function isLocal(): bool | |
{ | |
return in_array($_SERVER['REMOTE_ADDR'], ['127.0.0.1', '::1']); | |
} |