Compare commits

...
Author SHA1 Message Date
shinyobjectz 6d1dd9831c raea cloud: a library proxy says it is one in its comment tag
Every 540p proxy proxy.py makes carries comment=raea-light-copy, and ffmpeg keeps the tag in what's made from it. raea
cloud's box reads it before a render is published or shown, so a file made from a proxy, wherever an agent put it, is
never handed to a person as a final. Proxies already kept by hash keep no tag until they're made again.
2026-12-05 08:46:37 -08:00
+4 -1
View File
@@ -75,6 +75,9 @@ def api():
PROXY_SHORT = 540
PROXY_LIGHT_BPS = 2_500_000
PART = 64 << 20
# every proxy says what it is in its comment tag, and ffmpeg carries the tag into what's made from it: a box's renders
# and publishes read it (raea-platform harness/light.ts) so nothing made from a proxy is shown to a person as a final
LIGHT_TAG = "raea-light-copy"
AGENT = {"user-agent": "raea-ingest/1"}
@@ -160,7 +163,7 @@ def proxy_job(url: str, put: str, ticket: str) -> dict:
scale = f"scale='if(gt(iw,ih),-2,trunc(min({PROXY_SHORT},iw)/2)*2)':'if(gt(iw,ih),trunc(min({PROXY_SHORT},ih)/2)*2,-2)',format=yuv420p"
r = subprocess.run(
["ffmpeg", "-v", "error", "-y", "-i", src, "-map", "0:v:0", "-map", "0:a:0?", "-vf", scale, "-c:v", "libx264", "-preset", "veryfast", "-crf", "28",
"-force_key_frames", "expr:gte(t,n_forced*1)", "-c:a", "aac", "-b:a", "96k", "-ac", "2", "-movflags", "+faststart", out],
"-force_key_frames", "expr:gte(t,n_forced*1)", "-c:a", "aac", "-b:a", "96k", "-ac", "2", "-metadata", f"comment={LIGHT_TAG}", "-movflags", "+faststart", out],
capture_output=True, text=True, timeout=3300,
)
if r.returncode != 0 or not os.path.exists(out):