|
132 | 132 |
|
133 | 133 | <!-- ===== MAIN CONTENT ===== --> |
134 | 134 | <main class="main"> |
| 135 | + <div class="server-status-banner hidden" id="serverStatusBanner"> |
| 136 | + <span id="serverStatusMsg">Server disconnected. Reconnecting...</span> |
| 137 | + </div> |
135 | 138 |
|
136 | 139 | <!-- MEDIA SELECTION (persistent across all tabs) --> |
137 | 140 | <section class="card" id="clipSection"> |
|
148 | 151 | <select class="clip-select" id="clipSelect"> |
149 | 152 | <option value="" disabled selected>Loading project media...</option> |
150 | 153 | </select> |
| 154 | + <div class="clip-preview-row" id="clipPreviewRow"> |
| 155 | + <div class="clip-thumb" id="clipThumb"></div> |
| 156 | + <div class="clip-meta" id="clipMeta"> |
| 157 | + <span id="clipMetaRes"></span> |
| 158 | + <span id="clipMetaDur"></span> |
| 159 | + <span id="clipMetaSize"></span> |
| 160 | + </div> |
| 161 | + </div> |
| 162 | + <div class="recent-clips-row"> |
| 163 | + <button class="btn-sm btn-ghost" id="recentClipsBtn" title="Recent clips">Recent</button> |
| 164 | + <div class="recent-clips-dropdown hidden" id="recentClipsDropdown"></div> |
| 165 | + </div> |
151 | 166 | <div class="file-info hidden" id="fileInfoBox"> |
152 | 167 | <div class="file-name" id="fileNameDisplay"></div> |
153 | 168 | <div class="file-meta" id="fileMetaDisplay"></div> |
|
169 | 184 | <button class="sub-tab active" data-sub="silence">Silence</button> |
170 | 185 | <button class="sub-tab" data-sub="fillers">Fillers</button> |
171 | 186 | <button class="sub-tab" data-sub="full">Full Edit</button> |
| 187 | + <button class="sub-tab" data-sub="trim">Trim</button> |
172 | 188 | </div> |
173 | 189 |
|
174 | 190 | <div class="sub-panel active" id="sub-silence"> |
|
275 | 291 | <button class="btn-primary" id="runFullBtn" disabled>Run Full Pipeline</button> |
276 | 292 | </section> |
277 | 293 | </div> |
| 294 | + |
| 295 | + <!-- TRIM --> |
| 296 | + <div class="sub-panel" id="sub-trim"> |
| 297 | + <section class="card"> |
| 298 | + <div class="card-header"> |
| 299 | + <div class="card-title"> |
| 300 | + <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M6 9l6 6 6-6"/></svg> |
| 301 | + Trim Clip |
| 302 | + </div> |
| 303 | + </div> |
| 304 | + <p class="card-desc">Set in/out points to extract a portion of your clip. Use timecodes or seconds.</p> |
| 305 | + |
| 306 | + <div class="form-group"> |
| 307 | + <label>Start Time</label> |
| 308 | + <input type="text" id="trimStart" placeholder="00:00:00" value="00:00:00"> |
| 309 | + <span class="hint-inline">HH:MM:SS or seconds (e.g. 5.5)</span> |
| 310 | + </div> |
| 311 | + |
| 312 | + <div class="form-group"> |
| 313 | + <label>End Time</label> |
| 314 | + <input type="text" id="trimEnd" placeholder="00:00:30" value="00:00:30"> |
| 315 | + <span class="hint-inline">HH:MM:SS or seconds</span> |
| 316 | + </div> |
| 317 | + |
| 318 | + <div class="form-group"> |
| 319 | + <label>Mode</label> |
| 320 | + <select id="trimMode"> |
| 321 | + <option value="copy">Stream Copy (instant, frame-approximate)</option> |
| 322 | + <option value="reencode">Re-encode (precise, slower)</option> |
| 323 | + </select> |
| 324 | + </div> |
| 325 | + |
| 326 | + <div class="form-group" id="trimQualityGroup"> |
| 327 | + <label>Quality</label> |
| 328 | + <select id="trimQuality"> |
| 329 | + <option value="high" selected>High (CRF 18)</option> |
| 330 | + <option value="medium">Medium (CRF 23)</option> |
| 331 | + <option value="low">Low (CRF 28)</option> |
| 332 | + </select> |
| 333 | + </div> |
| 334 | + |
| 335 | + <button class="btn-primary" id="runTrimBtn" disabled>Trim Clip</button> |
| 336 | + </section> |
| 337 | + </div> |
278 | 338 | </div> |
279 | 339 |
|
280 | 340 | <!-- ======== TAB: CAPTIONS ======== --> |
|
1086 | 1146 | <button class="sub-tab" data-sub="vid-transition">Transitions</button> |
1087 | 1147 | <button class="sub-tab" data-sub="vid-particles">Particles</button> |
1088 | 1148 | <button class="sub-tab" data-sub="vid-titles">Titles</button> |
| 1149 | + <button class="sub-tab" data-sub="vid-reframe">Reframe</button> |
| 1150 | + <button class="sub-tab" data-sub="vid-merge">Merge</button> |
1089 | 1151 | <button class="sub-tab" data-sub="vid-upscale">Upscale</button> |
1090 | 1152 | <button class="sub-tab" data-sub="vid-color">Color</button> |
1091 | 1153 | <button class="sub-tab" data-sub="vid-remove">Remove</button> |
|
1703 | 1765 | </section> |
1704 | 1766 | </div> |
1705 | 1767 |
|
| 1768 | + <!-- REFRAME / RESIZE FOR PHONE --> |
| 1769 | + <div class="sub-panel" id="sub-vid-reframe"> |
| 1770 | + <section class="card"> |
| 1771 | + <div class="card-header"> |
| 1772 | + <div class="card-title"> |
| 1773 | + <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="5" y="2" width="14" height="20" rx="2"/><line x1="12" y1="18" x2="12" y2="18.01"/></svg> |
| 1774 | + Reframe for Phone / Social |
| 1775 | + </div> |
| 1776 | + </div> |
| 1777 | + <p class="card-desc">Resize and crop video to fit vertical (TikTok, Shorts, Reels), square, or custom dimensions. Smart crop keeps the important center content.</p> |
| 1778 | + |
| 1779 | + <div class="form-group"> |
| 1780 | + <label>Target Format</label> |
| 1781 | + <select id="reframePreset"> |
| 1782 | + <option value="tiktok">TikTok / Shorts (1080×1920, 9:16)</option> |
| 1783 | + <option value="instagram_reel">Instagram Reel / Story (1080×1920, 9:16)</option> |
| 1784 | + <option value="instagram_post">Instagram Post (1080×1080, 1:1)</option> |
| 1785 | + <option value="instagram_land">Instagram Landscape (1080×566)</option> |
| 1786 | + <option value="youtube">YouTube 1080p (1920×1080, 16:9)</option> |
| 1787 | + <option value="youtube_4k">YouTube 4K (3840×2160, 16:9)</option> |
| 1788 | + <option value="square">Square (1080×1080, 1:1)</option> |
| 1789 | + <option value="custom">Custom Dimensions</option> |
| 1790 | + </select> |
| 1791 | + </div> |
| 1792 | + |
| 1793 | + <div class="form-group hidden" id="reframeCustomDims"> |
| 1794 | + <label>Width × Height</label> |
| 1795 | + <div style="display:flex;gap:8px;align-items:center;"> |
| 1796 | + <input type="number" id="reframeCustomW" min="16" max="7680" value="1080" style="width:80px;"> |
| 1797 | + <span>×</span> |
| 1798 | + <input type="number" id="reframeCustomH" min="16" max="7680" value="1920" style="width:80px;"> |
| 1799 | + </div> |
| 1800 | + </div> |
| 1801 | + |
| 1802 | + <div class="form-group"> |
| 1803 | + <label>Resize Mode</label> |
| 1804 | + <select id="reframeMode"> |
| 1805 | + <option value="crop">Crop (fill frame, cut edges)</option> |
| 1806 | + <option value="pad">Pad (fit inside, add bars)</option> |
| 1807 | + <option value="stretch">Stretch (distort to fit)</option> |
| 1808 | + </select> |
| 1809 | + </div> |
| 1810 | + |
| 1811 | + <div class="form-group" id="reframeCropPosGroup"> |
| 1812 | + <label>Crop Position</label> |
| 1813 | + <select id="reframeCropPos"> |
| 1814 | + <option value="center" selected>Center</option> |
| 1815 | + <option value="top">Top</option> |
| 1816 | + <option value="bottom">Bottom</option> |
| 1817 | + <option value="left">Left</option> |
| 1818 | + <option value="right">Right</option> |
| 1819 | + </select> |
| 1820 | + <span class="hint-inline">Where to anchor the crop</span> |
| 1821 | + </div> |
| 1822 | + |
| 1823 | + <div class="form-group hidden" id="reframePadColorGroup"> |
| 1824 | + <label>Bar Color</label> |
| 1825 | + <select id="reframePadColor"> |
| 1826 | + <option value="black" selected>Black</option> |
| 1827 | + <option value="white">White</option> |
| 1828 | + <option value="0x111111">Dark Gray</option> |
| 1829 | + <option value="0x1a1a2e">Dark Navy</option> |
| 1830 | + </select> |
| 1831 | + </div> |
| 1832 | + |
| 1833 | + <div class="form-group"> |
| 1834 | + <label>Quality</label> |
| 1835 | + <select id="reframeQuality"> |
| 1836 | + <option value="high" selected>High (CRF 18)</option> |
| 1837 | + <option value="medium">Medium (CRF 23)</option> |
| 1838 | + <option value="low">Low (CRF 28)</option> |
| 1839 | + </select> |
| 1840 | + </div> |
| 1841 | + |
| 1842 | + <div class="hint-inline" id="reframeInfo"></div> |
| 1843 | + |
| 1844 | + <button class="btn-primary" id="runReframeBtn" disabled>Reframe Video</button> |
| 1845 | + </section> |
| 1846 | + </div> |
| 1847 | + |
| 1848 | + <!-- MERGE / CONCATENATE --> |
| 1849 | + <div class="sub-panel" id="sub-vid-merge"> |
| 1850 | + <section class="card"> |
| 1851 | + <div class="card-header"> |
| 1852 | + <div class="card-title"> |
| 1853 | + <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01"/></svg> |
| 1854 | + Merge / Concatenate Clips |
| 1855 | + </div> |
| 1856 | + </div> |
| 1857 | + <p class="card-desc">Join multiple clips into a single video file. Add clips using the batch picker or drag and drop.</p> |
| 1858 | + |
| 1859 | + <div class="form-group"> |
| 1860 | + <label>Merge Files</label> |
| 1861 | + <div class="merge-file-list" id="mergeFileList"> |
| 1862 | + <div class="hint" style="padding:8px 12px;">No files added. Use batch picker or drop files.</div> |
| 1863 | + </div> |
| 1864 | + <div style="display:flex;gap:6px;margin-top:6px;"> |
| 1865 | + <button class="btn-sm btn-secondary" id="mergeAddCurrentBtn">Add Current Clip</button> |
| 1866 | + <button class="btn-sm btn-secondary" id="mergeAddAllBtn">Add All Project Media</button> |
| 1867 | + <button class="btn-sm btn-ghost" id="mergeClearBtn">Clear</button> |
| 1868 | + </div> |
| 1869 | + </div> |
| 1870 | + |
| 1871 | + <div class="form-group"> |
| 1872 | + <label>Mode</label> |
| 1873 | + <select id="mergeMode"> |
| 1874 | + <option value="concat_demux">Fast (stream copy, same codec only)</option> |
| 1875 | + <option value="concat_filter">Re-encode (different codecs/resolutions OK)</option> |
| 1876 | + </select> |
| 1877 | + </div> |
| 1878 | + |
| 1879 | + <div class="form-group"> |
| 1880 | + <label>Quality</label> |
| 1881 | + <select id="mergeQuality"> |
| 1882 | + <option value="high" selected>High (CRF 18)</option> |
| 1883 | + <option value="medium">Medium (CRF 23)</option> |
| 1884 | + <option value="low">Low (CRF 28)</option> |
| 1885 | + </select> |
| 1886 | + </div> |
| 1887 | + |
| 1888 | + <button class="btn-primary" id="runMergeBtn" disabled>Merge Clips</button> |
| 1889 | + </section> |
| 1890 | + </div> |
| 1891 | + |
1706 | 1892 | <!-- PRO UPSCALE --> |
1707 | 1893 | <div class="sub-panel" id="sub-vid-upscale"> |
1708 | 1894 | <section class="card"> |
|
2213 | 2399 |
|
2214 | 2400 | </main> |
2215 | 2401 |
|
| 2402 | + <!-- Command Palette --> |
| 2403 | + <div class="command-palette-overlay hidden" id="commandPaletteOverlay"> |
| 2404 | + <div class="command-palette"> |
| 2405 | + <input type="text" id="commandPaletteInput" placeholder="Search operations... (e.g. denoise, reframe, captions)" autocomplete="off" spellcheck="false"> |
| 2406 | + <div class="command-palette-results" id="commandPaletteResults"></div> |
| 2407 | + <div class="command-palette-hint">Navigate with arrow keys, Enter to select, Esc to close</div> |
| 2408 | + </div> |
| 2409 | + </div> |
| 2410 | + |
2216 | 2411 | <!-- Side-by-Side Preview Modal --> |
2217 | 2412 | <div class="preview-modal hidden" id="previewModal"> |
2218 | 2413 | <div class="preview-modal-header"> |
|
0 commit comments