From af0fa1892a94cc728e3a00b2261bf94688f73acd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Apr 2026 16:04:00 +0000 Subject: [PATCH 1/6] Initial plan From fe2d6e228a300118c58d6ec1f93195c3d13c8e2e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Apr 2026 16:10:13 +0000 Subject: [PATCH 2/6] Add 4K presets and automation fallbacks for phase3/phase7 Agent-Logs-Url: https://github.com/Dcode9/MPLayer/sessions/0c10a233-ebce-4372-bf11-c102eee689dd Co-authored-by: Dcode9 <194372792+Dcode9@users.noreply.github.com> --- .github/workflows/phase6-full-pipeline.yml | 14 ++- .github/workflows/phase7-youtube-upload.yml | 14 ++- .github/workflows/test-render.yml | 6 ++ package.json | 2 + remotion/Root.jsx | 22 +++++ scripts/phase3-build.js | 66 ++++++++++++-- scripts/phase5-render-4k-logo.js | 60 +++++++++++++ scripts/phase5-render-4k.js | 60 +++++++++++++ scripts/phase7-upload.js | 99 +++++++++++++++++++-- 9 files changed, 325 insertions(+), 18 deletions(-) create mode 100644 scripts/phase5-render-4k-logo.js create mode 100644 scripts/phase5-render-4k.js diff --git a/.github/workflows/phase6-full-pipeline.yml b/.github/workflows/phase6-full-pipeline.yml index 703e1ab..38997b8 100644 --- a/.github/workflows/phase6-full-pipeline.yml +++ b/.github/workflows/phase6-full-pipeline.yml @@ -4,9 +4,9 @@ on: workflow_dispatch: inputs: song_query: - description: Song query (used only when song_id is empty) + description: Song query (leave empty to auto-pick a trending query) required: false - default: Aaj Ki Raat + default: '' type: string song_id: description: Optional direct JioSaavn song ID @@ -21,6 +21,8 @@ on: options: - 16x9-logo - 16x9-clean + - 4k-logo + - 4k-clean max_seconds: description: Clip duration cap in seconds (0 = full song) required: false @@ -59,8 +61,10 @@ jobs: echo "[phase-6] Starting Phase 3" if [ -n "$SONG_ID" ]; then npm run phase3:build -- --song-id="$SONG_ID" --out=data/phase3-lyrics.json - else + elif [ -n "$SONG_QUERY" ]; then npm run phase3:build -- --query="$SONG_QUERY" --out=data/phase3-lyrics.json + else + npm run phase3:build -- --auto-trending --out=data/phase3-lyrics.json fi - name: Phase 5 - Render template lyrics video @@ -76,6 +80,10 @@ jobs: if [ "$RENDER_PRESET" = "16x9-clean" ]; then npm run phase5:render:16x9 -- --lyrics=data/phase3-lyrics.json --out=output/phase6-video.mp4 --max-seconds="$PHASE5_MAX_SECONDS" + elif [ "$RENDER_PRESET" = "4k-clean" ]; then + npm run phase5:render:4k -- --lyrics=data/phase3-lyrics.json --out=output/phase6-video.mp4 --max-seconds="$PHASE5_MAX_SECONDS" + elif [ "$RENDER_PRESET" = "4k-logo" ]; then + npm run phase5:render:4k:logo -- --lyrics=data/phase3-lyrics.json --out=output/phase6-video.mp4 --max-seconds="$PHASE5_MAX_SECONDS" else npm run phase5:render:16x9:logo -- --lyrics=data/phase3-lyrics.json --out=output/phase6-video.mp4 --max-seconds="$PHASE5_MAX_SECONDS" fi diff --git a/.github/workflows/phase7-youtube-upload.yml b/.github/workflows/phase7-youtube-upload.yml index 65c6171..08cf786 100644 --- a/.github/workflows/phase7-youtube-upload.yml +++ b/.github/workflows/phase7-youtube-upload.yml @@ -4,9 +4,9 @@ on: workflow_dispatch: inputs: song_query: - description: Song query (used only when song_id is empty) + description: Song query (leave empty to auto-pick a trending query) required: false - default: Aaj Ki Raat + default: '' type: string song_id: description: Optional direct JioSaavn song ID @@ -21,6 +21,8 @@ on: options: - 16x9-logo - 16x9-clean + - 4k-logo + - 4k-clean max_seconds: description: Clip duration cap (0 means full song) required: false @@ -83,8 +85,10 @@ jobs: echo "[phase-7] Starting Phase 3" if [ -n "$SONG_ID" ]; then npm run phase3:build -- --song-id="$SONG_ID" --out=data/phase3-lyrics.json - else + elif [ -n "$SONG_QUERY" ]; then npm run phase3:build -- --query="$SONG_QUERY" --out=data/phase3-lyrics.json + else + npm run phase3:build -- --auto-trending --out=data/phase3-lyrics.json fi - name: Phase 5 - Render video @@ -100,6 +104,10 @@ jobs: if [ "$RENDER_PRESET" = "16x9-clean" ]; then npm run phase5:render:16x9 -- --lyrics=data/phase3-lyrics.json --out=output/phase7-video.mp4 --max-seconds="$PHASE5_MAX_SECONDS" + elif [ "$RENDER_PRESET" = "4k-clean" ]; then + npm run phase5:render:4k -- --lyrics=data/phase3-lyrics.json --out=output/phase7-video.mp4 --max-seconds="$PHASE5_MAX_SECONDS" + elif [ "$RENDER_PRESET" = "4k-logo" ]; then + npm run phase5:render:4k:logo -- --lyrics=data/phase3-lyrics.json --out=output/phase7-video.mp4 --max-seconds="$PHASE5_MAX_SECONDS" else npm run phase5:render:16x9:logo -- --lyrics=data/phase3-lyrics.json --out=output/phase7-video.mp4 --max-seconds="$PHASE5_MAX_SECONDS" fi diff --git a/.github/workflows/test-render.yml b/.github/workflows/test-render.yml index 3adfba0..e84b9e9 100644 --- a/.github/workflows/test-render.yml +++ b/.github/workflows/test-render.yml @@ -11,6 +11,8 @@ on: options: - 16x9-logo - 16x9-clean + - 4k-logo + - 4k-clean max_seconds: description: Clip duration cap in seconds required: false @@ -53,6 +55,10 @@ jobs: if [ "$RENDER_PRESET" = "16x9-clean" ]; then npm run phase5:render:16x9 -- --lyrics=data/test-lyrics.json --out=output/test-video.mp4 --max-seconds="$PHASE5_MAX_SECONDS" + elif [ "$RENDER_PRESET" = "4k-clean" ]; then + npm run phase5:render:4k -- --lyrics=data/test-lyrics.json --out=output/test-video.mp4 --max-seconds="$PHASE5_MAX_SECONDS" + elif [ "$RENDER_PRESET" = "4k-logo" ]; then + npm run phase5:render:4k:logo -- --lyrics=data/test-lyrics.json --out=output/test-video.mp4 --max-seconds="$PHASE5_MAX_SECONDS" else npm run phase5:render:16x9:logo -- --lyrics=data/test-lyrics.json --out=output/test-video.mp4 --max-seconds="$PHASE5_MAX_SECONDS" fi diff --git a/package.json b/package.json index 7b63623..ac6e020 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,8 @@ "phase5:render": "node scripts/phase5-render.js", "phase5:render:16x9": "node scripts/phase5-render-16x9.js", "phase5:render:16x9:logo": "node scripts/phase5-render-16x9-logo.js", + "phase5:render:4k": "node scripts/phase5-render-4k.js", + "phase5:render:4k:logo": "node scripts/phase5-render-4k-logo.js", "phase7:upload": "node scripts/phase7-upload.js", "render:test": "node scripts/render-test.js", "remotion:studio": "remotion studio remotion/index.jsx" diff --git a/remotion/Root.jsx b/remotion/Root.jsx index 23de0ce..4992917 100644 --- a/remotion/Root.jsx +++ b/remotion/Root.jsx @@ -6,6 +6,8 @@ import templateSongData from './template-song-data.json'; const FPS = 30; const WIDTH_16X9 = 1920; const HEIGHT_16X9 = 1080; +const WIDTH_4K = 3840; +const HEIGHT_4K = 2160; const DEFAULT_DURATION_SECONDS = Number(templateSongData.song?.duration || 205); const DEFAULT_DURATION_FRAMES = Math.max(1, Math.round(DEFAULT_DURATION_SECONDS * FPS)); @@ -51,6 +53,26 @@ export const RemotionRoot = () => { height={HEIGHT_16X9} defaultProps={defaultProps16x9Logo} /> + + + +