<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>compost on cornball.ai</title><link>https://cornball.ai/docs/compost/</link><description>Recent content in compost on cornball.ai</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="https://cornball.ai/docs/compost/index.xml" rel="self" type="application/rss+xml"/><item><title>align_audio</title><link>https://cornball.ai/docs/compost/align_audio/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://cornball.ai/docs/compost/align_audio/</guid><description>Locate a clip&amp;rsquo;s audio within a longer narrationDescriptionNormalized cross-correlation of amplitude envelopes (10ms resolution by default): returns the offset in seconds at which clip&amp;rsquo;s audio best matches narration. Works on video files (their audio stream) and plain audio files alike.
Usagealign_audio(clip, narration, sr = 8000L, hop = 80L) Arguments clip: Media file whose audio to place. narration: The continuous reference audio (e.g. the track&amp;rsquo;s audio.mp3). sr: Decode sample rate (default 8000).</description></item><item><title>align_overlaps</title><link>https://cornball.ai/docs/compost/align_overlaps/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://cornball.ai/docs/compost/align_overlaps/</guid><description>Align a chunk sequence to its narration and derive per-join overlapsDescriptionPlaces each chunk on the narration clock via [align_audio], then derives each join&amp;rsquo;s overlap from the positions: the seconds by which chunk j&amp;rsquo;s video runs past where chunk j+1&amp;rsquo;s content begins (clamped at 0 = butt join). This is layout truth by construction &amp;ndash; a chained chunk&amp;rsquo;s duplicated head and an undersized chunk&amp;rsquo;s shortfall both fall out of where the words actually are.</description></item><item><title>audio_concat</title><link>https://cornball.ai/docs/compost/audio_concat/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://cornball.ai/docs/compost/audio_concat/</guid><description>Concatenate Audio Files with Exact Silence GapsDescriptionJoins inputs in order into one audio file, inserting gap seconds of silence between consecutive inputs and tail seconds after the last. Every input is resampled and remixed to a common format first, so inputs need not match. One encode, chosen by the output extension.
Usageaudio_concat(inputs, output, gap = 0, tail = 0, sample_rate = NULL, channels = NULL, bitrate = NULL, overwrite = TRUE, dry_run = FALSE) Arguments inputs: Character vector of audio file paths, in order.</description></item><item><title>audio_convert</title><link>https://cornball.ai/docs/compost/audio_convert/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://cornball.ai/docs/compost/audio_convert/</guid><description>Convert an Audio FileDescriptionRe-encode an audio (or A/V) file&amp;rsquo;s audio to a new container, sample rate, channel count, or codec via ffmpeg. The output format is inferred from the output extension. With no optional arguments it is a straight transcode.
Usageaudio_convert(input, output, sample_rate = NULL, channels = NULL, bitrate = NULL, codec = NULL, overwrite = TRUE, dry_run = FALSE) Arguments input: Path to input audio (or A/V) file. output: Path for output file; extension selects the format.</description></item><item><title>broadcast_audio</title><link>https://cornball.ai/docs/compost/broadcast_audio/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://cornball.ai/docs/compost/broadcast_audio/</guid><description>Broadcast-Clean an Audio FileDescriptionThe standard broadcast chain: a high-pass to kill rumble, optional 60/120/180 Hz hum notches plus FFT denoise, a 4:1 compressor, loudness normalisation to target_lufs, and short in/out fades.
Usagebroadcast_audio(input, output, dehum = TRUE, target_lufs = -14, fade = 0.06, highpass = 80, overwrite = TRUE, dry_run = FALSE) Arguments input: Path to input audio (or A/V) file. output: Path for output file. dehum: Apply the 60/120/180 Hz hum notches + FFT denoise (default TRUE).</description></item><item><title>chromakey</title><link>https://cornball.ai/docs/compost/chromakey/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://cornball.ai/docs/compost/chromakey/</guid><description>Chromakey (Green/Blue Screen) CompositingDescriptionRemove a colored background from foreground footage and composite onto a background video or image using FFmpeg&amp;rsquo;s chromakey filter.
Usagechromakey(background, foreground, output, color = &amp;#34;0x00ff00&amp;#34;, similarity = 0.1, blend = 0.075, overwrite = TRUE, dry_run = FALSE) Arguments background: Path to background video or image. foreground: Path to foreground video with green/blue screen. output: Path for output video file. color: Hex color to key out (default &amp;ldquo;0x00ff00&amp;rdquo; for green).</description></item><item><title>colorkey</title><link>https://cornball.ai/docs/compost/colorkey/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://cornball.ai/docs/compost/colorkey/</guid><description>Colour-Key to a ProRes 4444 File with AlphaDescriptionKey out a flat background colour and write ProRes 4444 (yuva444p10le) so the alpha channel survives. Where chromakey composites the keyed foreground straight onto a background, this writes a standalone alpha clip you overlay later. By default the key colour is auto-sampled from a corner pixel (generated backgrounds are sometimes black, sometimes grey); pass color to override.
Usagecolorkey(input, output, color = &amp;#34;auto&amp;#34;, similarity = 0.</description></item><item><title>compose_layout</title><link>https://cornball.ai/docs/compost/compose_layout/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://cornball.ai/docs/compost/compose_layout/</guid><description>Compose Video Streams onto a Canvas per a LayoutDescriptionPaints each named source into its slot&amp;rsquo;s pixel rect on a black canvas, in slot order (first = bottom). fit = &amp;quot;fill&amp;quot; covers the rect (scale-up + center-crop, for heads); fit = &amp;quot;fit&amp;quot; contains (scale-down + centered pad, for content). Every chain is normalized (fps, square pixels, yuv420p), non-reference chains freeze their last frame if shorter, and the output is cut frame-exactly to the reference source&amp;rsquo;s length.</description></item><item><title>concat</title><link>https://cornball.ai/docs/compost/concat/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://cornball.ai/docs/compost/concat/</guid><description>Concatenate Video SegmentsDescriptionJoin multiple video files sequentially using FFmpeg&amp;rsquo;s concat demuxer. All inputs should have compatible codecs and dimensions.
Usageconcat(inputs, output, overwrite = TRUE, dry_run = FALSE) Arguments inputs: Character vector of paths to input video files. output: Path for output video file. overwrite: If TRUE (default), overwrite output file. dry_run: If TRUE, return the FFmpeg command without executing. ValueInvisibly returns the output path. If dry_run, returns command string.
Examplesconcat(c(&amp;#34;part1.mp4&amp;#34;, &amp;#34;part2.</description></item><item><title>crossfade_concat</title><link>https://cornball.ai/docs/compost/crossfade_concat/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://cornball.ai/docs/compost/crossfade_concat/</guid><description>Crossfade-concatenate clips, optionally overlaying one audio trackDescriptionJoins videos in order, dissolving each transition over fade seconds (the duplicated conditioning overlap, so the blend is between near-identical frames and is invisible). When audio is given it becomes the sole audio track &amp;ndash; the right move for chained chunks, whose per-chunk audio has a silent conditioning head; the continuous narration has no such gaps. Without audio, the first clip&amp;rsquo;s audio is mapped through.</description></item><item><title>frame_export</title><link>https://cornball.ai/docs/compost/frame_export/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://cornball.ai/docs/compost/frame_export/</guid><description>Export a Single Frame at a Given TimeDescriptionPull one frame from a video at time seconds and write it as an image. A call-by-call primitive: no timeline, no asset lookup. The caller (an editor such as kerNLE) decides which file and which time; this just extracts the frame. Seeking is placed before -i for a fast keyframe seek.
Usageframe_export(input, time, output, overwrite = TRUE, dry_run = FALSE) Arguments input: Path to input video.</description></item><item><title>frames_clip</title><link>https://cornball.ai/docs/compost/frames_clip/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://cornball.ai/docs/compost/frames_clip/</guid><description>Encode a Numbered Frame Sequence as a Video ClipUsageframes_clip(dir, output, fps = 30, pattern = &amp;#34;frame_%04d.png&amp;#34;, start = 1L, size = NULL, overwrite = TRUE, dry_run = FALSE) Arguments dir: Directory holding the frames. output: Path for the output video file. fps: Frame rate the sequence was drawn at (default 30). pattern: C-style filename pattern of the frames (default `&amp;ldquo;frame_%04d.png&amp;rdquo;}).} start: Number of the first frame (default 1). size: Output dimensions as c(width, height), or NULL (default) to keep the source dimensions.</description></item><item><title>hstack</title><link>https://cornball.ai/docs/compost/hstack/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://cornball.ai/docs/compost/hstack/</guid><description>Horizontally Stack Two VideosDescriptionStack two videos side by side using FFmpeg&amp;rsquo;s hstack filter.
Usagehstack(left, right, output, width_left = NULL, width_right = NULL, height = 1080, overwrite = TRUE, dry_run = FALSE) Arguments left: Path to left video. right: Path to right video. output: Path for output video file. width_left: Width in pixels for left video (default: auto from height). width_right: Width in pixels for right video (default: auto from height). height: Output height in pixels (default 1080).</description></item><item><title>normalize_audio</title><link>https://cornball.ai/docs/compost/normalize_audio/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://cornball.ai/docs/compost/normalize_audio/</guid><description>Normalize Audio LoudnessDescriptionA single loudnorm pass to an EBU R128 / ITU-R BS.1770 target &amp;ndash; the light-touch cousin of broadcast_audio, which wraps loudnorm in a full mastering chain (high-pass, de-hum notches, compression, fades). Use this to level takes that are already clean, e.g. TTS output across a batch of tracks.
Usagenormalize_audio(input, output = input, integrated = -16, lra = 11, tp = -1.5, bitrate = &amp;#34;192k&amp;#34;, overwrite = TRUE, dry_run = FALSE) Arguments input: Path to input audio (or A/V) file.</description></item><item><title>overlay</title><link>https://cornball.ai/docs/compost/overlay/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://cornball.ai/docs/compost/overlay/</guid><description>Overlay Foreground onto BackgroundDescriptionComposite a PNG (with alpha) or video over a background video or image using FFmpeg&amp;rsquo;s overlay filter.
Usageoverlay(background, foreground, output, x = 0, y = 0, scale = NULL, shortest = TRUE, overwrite = TRUE, dry_run = FALSE) Arguments background: Path to background video or image. foreground: Path to foreground video or PNG (alpha supported). output: Path for output video file. x: Horizontal offset for overlay placement (default 0).</description></item><item><title>pad</title><link>https://cornball.ai/docs/compost/pad/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://cornball.ai/docs/compost/pad/</guid><description>Scale to Fit and Pad onto a CanvasDescriptionScales input to fit within fit_width x fit_height (preserving aspect ratio, never upscaling past the box), then pads the result onto a width x height canvas at x,y filled with color. This is the ffmpeg scale=...:force_original_aspect_ratio=decrease,pad=... idiom for letterboxing media into a fixed frame (e.g. a square clip into 1080x1920 vertical shorts with the video at the top and a black caption strip below).</description></item><item><title>pip</title><link>https://cornball.ai/docs/compost/pip/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://cornball.ai/docs/compost/pip/</guid><description>Picture-in-Picture Corner OverlayDescriptionComposite a foreground clip (a character, a webcam, a logo) into a corner of the background, scaled and inset by a pixel margin. A convenience wrapper over the overlay filter: it computes corner placement with main_w/ overlay_w expressions, which the fixed numeric offsets of overlay cannot express. Coordinates are top-left, +Y down.
Usagepip(background, foreground, output, scale = 0.604, margin = 230, corner = c(&amp;#34;upper-right&amp;#34;, &amp;#34;upper-left&amp;#34;, &amp;#34;lower-right&amp;#34;, &amp;#34;lower-left&amp;#34;), overwrite = TRUE, dry_run = FALSE) Arguments background: Path to background video or image.</description></item><item><title>probe</title><link>https://cornball.ai/docs/compost/probe/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://cornball.ai/docs/compost/probe/</guid><description>Probe Video MetadataDescriptionQuery video file properties via ffprobe.
Usageprobe(file, field = &amp;#34;duration&amp;#34;) Arguments file: Path to media file. field: Field to query. One of &amp;ldquo;duration&amp;rdquo;, &amp;ldquo;width&amp;rdquo;, &amp;ldquo;height&amp;rdquo;, &amp;ldquo;codec_name&amp;rdquo;, &amp;ldquo;r_frame_rate&amp;rdquo;, or any valid ffprobe stream entry. Use &amp;ldquo;all&amp;rdquo; to return duration, width, height, and codec as a named list. ValueFor single fields, returns a numeric value (duration, width, height) or character string (codec_name, etc.). For field = &amp;ldquo;all&amp;rdquo;, returns a named list.</description></item><item><title>render_timeline</title><link>https://cornball.ai/docs/compost/render_timeline/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://cornball.ai/docs/compost/render_timeline/</guid><description>Render an OTIO Timeline to a Video FileDescriptionLowers a rotio (OpenTimelineIO) Timeline to a single ffmpeg invocation and renders it. The video track&amp;rsquo;s clips are concatenated in order; an optional separate audio track is mapped over them; a framing transform (scale + pad, from metadata$cornball$framing) and an optional caption burn (from a caption track referencing an .ass/.srt file) are applied.
Usagerender_timeline(timeline, output, media_dir = NULL, overwrite = TRUE, dry_run = FALSE) Arguments timeline: A rotio Timeline, or a path to a .</description></item><item><title>rms_curve</title><link>https://cornball.ai/docs/compost/rms_curve/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://cornball.ai/docs/compost/rms_curve/</guid><description>Per-window RMS curve of an audio fileDescriptionRuns one ffmpeg astats pass over file and returns the RMS level of each fixed-size window. Quieter windows (more-negative dB) mark pauses, so the curve is a cheap way to find good places to cut. About 140x realtime.
Usagerms_curve(file, window = 1024L) Arguments file: Path to an audio (or audio-bearing video) file. window: Window size in samples (default 1024; ~64ms at 16kHz). Smaller windows give finer time resolution at more rows.</description></item><item><title>still_clip</title><link>https://cornball.ai/docs/compost/still_clip/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://cornball.ai/docs/compost/still_clip/</guid><description>Render a Still Image as a Video ClipDescriptionTurns one image into a video of duration seconds, optionally animated by a deterministic Ken Burns pan/zoom described by motion. Both the static and the animated case go through ffmpeg&amp;rsquo;s zoompan, so the outputs are byte-compatible for concat and crossfade_concat regardless of motion.
Usagestill_clip(image, output, duration, fps = 30, size = NULL, motion = NULL, overwrite = TRUE, dry_run = FALSE) Arguments image: Path to the input image (png, jpg, &amp;hellip;).</description></item><item><title>subclip</title><link>https://cornball.ai/docs/compost/subclip/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://cornball.ai/docs/compost/subclip/</guid><description>Extract a Time Range from a Media FileDescriptionCut [start, start + duration] (or [start, end]) out of an audio or video file via ffmpeg. Re-encodes by default for frame-accurate cuts; set reencode = FALSE for a fast stream copy (cuts land on keyframes).
Usagesubclip(input, output, start = 0, duration = NULL, end = NULL, reencode = TRUE, overwrite = TRUE, dry_run = FALSE) Arguments input: Path to input media. output: Path for the extracted output; extension selects the format.</description></item><item><title>vstack</title><link>https://cornball.ai/docs/compost/vstack/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://cornball.ai/docs/compost/vstack/</guid><description>Vertically Stack Two VideosDescriptionStack two videos vertically (top over bottom) using FFmpeg&amp;rsquo;s vstack filter. Useful for YouTube Shorts layout (e.g. SadTalker top + slideshow bottom).
Usagevstack(top, bottom, output, height_top = NULL, height_bottom = NULL, width = 1080, overwrite = TRUE, dry_run = FALSE) Arguments top: Path to top video. bottom: Path to bottom video. output: Path for output video file. height_top: Height in pixels for top video (default: auto from width).</description></item><item><title>zoom</title><link>https://cornball.ai/docs/compost/zoom/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://cornball.ai/docs/compost/zoom/</guid><description>Zoom Video with Stepped LevelsDescriptionApply a stepped zoom effect to a video, changing zoom level at STT line boundaries. Uses 3 levels (no zoom, single, double) with smooth transitions between them. The pattern randomly alternates between zoom-in, hold, and zoom-out phases.
Usagezoom(input, output, stt, amount = 0.05, levels = 3, transition = 0.3, seed = NULL, width = NULL, height = NULL, overwrite = TRUE, dry_run = FALSE) Arguments input: Path to input video.</description></item></channel></rss>