YouTube ingest: constant 720 canvas filter (scale+pad) + ultrafast — absorb PK size flips without 1080 CPU
Browse files- Dockerfile +7 -11
Dockerfile
CHANGED
|
@@ -7,17 +7,13 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
| 7 |
COPY app.py relay.py youtube_api.py youtube_manager.py flv_bridge.py tiktok_auth.py index.html ./
|
| 8 |
|
| 9 |
# --- YouTube ingestion -------------------------------------------------------
|
| 10 |
-
#
|
| 11 |
-
# canvas, closed 2 s GOP, CFR
|
| 12 |
-
#
|
| 13 |
-
#
|
| 14 |
-
#
|
| 15 |
-
#
|
| 16 |
-
#
|
| 17 |
-
# copy = forward the source untouched (original quality, no extra CPU) but
|
| 18 |
-
# every PK layout change reaches the live player as a parameter
|
| 19 |
-
# change -> live stalls / black frames (VOD still fine).
|
| 20 |
-
# fixed720 = constant 720x1280 canvas, lighter at ~27% of 2 vCPU.
|
| 21 |
#
|
| 22 |
# YOUTUBE_FORMAT_GUARD=on -> tear the session down on a resolution change (old
|
| 23 |
# behaviour: 1-3 s gap, but YouTube re-declares the new size explicitly).
|
|
|
|
| 7 |
COPY app.py relay.py youtube_api.py youtube_manager.py flv_bridge.py tiktok_auth.py index.html ./
|
| 8 |
|
| 9 |
# --- YouTube ingestion -------------------------------------------------------
|
| 10 |
+
# fixed720 = DEFAULT: scale+pad every TikTok size (solo/PK) onto a constant
|
| 11 |
+
# 720x1280 canvas, H.264, closed 2 s GOP, CFR, preset ultrafast.
|
| 12 |
+
# Weak CPU: ~27% of 2 vCPU vs ~44% for 1080. Viewers never see a
|
| 13 |
+
# mid-stream SPS change so the app does not freeze until force-kill.
|
| 14 |
+
# copy = forward the source untouched (no extra CPU) but every PK layout
|
| 15 |
+
# change reaches the live player as a parameter change -> spinner.
|
| 16 |
+
# fixed1080 = same canvas idea at 1080x1920; heavier encode.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
#
|
| 18 |
# YOUTUBE_FORMAT_GUARD=on -> tear the session down on a resolution change (old
|
| 19 |
# behaviour: 1-3 s gap, but YouTube re-declares the new size explicitly).
|