Files
2025-12-07 22:04:44 -05:00

156 lines
7.4 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.8.0 -->
<title>stack_2x</title>
<meta name="generator" content="Jekyll v3.10.0" />
<meta property="og:title" content="stack_2x" />
<meta property="og:locale" content="en_US" />
<meta name="description" content="The friendly multilateral video toolkit built for artists by artists." />
<meta property="og:description" content="The friendly multilateral video toolkit built for artists by artists." />
<link rel="canonical" href="http://localhost:4000/videobeaux/programs/effects/stack_2x.html" />
<meta property="og:url" content="http://localhost:4000/videobeaux/programs/effects/stack_2x.html" />
<meta property="og:type" content="website" />
<meta name="twitter:card" content="summary" />
<meta property="twitter:title" content="stack_2x" />
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"WebPage","description":"The friendly multilateral video toolkit built for artists by artists.","headline":"stack_2x","publisher":{"@type":"Organization","logo":{"@type":"ImageObject","url":"http://localhost:4000/videobeaux/assets/img/videobeaux.png"}},"url":"http://localhost:4000/videobeaux/programs/effects/stack_2x.html"}</script>
<!-- End Jekyll SEO tag -->
<link rel="stylesheet" href="/videobeaux/assets/css/style.css?v=5e23701ed3967d38bab12937d79f95fae74b2a53">
<!--[if lt IE 9]>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
<![endif]-->
<!-- start custom head snippets, customize with your own _includes/head-custom.html file -->
<!-- Setup Google Analytics -->
<!-- You can set your favicon here -->
<!-- link rel="shortcut icon" type="image/x-icon" href="/videobeaux/favicon.ico" -->
<!-- end custom head snippets -->
</head>
<body>
<div class="wrapper">
<header>
<h1><a href="http://localhost:4000/videobeaux/">videobeaux</a></h1>
<img src="/videobeaux/assets/img/videobeaux.png" alt="Logo" />
<p>The friendly multilateral video toolkit built for artists by artists.</p>
<p class="view"><a href="https://github.com/schwwaaa/videobeaux">View the Project on GitHub <small>schwwaaa/videobeaux</small></a></p>
</header>
<section>
<h1 id="stack_2x">stack_2x</h1>
<h2 id="description">Description</h2>
<p>Stacks two videos <strong>vertically</strong> (one on top of the other) while preserving the original orientation and aspect ratio of each source.<br />
This module creates a clean two-layer composite, useful for comparison videos, collage work, diptychs, and multi-view layouts.</p>
<h2 id="purpose">Purpose</h2>
<p><code class="language-plaintext highlighter-rouge">stack_2x</code> is designed for creators who want:</p>
<ul>
<li>a simple vertical two-video layout,</li>
<li>a clean and deterministic stacking tool with minimal configuration,</li>
<li>a fast way to create split-screen or comparison visuals,</li>
<li>diptych or layered collage structures,</li>
<li>multi-camera or multi-source presentations.</li>
</ul>
<h2 id="how-it-works">How It Works</h2>
<ol>
<li><strong>Load Primary Input</strong><br />
The global input (<code class="language-plaintext highlighter-rouge">-i input.mp4</code>) forms the top (or first) layer.</li>
<li><strong>Load Secondary Input</strong><br />
The <code class="language-plaintext highlighter-rouge">--input2</code> path loads the second video, which becomes the bottom layer.</li>
<li><strong>Vertical Stacking</strong><br />
The two frames are aligned vertically using FFmpegs stacking filters.<br />
No rotation, flipping, or aspect correction is applied unless done elsewhere in the chain.</li>
<li><strong>Encoding</strong><br />
The resulting double-height composite is encoded using the global Videobeaux settings (CRF, codec, pixel format).</li>
</ol>
<h2 id="program-template">Program Template</h2>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>videobeaux <span class="nt">-P</span> stack_2x <span class="se">\</span>
<span class="nt">-i</span> input.mp4 <span class="se">\</span>
<span class="nt">-o</span> output.mp4 <span class="se">\</span>
<span class="nt">--input2</span> VALUE
</code></pre></div></div>
<h2 id="arguments">Arguments</h2>
<ul>
<li><strong>input2</strong> — Path to the second video file to place beneath the primary input.</li>
</ul>
<h2 id="real-world-example">Real World Example</h2>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>videobeaux <span class="nt">-P</span> stack_2x <span class="se">\</span>
<span class="nt">-i</span> myvideo.mp4 <span class="se">\</span>
<span class="nt">-o</span> stack_2x_styled.mp4 <span class="se">\</span>
<span class="nt">--input2</span> EXAMPLE
</code></pre></div></div>
<h2 id="program-output">Program Output</h2>
<video controls="" preload="metadata" style="max-width:100%; border-radius:8px; margin:1em 0;">
<source src="https://github.com/schwwaaa/videobeaux/assets/7625379/6f244aba-e741-46c9-9863-7fc43527a8d6" type="video/mp4" />
Your browser does not support the video tag.
</video>
<h2 id="technical-notes">Technical Notes</h2>
<ul>
<li>Both videos should ideally share the same width; otherwise, FFmpeg will auto-scale or pad depending on filter rules.</li>
<li>Stacked output height = sum of both video heights.</li>
<li>Audio is typically taken from the primary input unless modified elsewhere in the pipeline.</li>
<li>Works well in workflows where temporal sync matters (side-by-side camera takes, A/B comparison, performance studies).</li>
<li>For mismatched aspect ratios, consider preprocessing via <code class="language-plaintext highlighter-rouge">convert_dims</code> or <code class="language-plaintext highlighter-rouge">resize</code>.</li>
</ul>
<h2 id="recommended-usage">Recommended Usage</h2>
<ul>
<li>A/B comparison videos.</li>
<li>Performance or rehearsal footage with two simultaneous takes.</li>
<li>Collage art that arranges multiple perspectives vertically.</li>
<li>Multi-layer stacks inside Lagkage.</li>
<li>Vertical diptych compositions for experimental film or social formats.</li>
</ul>
<h2 id="quality-tips">Quality Tips</h2>
<ul>
<li>The cleaner the scaling match between the two videos, the sharper the final composite.</li>
<li>Use lower CRF for crisp splits with sharp geometry.</li>
<li>To harmonize color or lighting between the two clips, apply grading (<code class="language-plaintext highlighter-rouge">lut_apply</code>, <code class="language-plaintext highlighter-rouge">gamma_fix</code>) before stacking.</li>
<li>Combine with <code class="language-plaintext highlighter-rouge">stack_3x</code> or other stacking modules for multi-row layouts.</li>
<li>Use <code class="language-plaintext highlighter-rouge">resize</code> to unify widths before stacking for the most predictable results.</li>
</ul>
</section>
<footer>
<p>This project is maintained by <a href="https://github.com/schwwaaa">schwwaaa</a></p>
<p><small>Hosted on GitHub Pages &mdash; Theme by <a href="https://github.com/orderedlist">orderedlist</a></small></p>
</footer>
</div>
<script src="/videobeaux/assets/js/scale.fix.js"></script>
</body>
</html>