diff --git a/html/download.ejs b/html/download.ejs index bbd48cb5..ff483469 100644 --- a/html/download.ejs +++ b/html/download.ejs @@ -108,6 +108,21 @@ .sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0} a{color:inherit} .chip a.btn{color:var(--text)} + + .mux-card{ + margin-top:16px;background:var(--bg-elev);border:1px solid rgba(255,255,255,.08); + border-radius:12px;box-shadow:var(--shadow);padding:16px + } + .mux-rows{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px;margin-top:12px} + .mux-item{background:var(--bg-chip);border:1px solid rgba(255,255,255,.08);border-radius:10px;padding:12px} + .kbd{font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; + background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);border-radius:8px;padding:10px;display:block; + overflow:auto;line-height:1.45;font-size:13px} + .copy{ + display:inline-flex;align-items:center;gap:6px;margin-top:8px;padding:6px 10px;border-radius:8px;border:1px solid rgba(255,255,255,.12); + background:rgba(255,255,255,.06);cursor:pointer + } + .copy:focus-visible{outline:2px solid var(--ring);outline-offset:3px} @@ -244,6 +259,55 @@
Tip: if a download fails, try another container (MP4 vs WEBM) or a different quality.
+ + +
+

Combine video-only + audio-only (mux)

+

Pick one of these quick methods. They don’t re-encode, so quality stays the same.

+ +
+
+ FFmpeg — MP4 output +
ffmpeg -i video.mp4 -i audio.m4a -c copy -map 0:v:0 -map 1:a:0 output.mp4
+ +

Use when your video is MP4 (H.264) and audio is M4A/AAC.

+
+ +
+ FFmpeg — WEBM output +
ffmpeg -i video.webm -i audio.webm -c copy -map 0:v:0 -map 1:a:0 output.webm
+ +

Use when both tracks are WEBM (VP9/AV1 + Opus).

+
+ +
+ FFmpeg — mixed containers +
ffmpeg -i video.webm -i audio.m4a -c copy -map 0:v:0 -map 1:a:0 output.mkv
+ +

If containers differ, mux to mkv for best compatibility.

+
+ +
+ Windows (drag-and-drop) +
1) Install FFmpeg (add to PATH)
+2) Put video and audio next to each other
+3) Open Terminal in that folder and run one of the commands above
+
+ +
+ GNU/Linux / macOS +
# Example
+ffmpeg -i video.mp4 -i audio.m4a -c copy -map 0:v:0 -map 1:a:0 output.mp4
+
+ +
+ Android (Termux) +
pkg install ffmpeg
+cd /sdcard/Download
+ffmpeg -i video.webm -i audio.webm -c copy -map 0:v:0 -map 1:a:0 output.webm
+
+
+
@@ -261,6 +325,24 @@ chip.addEventListener('focus', () => chip.style.outline = `2px solid <%= color %>`); chip.addEventListener('blur', () => chip.style.outline = 'none'); }); + + const toClipboard = async (text, el) => { + try { + await navigator.clipboard.writeText(text); + el.dataset.copied = "1"; + const old = el.innerHTML; + el.innerHTML = ' Copied'; + setTimeout(() => { el.innerHTML = old; el.dataset.copied=""; }, 1200); + } catch (_) {} + }; + + document.querySelectorAll('.copy').forEach(btn => { + btn.addEventListener('click', () => { + const target = btn.dataset.target === 'prev' ? btn.previousElementSibling : document.querySelector(btn.dataset.target); + const code = target?.dataset.code || target?.innerText || ''; + if (code.trim()) toClipboard(code.trim(), btn); + }); + }); });