Reooiq commited on
Commit
8fa8afb
·
1 Parent(s): 7682771

YouTube ingest: constant 720 canvas filter (scale+pad) + ultrafast — absorb PK size flips without 1080 CPU

Browse files
Files changed (1) hide show
  1. 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
- # fixed1080 = DEFAULT since 2026-09-18 (user's choice): constant 1080x1920
11
- # canvas, closed 2 s GOP, CFR. TikTok flips resolution/layout at
12
- # every PK round; forwarding those flips to the live player is
13
- # exactly what made viewers see a spinner / black picture until
14
- # they reopened the app, while the processed VOD looked perfect.
15
- # A constant canvas absorbs the flips.
16
- # Cost: ~44% of 2 vCPU per stream (measured 2.26x real time).
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).