script
This commit is contained in:
parent
8100dff00e
commit
2bca4ceb49
|
|
@ -381,6 +381,30 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
<script>
|
||||||
|
const controls=["brightness","contrast","saturation","hue"];
|
||||||
|
|
||||||
|
function update(){
|
||||||
|
const b=brightness.value;
|
||||||
|
const c=contrast.value;
|
||||||
|
const s=saturation.value;
|
||||||
|
const h=hue.value;
|
||||||
|
|
||||||
|
brightnessVal.textContent=b;
|
||||||
|
contrastVal.textContent=c;
|
||||||
|
saturationVal.textContent=s;
|
||||||
|
hueVal.textContent=h;
|
||||||
|
|
||||||
|
ffmpegOutput.textContent=
|
||||||
|
`-vf "vpp_qsv=format=nv12:brightness=${b}:contrast=${c}:saturation=${s}:hue=${h}"`;
|
||||||
|
}
|
||||||
|
|
||||||
|
controls.forEach(id=>{
|
||||||
|
document.getElementById(id).addEventListener("input",update);
|
||||||
|
});
|
||||||
|
|
||||||
|
update();
|
||||||
|
</script>
|
||||||
<?php
|
<?php
|
||||||
if (!empty($saveError)) echo '<p style="color:red;text-align:center;">' . htmlspecialchars($saveError) . '</p>';
|
if (!empty($saveError)) echo '<p style="color:red;text-align:center;">' . htmlspecialchars($saveError) . '</p>';
|
||||||
if (!empty($saveSuccess)) echo '<p style="color:green;text-align:center;">' . htmlspecialchars($saveSuccess) . '</p>';
|
if (!empty($saveSuccess)) echo '<p style="color:green;text-align:center;">' . htmlspecialchars($saveSuccess) . '</p>';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue