9:16 recording: positionable crop strip + on-screen guide frame
New controls in the Registra tab: a 'Posizione taglio' slider choosing WHICH strip of the screen survives the cover-crop when the format differs from the display (ffmpeg crop x/y driven by cropX 0..1), and a guide checkbox. The guide is a dashed frame + dimmed surroundings drawn on the output window (outside #stage, last in DOM, overlay only — composeFrame never captures it), live-updated from slider/format and hidden when no crop applies. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XVMQ2JhsJ77pGKqcvvFHqc
This commit is contained in:
1 parent
51c6bca2c8
commit
c2709ff158
6 files changed
+86
-5
No files matched your search
@@ -319,7 +319,10 @@ function transcodeToMp4(input, output, opts) {
|
||||
// Rescale/crop needed (e.g. vertical reels) or non-H264 fallback source.
|
||||
// Post-processing, not realtime: spend encode time on quality. -r 60
|
||||
// turns the recorder's variable frame timing into constant fps.
|
||||
const vf = `scale=${w}:${h}:force_original_aspect_ratio=increase,crop=${w}:${h}`;
|
||||
// cropX 0..1 picks WHICH strip survives the cover-crop (0.5 = centre).
|
||||
const p = Math.max(0, Math.min(1, (opts && opts.cropX != null) ? opts.cropX : 0.5));
|
||||
const vf = `scale=${w}:${h}:force_original_aspect_ratio=increase,` +
|
||||
`crop=${w}:${h}:(iw-ow)*${p.toFixed(3)}:(ih-oh)*${p.toFixed(3)}`;
|
||||
args.push('-vf', vf, '-r', '60',
|
||||
'-c:v', 'libx264', '-preset', 'slow', '-crf', '16', '-pix_fmt', 'yuv420p',
|
||||
'-c:a', 'aac', '-b:a', '256k');
|
||||
|
||||
Reference in new issue
Block a user