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..287f076 100644 --- a/remotion/Root.jsx +++ b/remotion/Root.jsx @@ -6,14 +6,16 @@ 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)); -const defaultProps16x9 = { +const defaultPropsClean = { songData: templateSongData, }; -const defaultProps16x9Logo = { +const defaultPropsWithLogo = { songData: templateSongData, showAnimatedLogo: true, logoSrc: staticFile('assets/DTunes-transparent.svg'), @@ -29,7 +31,7 @@ export const RemotionRoot = () => { fps={FPS} width={WIDTH_16X9} height={HEIGHT_16X9} - defaultProps={defaultProps16x9Logo} + defaultProps={defaultPropsWithLogo} /> { fps={FPS} width={WIDTH_16X9} height={HEIGHT_16X9} - defaultProps={defaultProps16x9} + defaultProps={defaultPropsClean} /> { fps={FPS} width={WIDTH_16X9} height={HEIGHT_16X9} - defaultProps={defaultProps16x9Logo} + defaultProps={defaultPropsWithLogo} + /> + + + +