faster transcode and debug

This commit is contained in:
Faberto 2026-03-22 19:05:03 +01:00
parent 96360a08d5
commit eeb17ae2b8
2 changed files with 6 additions and 2 deletions

View File

@ -93,13 +93,16 @@ def _build_ffmpeg_cmd(
"pipe,file,http,tcp", "pipe,file,http,tcp",
"-i", "-i",
input_url, input_url,
# Scale down to 720p max, preserve aspect ratio
"-vf",
"scale=-2:'min(720,ih)'",
# Encode to H.264 (software — universally available) # Encode to H.264 (software — universally available)
"-c:v", "-c:v",
"libx264", "libx264",
"-preset", "-preset",
"fast", "ultrafast",
"-crf", "-crf",
"23", "26",
"-profile:v", "-profile:v",
"high", "high",
"-level:v", "-level:v",

View File

@ -10,6 +10,7 @@ let hevcResult: boolean | null = null;
* Result is cached after the first call. * Result is cached after the first call.
*/ */
export function isHevcSupported(): boolean { export function isHevcSupported(): boolean {
if (localStorage.getItem("forceTranscode") === "true") return false;
if (hevcResult !== null) return hevcResult; if (hevcResult !== null) return hevcResult;
const codecs = [ const codecs = [