edith
Clone
https://git.tahinli.com/Tahinli/edith.git
0 watching0 forksRust18.3 MiBff99ad6Tahinli6 days ago1055 commits
| 1 | //! The agent's cheat sheet: the `edith://help` resource, the `help` tool, and the |
| 2 | //! first lines of the initialize `instructions`. The tool list and the edit op |
| 3 | //! list are read from the live tool table, so the sheet cannot drift from what |
| 4 | //! the server accepts. The edit op manual is the `edit` tool's description, so the |
| 5 | //! per-op entries are parsed from it rather than copied. |
| 6 | |
| 7 | use ; |
| 8 | |
| 9 | use crate; |
| 10 | |
| 11 | /// The fixed topics, besides the edit op names and the tool names. |
| 12 | const TOPICS: = |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | ; |
| 34 | |
| 35 | /// Tool groups in the order the sheet lists them. A registered tool that is in no |
| 36 | /// group lands under `other`, and a test fails if that happens. |
| 37 | const GROUPS: & = & |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | ; |
| 52 | |
| 53 | /// The opening line of the sheet. Its topic list is `TOPICS`, so it cannot drift from what `section` answers. |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | const ADDRESSES: &str = "\ |
| 62 | ADDRESSES |
| 63 | V1@450 clip: the clip on lane V1 that starts at frame 450 (starts are unique in a lane) |
| 64 | V1#0 clip by index, 0-based: V1#0 is the first clip on V1, V1#2 the third; resolved at once, so do not hold it across edits |
| 65 | V1 A1 S1 lanes, named as the GUI names them (S1 holds captions) |
| 66 | src:2 a source, as media_import reports it (src:2 interview_a.mp4) |
| 67 | C@450 / C#1 chapter: C@450 the chapter that starts at frame 450, C#1 the first chapter in the list |
| 68 | M@450 / M#1 comment marker: M@450 the first marker on frame 450, M#1 the first marker in the list |
| 69 | Every edit reply lists the NEW addresses of what it touched. Use those, not old ones. |
| 70 | Addresses in one batch refer to the timeline as the previous op left it."; |
| 71 | |
| 72 | const TIMES: &str = "\ |
| 73 | TIMES |
| 74 | 450f frames (the model works in frames; replies show 450f (15.000s)) |
| 75 | 15.0s or 15 seconds |
| 76 | 00:00:15:00 timecode at the project fps, HH:MM:SS:FF |
| 77 | 02:14.300 minutes, seconds, milliseconds (MM:SS.fff) |
| 78 | end the end of the timeline: the latest end of any lane, not the end of one lane |
| 79 | Seconds round to the nearest frame: 2.5 s at 25 fps is frame 63 (62.5 rounds up). |
| 80 | A distance (`by` of roll, slip and slide) takes these forms with a sign: -15f, +0.5s, -00:00:01:00. A bare number is seconds."; |
| 81 | |
| 82 | const VALUES: &str = "\ |
| 83 | VALUES |
| 84 | color: brightness -1..1 (0 is none), contrast 0..2 (1 is none), saturation 0..2 (1 is none), tint -1..1 (0 is none) |
| 85 | gain db -60..24 · lane_gain db -60..12 · speed 0.25..4 |
| 86 | A still image is placed 5 s long unless the project says otherwise (project_settings still_secs, 0.5 to 600 s), and a trim can take it up to 600 s."; |
| 87 | |
| 88 | const GROUPS_AND_LINKS: &str = "\ |
| 89 | GROUPS AND LINKS |
| 90 | Clips that share a link (a take, such as V1+A1) are one unit in the GUI. |
| 91 | The ops tagged [group] follow the whole take: trim, roll, slip, slide, move, delete, speed, sub_move. trim scope:\"clip\" unlinks the edge's clip first. |
| 92 | fade, dissolve and transition reach the linked sound too (linked:false keeps them on the one clip). |
| 93 | Every other op acts on the one clip alone: lift leaves a gap on that clip's lane only. group and ungroup set and clear a take."; |
| 94 | |
| 95 | const UNDO: &str = "\ |
| 96 | UNDO |
| 97 | One edit call is one undo step. Its ops run in order; if one fails, the earlier ones roll back and the error names it. |
| 98 | undo {steps} and redo {steps} take back or re-apply whole batches. dry_run:true reports, then rolls back. |
| 99 | A batch with no label is named after its first op (\"place V1\", \"trim V1@0\"); edit {label:\"…\", ops} names it. |
| 100 | media_remove {source} of a source other than the last one renumbers the sources after it, which clears undo: refused unless force:true. |
| 101 | checkpoint {name} saves the whole project under a name; restore {name} returns to it (it clears undo history)."; |
| 102 | |
| 103 | /// `help {topic:"first_video"}`: the order to build a first video in, saving as it goes. |
| 104 | const FIRST_VIDEO: &str = "\ |
| 105 | FIRST VIDEO: a first cut from nothing, one stage at a time. Save after every stage (project_save), and before you end a run: nothing is on disk until you do. |
| 106 | 1. project_new {path:\"<dir>/talk.edith\", fps:30, resolution:\"1920x1080\"} — an empty project at a new path (nothing is written yet). |
| 107 | 2. media_import {paths:[\"<clip>.mp4\", \"<music>.mp3\"]} — the files become src:0, src:1 ...; nothing is placed. A file already imported says \"already imported as src:N\" and adds nothing. project_save. |
| 108 | 3. Each extra sound lane (music on A2, narration on A3) needs its own lane_add, one op per lane. For this recipe that is two: edit {ops:[{op:\"lane_add\", kind:\"audio\"}, {op:\"lane_add\", kind:\"audio\"}]} adds A2, then A3. A place or append to a lane that does not exist refuses; lane_add it first. project_save. |
| 109 | 4. edit {ops:[{op:\"place\", source:\"src:0\", at:\"0s\"}]} puts the picture on V1 and its sound on A1; edit {ops:[{op:\"append\", source:\"src:0\"}]} adds after the last clip. length:\"5s\" sets the duration from in instead of out. Music bed: edit {ops:[{op:\"append\", source:\"src:1\", lane:\"A2\", until:\"30s\"}]} (A2 comes from step 3; src:1 is a song of 30 s or more, so the bed is one clip; until LOOPS a shorter source into one clip per repeat, and trims a longer one to the span). project_save. |
| 110 | 5. voiceover {text:\"...\", pause:0.4, place:{lane:\"A3\", at:\"0s\"}} needs a project path (project_new or project_open); the WAV is written beside the .edith file in voiceover/, even before project_save. It imports the WAV as a source and places it when place is given. record {action:\"start\", lane:\"A3\"} then record {action:\"stop\"} is the microphone version: it records from the audio input and places the take the same way. voiceover speaks text with Piper and never records. The voiceover is unsaved until project_save: the project file does not name its WAV before then. project_save. |
| 111 | 6. auto_captions {target:\"A3\"} transcribes the narration lane and writes the words to S1. project_save. (A1 is the picture's own sound: it has no words to caption here.) |
| 112 | 7. export_start {out:\"<dir>/talk.mp4\"} returns job:1 at once; export_status {job:1} reports progress until it is done. |
| 113 | Length: a picture shorter than the music bed leaves black at the end, since the bed plays on over nothing. Trim the bed to the picture: edit {ops:[{op:\"trim\", clip:\"A2@0\", edge:\"out\", to:\"<the picture's end>\"}]}. Or make the picture longer: for a still, edit {ops:[{op:\"trim\", clip:\"V1@0\", edge:\"out\", to:\"<the bed's end>\"}]}; for video, append more picture after it. timeline shows where each lane ends. |
| 114 | Peaks: export_status warns when the job finishes if the file's true peak is above -1 dBTP (exactly -1 is within spec); the ceiling to aim at is -1 dBTP for lossless (wav, flac) and -2 dBTP for lossy (mp4, mkv, webm, mp3, ogg, m4a), since encoding can overshoot the mix; a true peak over 0 dBTP clips. Add the master limiter before export with project_settings {limiter:{on:true, ceiling_db:-1}} (ceiling_db:-2 for a lossy export); or normalize {target:\"mix\", allow_limiter:true, true_peak:-2} (-1 for lossless) sets the level in one undo step, and turns the limiter on at that ceiling only when the peak would otherwise hold the gain back (its reply says so). |
| 115 | After each stage, read the result with timeline (or frame / contact_sheet for a picture check). A reply that says \"no change\" or names a refusal means that step did not happen: fix it, then go on."; |
| 116 | |
| 117 | const PODCAST: &str = "\ |
| 118 | PODCAST: two speakers on A1 and A2, a music bed on A3 ducked under both, each speaker levelled on its own, then captions from both. Save after each stage (project_save). |
| 119 | 1. project_new {path:\"<dir>/show.edith\", fps:30, resolution:\"1920x1080\"}, then media_import {paths:[\"<host>.wav\", \"<guest>.wav\", \"<bed>.mp3\"]}. |
| 120 | 2. Speakers: edit {ops:[{op:\"place\", source:\"src:0\", lane:\"A1\", at:\"0s\"}]} puts the host on A1. A2 does not exist yet, so add it first: edit {ops:[{op:\"lane_add\", kind:\"audio\"}]}; then edit {ops:[{op:\"place\", source:\"src:1\", lane:\"A2\", at:\"0s\"}]} puts the guest there. Both start at 0 s, because each was recorded on its own track for the whole conversation: the two files play together, not one after the other. |
| 121 | Cut their silences together: cut_silence {lanes:[\"A1\",\"A2\"], dry_run:true}, then the same without dry_run. A joint cut (lanes with no target) removes a pause only where every listed lane is quiet at once, and a lane with no sound there (a gap between its clips, or no clip) counts as quiet. So while one speaker talks, the other lane is quiet but the talker's is not, and nothing is cut; only the stretches where both are quiet, the gaps between turns, are shortened, and the same span comes out of both lanes, so the turns stay in step. The reply's \"pauses now\" is measured on that joint quiet. Caption lanes ripple with the cut; locked caption lanes stay. |
| 122 | 3. Bed: edit {ops:[{op:\"lane_add\", kind:\"audio\"}]} adds A3, then edit {ops:[{op:\"append\", source:\"src:2\", lane:\"A3\", until:\"<end of the talk>\"}]} lays the bed there. Lay it after the cuts in step 2, so <end of the talk> is where the talk now ends (timeline shows each lane's end). A cut made after the bed is placed (the step 5 fillers, or a later cut_silence) leaves the bed running past the talk: trim it to the new end with edit {ops:[{op:\"trim\", clip:\"A3@0\", edge:\"out\", to:\"<the talk's new end>\"}]}. Duck it under each speaker: edit {ops:[{op:\"duck\", lane:\"A3\", under:\"A1\"}, {op:\"duck\", lane:\"A3\", under:\"A2\"}]}. |
| 123 | 4. Level each speaker alone: normalize {lanes:[\"A1\",\"A2\"], each:true, lufs:-16}. Its reply gives each lane's loudness before and after. A speaker with high peaks often cannot reach -16 LUFS under the -1 dBTP ceiling: the reply holds that lane to the true-peak ceiling (structuredContent carries it as capped_by: true_peak), and the lane stops short. This is expected for speech. A quiet speaker needs no manual clip gain: normalize takes the lane up to its +12 dB lane gain limit and puts the rest on that lane's clips (each up to +24 dB of clip gain), all in the same undo step. Only when even that is not enough does the reply say so with capped_by: clip_gain_limit; then raise that speaker's clip gain yourself (edit {ops:[{op:\"gain\", clip:\"A1@0\", add_db:3}]}) and normalize the lanes again. Then the whole mix: normalize {target:\"mix\", lufs:-16, allow_limiter:true, true_peak:-1} for a lossless or WAV export, true_peak:-2 for m4a or mp3 (lossy encoding overshoots the mix); the limiter is what lets the mix reach the target when the peak alone would hold it back. If the mix still falls short (its reply gives short_by_lu), the reply names the cap that holds it (capped_by): accept a target the peaks allow (-18 LUFS, say), or raise the quiet lane's clip gain as above. dry_run:true on either shows the plan first. |
| 124 | 5. Fillers (optional, before the captions): do not cut a filler on one speaker's lane with find_words {cut:true} alone. A ripple moves only that lane, so the other speaker's lane falls out of step. Use the no-ripple form instead: find_words {query:\"um\", target:\"A1\", cut:\"lift\"} removes each match and leaves a hole where it was, and nothing moves. Pass the step 6 hint here too (hint:\"Jane Doe, LUFS\"): names and jargon come out spelt as the talk spells them, so the search reads them right. Or cut both lanes together, only at a joint pause (cut_silence with no target, step 2). |
| 125 | 6. Captions from both speakers into one lane: auto_captions {target:\"A1\", lane:\"S1\", hint:\"Jane Doe, LUFS\"}, then auto_captions {target:\"A2\", lane:\"S1\", hint:\"Jane Doe, LUFS\"}. Each call transcribes its own lane and adds its cues to S1, so the two speakers' captions sit in one track. hint lists the names and words the talk uses; it may get their spelling and casing right, but that is not guaranteed, so check the names in the captions. A re-run on the same lane replaces the captions that lane made before; replace:true also removes overlapping captions that differ from what was heard now (a hand edit, or the other speaker's), so use it only when those are meant to go. |
| 126 | 7. Check with timeline. A project with no picture (only A lanes) exports an .mp4 as sound alone, and its captions are dropped: export_start {out:\"<dir>/show.m4a\"} for the sound, or, for a captioned video, place a still on V1 and trim its out edge to the end of the talk (the still recipe in help {topic:\"recipes\"}). Then export_start {out:\"<dir>/show.mp4\"} (or the .m4a) and export_status {job:1} until it is done."; |
| 127 | |
| 128 | const RECIPES: &str = "\ |
| 129 | RECIPES |
| 130 | Rough cut from ranges: keep lays source ranges end to end (one undo step). |
| 131 | edit {ops:[{op:\"keep\", source:\"src:0\", ranges:[[\"10.0s\",\"22.5s\"],[\"40.0s\",\"52.0s\"]], lane:\"V1\"}]} |
| 132 | edit {ops:[{op:\"assemble\", items:[{source, in?, out?}]}]} does the same, one item per range, across several sources; each item is laid end to end after the last. |
| 133 | Trim: edit {ops:[{op:\"trim\", clip, edge, to}]} moves that edge to a timeline time. `to` is absolute (where the edge lands), not a length: edit {ops:[{op:\"trim\", clip:\"V1@0\", edge:\"out\", to:\"2s\"}]} makes the clip 2 s long from 0. There is no delta form. Add ripple:true to close the hole the edge leaves and move what follows with it (Premiere's ripple trim, Q and W in the editor). |
| 134 | edit {ops:[{op:\"trim\", clip, edge, to, scope:\"clip\"}]} on a take of three or more lanes: the other members stay linked to each other only if they have matching bounds. A 60 s picture with a 30 s bed cannot stay linked, so that trim is refused (\"its partners could not stay linked\") and nothing changes: give the members that stay together the same bounds first, or trim with the default scope (the whole take moves). A locked partner refuses (unlinking changes it). |
| 135 | Append to a lane that does not exist yet: add the lane first, edit {ops:[{op:\"lane_add\", kind:\"audio\"}]}. An append op naming A2 does not make A2: edit {ops:[{op:\"append\", source:\"src:1\", lane:\"A2\"}]} refuses until A2 exists. |
| 136 | assemble refuses a still image (src:N is a still): add a still with edit {ops:[{op:\"append\", source}]}, which puts it at the end of V1 with no hole, or edit {ops:[{op:\"place\", source, at:\"end\"}]}, which puts it at the timeline end (the latest end of any lane). They are not alternatives for one job: append extends V1, and place at:\"end\" goes to the timeline end, which leaves a hole on V1 when V1 ends sooner (a bed running on past it, say). Then trim its out edge (edit {ops:[{op:\"trim\", clip, edge:\"out\", to}]}) to change its length (5 s by default). |
| 137 | Countdown leader: edit {ops:[{op:\"generator_add\", kind:\"countdown\", from:5, at:\"0s\"}]} puts a 5 s countdown on V1 at 0 (add `lane`, `at` to put it elsewhere); insert_time first if the programme should start after it. |
| 138 | Tint everything under with an adjustment layer: edit {ops:[{op:\"adjustment_add\", at:\"0s\", duration:\"30s\"}, {op:\"color\", clip:\"V2@0\", tint:0.3, saturation:0.8}]} grades every lane below V2 for those 30 s; effect add on the layer does the same for blur or a vignette. enable {clip:\"V2@0\", on:false} switches it off without removing it. A transform on an adjustment layer moves the whole composite below it (uncovered area goes black); crop only limits where the layer reaches, so cropped-away areas keep the untouched picture. Adjacent adjustment layers hard-cut. |
| 139 | Reverse a clip: edit {ops:[{op:\"reverse\", clip:\"V1@0\"}]} toggles it (on:true or on:false sets it), picture and sound together with its take. It keeps its place and length and composes with speed: reverse, then speed x:2 plays it backward at double rate. clip_info and timeline say reversed. |
| 140 | Cut silence: read the regions, preview the cut, then cut. |
| 141 | silence {target:\"A1\"}, or {target:\"src:2\"} to scan a source (threshold_db, min_silence, padding, min_keep) |
| 142 | cut_silence {target:\"A1\", dry_run:true}, then cut_silence {target:\"A1\"}. It cuts only pauses of min_silence or longer. When none qualifies, the reply names the longest quiet it found and cuts nothing, so lower min_silence (or padding) and run it again. |
| 143 | min_silence (default 0.5 s, judged before padding) is the shortest quiet run it cuts: shorter ones are ignored. |
| 144 | keep:N is the total pause left in each silence, padding included (default 0.4). The padding at each end is never cut; under 2 × padding the pause is 2 × padding. The reply says \"pauses now X s\". A silence at or under keep is left alone, and when none is longer the reply says nothing was cut. lanes: with a target, it is the ripple scope, judged on the target alone (the target's lane is added if missing); by default the target's lane and its linked lanes, and a mix target cuts every lane. Without a target, two or more audio lanes are cut jointly where all are quiet: lanes:[\"A1\",\"A2\"] makes a joint cut with no target: the silence is where every listed lane is quiet at once, and the listed lanes are cut together, so their turns stay in step. Locked lanes: a locked lane named in lanes, or linked to the target, refuses the cut (unlock it with lane_flags); a mix's default scope (every lane) refuses the same way, naming each locked lane, and changes nothing. Unlisted audio lanes the cut runs through are reported as out of step. |
| 145 | silence: judged inside clips only; the timeline gaps between a lane's clips are structure and are reported, never listed or cut. Default threshold: 30 dB under the target's median speech level (−90..−10 dBFS); the reply names the value used. min_silence is judged before padding. |
| 146 | cut_silence: a silence that runs to the end of its clip keeps `keep` in all after the last speech, its end padding included. Gaps between clips are never cut. |
| 147 | Caption lanes ripple with the cut; locked caption lanes stay (a locked caption lane in the scope is skipped with a note). |
| 148 | mode:\"speed_up\" plays each silence faster instead of cutting it (rate 1.05–4, default 4); mode:\"keep_silence\" cuts the speech and keeps the silence (one target, no joint cut). Both take dry_run and undo like the cut. |
| 149 | Normalize loudness: measure the mix, then set it. |
| 150 | loudness {target:\"mix\"}, then normalize {target:\"mix\", lufs:-14}; its reply leads with whether the target was reached. |
| 151 | When the true-peak ceiling holds the gain back (the reply's capped_by is true_peak), add allow_limiter:true with true_peak set to the ceiling (-1 for lossless, -2 for lossy): the limiter then lets the mix reach the target, and the reply says it switched the limiter on. |
| 152 | dry_run:true reports the planned gain per lane and changes nothing. |
| 153 | Each lane alone: normalize {lanes:[\"A1\",\"A2\"], each:true, lufs:-16} sets each listed audio lane on its own, so each one alone measures lufs over its clips (two speakers at different levels come out even). Each lane's gain moves by itself, with the true-peak ceiling checked per lane; one undo step for all of them. Needs lanes, not target, and no allow_limiter. |
| 154 | Targets (lufs): streaming, YouTube and Spotify -14; Apple -16; podcasts -16 (stereo); broadcast (EBU R128) -23; TikTok and Instagram about -14. |
| 155 | Copy a look: edit {ops:[{op:\"copy_look\", from, to:[addrs] | to_lane, what?}]} copies the look of clip `from` onto each clip in `to` (or every clip on |
| 156 | `to_lane`) in one undo step. what is a list of \"color\" (the default), \"transform\", \"fit\", \"effects\" (picture clips only), \"eq\", \"gain\" (sound |
| 157 | clips only) or \"speed\" (rate, ramp and reverse, from and to any media clip); a target the part does not fit is named as skipped. from must carry a look: a plain clip has none, so copying it onto a plain clip replies \"nothing to copy\" (no change). e.g. edit {ops:[{op:\"copy_look\", from:\"V1@0\", to:[\"V1@30\"], what:[\"color\",\"transform\"]}]} Prerequisite: V1@0 is a picture clip with a look (a colour grade from the color op, or a transform) and V1@30 a second picture clip starting at frame 30; both must already exist. |
| 158 | Effects: vignette plus soft blur. effect {op:\"add\", clip:\"V1#0\", kind:\"vignette\", params:{amount:0.6}}, then effect {op:\"add\", clip:\"V1#0\", kind:\"blur\", params:{radius:4}}; effect {op:\"list\", clip:\"V1#0\"} shows the stack, effect {op:\"set\", clip:\"V1#0\", index:1, on:false} switches the blur off. The stack runs in order on the placed picture, in preview and export; distances are pixels at 1080 lines. Each op is one undo step. Prerequisite: V1#0 is a picture clip. |
| 159 | Green screen over a background: put the background on V1 and the green-screen take on V2, then effect {op:\"add\", clip:\"V2#0\", kind:\"chroma_key\", color:\"#00ff00\", params:{tolerance:0.35, softness:0.1, spill:0.5}}; the keyed-out part shows V1. effect {op:\"list\"} gives every kind with its ranges; masks (rect_mask, ellipse_mask) and blend {mode:\"screen\"} work the same way. pixelate {size} mosaics the picture (size is the block in pixels at 1080 lines); after a mask it censors only that shape, e.g. effect {op:\"add\", clip:\"V1#0\", kind:\"pixelate\", size:24} then an ellipse_mask. A mask moves with effect {op:\"mask_keys\"} (the ops topic lists its arguments). |
| 160 | Grade a clip: wheels to balance, curves to shape, a LUT for the look, the sliders to trim; read the scopes between steps. |
| 161 | edit {ops:[{op:\"wheels\", clip:\"V1@0\", lift:[0, 0.05, 0, -0.03]}, {op:\"curves\", clip:\"V1@0\", master:[[0.25, 0.2], [0.75, 0.8]]}, {op:\"lut\", clip:\"V1@0\", path:\"~/luts/warm.cube\", mix:0.7}]} |
| 162 | scopes {at:\"2s\"} gives the waveform, the RGB parade and the vectorscope of that frame as numbers: crushed and clipped shares, each channel's spread, the cast. |
| 163 | Check a cut before exporting it. |
| 164 | timeline {range:{from:\"10s\", to:\"30s\"}}, contact_sheet {range:{from:\"10s\", to:\"30s\"}, count:12}, frame {at:\"450f\"} |
| 165 | Cut by transcript: read the words, find the filler or phrase, then cut its spans. The filler list is um, uh, er, ah, hmm and |
| 166 | like, but like is a real word too often: check each hit with its context before cutting it, or search a phrase instead. |
| 167 | The transcript usually leaves fillers out but not always. A filler query runs with the prompt that keeps disfluencies, so a plain find_words {query:\"um\"} still finds the ones that remain, with no flag. |
| 168 | transcript {target:\"A1\"}, then find_words {query:\"um\", target:\"A1\"} lists each match with its span; cut the spans with edit {ops:[{op:\"cut_regions\", regions:[[\"450f\",\"512f\"]]}]} |
| 169 | or find_words {query:\"um\", target:\"A1\", cut:true} removes every match in one step (which:\"first\" or which:[0,2] picks some; dry_run:true reports only). keep:\"first\" or \"last\" keeps one word of a repeat such as \"I I\". The cut takes the target's lane and its linked lanes, or every lane for a mix or src target; help {topic:\"ripple\"} says which lanes move. On one speaker's lane of a two-speaker show, cut:true ripples only that lane and desyncs the other: use cut:\"lift\" instead, which leaves a hole and moves nothing (podcast has the joint-pause option). Caption lanes ripple with the cut; locked caption lanes stay (a locked caption lane in the scope is skipped with a note). A locked lane the cut would move refuses it, dry runs too (unlock it with lane_flags); a mix's default scope skips its locked lanes with a note. With cut, each edge snaps to a pause within 150 ms of Whisper's time, so a cut lands in quiet; snap:false cuts at Whisper's times. |
| 170 | Auto captions: transcribe and place captions, then adjust the caption track. |
| 171 | auto_captions {target:\"A1\"} writes the cues to S1; hint:\"Jane Doe, LUFS\" lists the words the talk uses; it may help their spelling and casing, and near-miss spellings of them are corrected after transcription (the reply names each one), but that is not guaranteed. help {topic:\"captions\"} covers the rest of the workflow. |
| 172 | Shorts captions: animated, a few words at a time, the word being spoken highlighted. |
| 173 | auto_captions {target:\"A1\"}, then project_settings {captions:{animation:\"karaoke\", words_per_line:3, uppercase:true, highlight:\"#ffd600\"}} (saved with the project; one undo step), |
| 174 | check a frame mid-word: frame {at:\"2s\", burn_captions:{size:70, place:\"centre\", outline:\"thick\", boxed:false}}, then export_start {out, burn_captions:{size:70, place:\"centre\", outline:\"thick\", boxed:false}}. |
| 175 | Or per call, without touching the project: burn_captions:{animation:\"karaoke\", words_per_line:3, box:true}. animation word is the one-big-word style; pop and bounce are the others. help {topic:\"burn_captions\"}. |
| 176 | Cut to the beat: mark the music's beats, then cut on the markers (cuts snap to markers). |
| 177 | edit {ops:[{op:\"beats\", clip:\"A2@0\"}]} finds the tempo of that clip's sound and marks every beat as a yellow comment marker noted \"Beat\"; every:2 or every:4 marks every second or fourth beat for bars. The reply gives the BPM, the count and the M@ addresses. Running it again replaces the earlier beat markers of that clip. A picture-only clip has no sound and is refused. |
| 178 | Intro title and a lower third: a centred card over black, then a boxed caption over the picture. |
| 179 | edit {ops:[{op:\"title_add\", at:\"0\", duration:3, text:\"Episode 17\", place:\"centre\", fade_in:12, fade_out:12}, {op:\"title_add\", at:\"5.0s\", duration:4, text:\"Jane Doe, director\", place:\"bottom\", boxed:true, fade_in:12, fade_out:12}]} |
| 180 | A title past the last clip extends the timeline; edit {ops:[{op:\"title_set\", title:\"T2\", size:60}]} changes one, edit {ops:[{op:\"title_remove\", title:\"T1\"}]} takes it off (the titles after it renumber: T2 becomes T1), and timeline lists them as T lines. |
| 181 | A title can start in one of the app's looks with preset (lower_third, centered or caption_bar): edit {ops:[{op:\"title_add\", at:\"5.0s\", duration:4, text:\"Jane Doe\", preset:\"lower_third\"}]}; fields given with it win. A title can carry a look: color (\"#ffcc00\"), weight (regular|bold; Latin letters, other scripts keep their one weight), hplace (centre|left|right: the side the block sits against, the margin from the edge), align (centre|left|right: how its lines line up inside the block), box_color (\"#000000\" keeps the opacity, \"#000000c8\" sets it) and box_opacity (0..1). A lower third: edit {ops:[{op:\"title_add\", at:\"5.0s\", duration:4, text:\"Jane Doe\\nDirector\", place:\"bottom\", hplace:\"left\", align:\"left\", weight:\"bold\", boxed:true, box_color:\"#112233\", box_opacity:0.8}]}. A project that uses one saves as format v49 (an older edith refuses it by name). A title can animate in and out: in_anim and out_anim are none, fade, typewriter (letters appear one by one), slide_up, slide_left, pop (grows from 60% with a slight overshoot) or word_by_word; anim_secs is how long each takes (a bare number is seconds, default 0.5). An exit is the entrance played backwards. Example: edit {ops:[{op:\"title_add\", at:\"0\", duration:4, text:\"Episode 17\", in_anim:\"typewriter\", out_anim:\"fade\", anim_secs:0.6}]}. An animated title saves as format v54 (a titleanim line; an older edith refuses it by name). A title can also carry its own keys, which move, scale and fade it over its length: title_add keys:[{at:\"0s\", opacity:0}, {at:\"1s\", opacity:1, x:0.1, scale:1.2}] (at counts from the title's first frame; x and y are a share of the picture, scale multiplies its size, opacity its alpha; missing fields are 0, 0, 1, 1; keys:[] takes them off). Keys save as format v56 (a ttkeys line). |
| 182 | Black lead-in for an intro title: edit {ops:[{op:\"insert_time\", at:\"0\", duration:\"3s\"}]} opens black before the picture, then title_add at 0 sits over that black. |
| 183 | edit {ops:[{op:\"insert_time\", at:\"0\", duration:\"3s\"}, {op:\"title_add\", at:\"0\", duration:3, text:\"Episode 17\", place:\"centre\", fade_in:12, fade_out:12}]} |
| 184 | Speed a clip that has narration over it (the examples need a picture clip at V1@0, and the narration lane A3 from first_video): narration on its own lane (A3, as in first_video) is outside the ripple by default, so edit {ops:[{op:\"speed\", clip:\"V1@0\", x:0.5, ripple:true}]} changes the picture's length and the narration keeps its times. |
| 185 | The reply lists each clip left in place: a clip on another lane that spans the change (the music bed on A2, a narration clip on A3) stays where it is. |
| 186 | To move the narration with the picture, name its lane (prerequisite: A3 exists and holds the narration clip): edit {ops:[{op:\"speed\", clip:\"V1@0\", x:0.5, ripple:true, lanes:[\"V1\",\"A1\",\"A3\"]}]}. A lane named in lanes refuses a clip that spans the change, so move or trim that narration clip first (edit {ops:[{op:\"move\", clip, at}]}, or a trim). |
| 187 | Clips that start after the sped clip move by the length change on the lanes in scope. lanes:[\"V1\",\"A1\"] is the same as the default. |
| 188 | Dip music under a voice line: a volume envelope on the music clip, over the line's span. The span must lie inside that one clip: a file shorter than the span |
| 189 | loops into several clips under until, and a dip cannot cross them, so use a song at least as long as the span (the first_video bed is one clip). |
| 190 | Prerequisite: A2@0 is the music clip and runs to at least 25 s. |
| 191 | edit {ops:[{op:\"gain_dip\", clip:\"A2@0\", from:\"10s\", to:\"25s\", db:-18, ramp:\"0.5s\"}]} |
| 192 | The ramps start from the level there now; clip_info lists the points as timeline times. gain_key and gain_key_remove adjust one point, gain_ramp draws a single ramp, gain_keys replaces the whole envelope. For a dip that follows the speech by itself, edit {ops:[{op:\"duck\", lane:\"A2\", under:\"A1\"}]} is the automatic alternative. |
| 193 | Export: start, then poll until done. |
| 194 | export_start {out:\"~/cut.mp4\"} returns job:1; export_status {job:1} until it reports the outcome."; |
| 195 | |
| 196 | const LANES: &str = "\ |
| 197 | LANES |
| 198 | V1.. are picture lanes, A1.. sound lanes, S1.. caption lanes. Names are the GUI's. |
| 199 | lane_add {kind: video|audio|subtitle} adds one; lane_remove {lane}; lane_move {lane, to}: to is the 1-based position in the lane list as timeline prints it, and the reply maps every moved clip old → new. |
| 200 | Lanes are named by position, so a lane_move renumbers the lanes between its two places: lane_move {lane:\"V2\", to:1} makes the old V1 into V2. The reply lists each rename; use the new names after a move. |
| 201 | place {lane} sets where the picture goes; its sound still goes to A1 (or audio_lane) and stays linked to it, as with no lane (V1 and A1). audio:false places the picture alone. |
| 202 | place overwrite:true replaces only the span the new clip covers: a clip it partly covers keeps the part outside that span. |
| 203 | insert {source, in?, out?, at, to?, length?, lanes?} and overwrite {…}: the three-point edit. The source range in..out (the whole file when none) goes at `at`; `to` (a timeline out mark) or `length` sets the duration from in instead of out. It lands on `lanes` (one video lane, one audio lane), else the first unlocked V and A lanes the source has, linked as one take (a still on a video lane, a song on an audio lane). insert cuts the clip `at` falls inside and moves what follows later on those lanes only; it refuses, by name, when that would pull a linked take apart (add the partner lane to `lanes`). overwrite replaces what is there, trimming or splitting it, and moves nothing. A locked lane refuses; each is one undo step. |
| 204 | lane_name {lane, name}: the display label of a lane (like a track name), at most 40 characters; \"\" clears it. The address stays V1/A2: every op still takes V1, never the name. timeline shows the name on the lane's header line. One undo step; a locked lane refuses it. |
| 205 | lane_flags {lane, hidden?, muted?, locked?}: hidden applies to picture lanes, muted to sound |
| 206 | lanes (the other flag is refused there). A locked lane is never changed: an op that would change |
| 207 | it refuses, except that the titles and captions a ripple carries past it skip it with a note. |
| 208 | levels {target:\"A1\"} on a muted lane shows the lane's own sound, with a note that it is silent in the mix and export. |
| 209 | A sound-only source (a song, a WAV) goes on an A lane: edit {ops:[{op:\"place\", source, lane:\"A2\", at}]} or edit {ops:[{op:\"append\", source, lane:\"A2\"}]}. |
| 210 | An mp4 with no picture is sound-only too: placed with no lane, it goes to A1 alone. |
| 211 | A source with more than two sound channels (5.1, say) is mixed to stereo on export. media_probe lists each audio track's |
| 212 | channels and sample rate, and media_list names a chosen track that is not the first (\"audio 1 (fra)\"). |
| 213 | audio_track:N on place and append picks which of the file's sound tracks plays (0-based, the numbers media_probe lists as \"audio track N\"); the first track is the default. An N past the last track is refused, and the reply lists the tracks. edit {ops:[{op:\"place\", source:\"src:0\", at:\"0s\", audio_track:1}]}. |
| 214 | lane_gain {lane, db} sets a lane's level, -60..12 dB. Each clip's own gain adds on top. |
| 215 | pan {clip, pan} and lane_pan {lane, pan} place sound between the speakers, -1 (left) to 1 (right), 0 the middle; a balance, so |
| 216 | the far side is turned down and the near one stays. A clip's pan and its lane's stack. Stereo mixes only. edit {ops:[{op:\"pan\", clip:\"A1@0\", pan:-0.5}]} |
| 217 | pitch {clip, semitones (-12..12)} shifts an audio clip's pitch in semitones, fractions too (0.37), and keeps its length (12 an octave up). edit {ops:[{op:\"pitch\", clip:\"A1@0\", semitones:12}]} |
| 218 | Ducks stack: a lane can carry one duck per key lane (`under`), so several keys can pull it down. edit {ops:[{op:\"duck\", lane, under, off:true}]} |
| 219 | removes that one; edit {ops:[{op:\"duck\", lane, off:true}]} with no under clears every duck on the lane. |
| 220 | Not supported (help {topic:\"unsupported\"}): custom transition shapes. |
| 221 | Do not search the tools for them. |
| 222 | close_gaps {lane} removes the gaps on a lane. The timeline's gaps line counts them per lane. |
| 223 | timeline {lanes:[\"V1\",\"A2\"]} shows only those lanes; timeline {range:{from,to}} only the clips that overlap it. |
| 224 | The brief timeline shows up to 40 clips per lane, within a text cap of about 4 KB, and says how many more there are; timeline {lanes:[\"V1\"], page:N} pages one lane at 40 clips per page, and a lane header counts its graded clips past the cut. |
| 225 | Source times on a clip are the source's own clock: `src 0.0s–4.0s` is the part of the file it plays."; |
| 226 | |
| 227 | const EXPORT: &str = "\ |
| 228 | EXPORT |
| 229 | export_start {out, preset?, loudness?, format?, range?, size?, fit?, bitrate_kbps?, qp?, keyframe_s?, faststart?, audio_kbps?, bit_depth?, prores_profile?, hevc_speed?, hdr?, audio_bit_depth?, chapters?, intra_only?, seat?, subtitles?, burn_captions?, overwrite?} |
| 230 | returns job:<n> at once. Poll it with export_status {job?}; export_cancel {job} stops it and deletes the partial file. |
| 231 | out: the file to write; ~/ is expanded and its folder must exist. The extension picks the format: |
| 232 | .mp4 mp4 · .mkv av1 · .webm · .wav · .flac · .mp3 · .ogg · .m4a · .opus · .mov prores. Refuses an existing file unless overwrite:true. |
| 233 | format (overrides the extension): mp4 (H.264) · av1 (AV1 in mkv) · av1-mp4 · hevc (I+P GOPs, mkv) · hevc-mp4 · |
| 234 | webm · wav and flac (lossless audio) · mp3, ogg and m4a (audio only; m4a is AAC in an mp4 box) · opus (audio only; Opus in Ogg at 48 kHz) · prores (Apple ProRes in a QuickTime .mov with PCM sound) · |
| 235 | png_sequence (a folder of PNG pictures, one per frame, named <folder>_00001.png; out is the folder, which may not already hold files unless overwrite:true; the project's size, no sound) · still (one PNG: the frame at the start of range, the poster frame) · gif (animated GIF of range, at most 30 s and 720 px wide: gif_width (default 480), gif_fps 1-60 (default 15), gif_loop (default true); pictures are composed at the project size and the GIF is refused by name for a range or width past those). |
| 236 | loudness: a number of LUFS from -30 to -5, the whole mix's integrated loudness target (-14 for streaming, -16 for podcasts). It takes one gain, cut back where the true peak would pass the preset's ceiling or -1 dBTP; never a limiter. Beside preset it replaces the preset's own loudness. export_captions {format:\"srt\"|\"vtt\", path?, overwrite?} writes the timeline's captions (every cue on the subtitle lanes, in start order) to a text file: SRT or WebVTT, with picture cues left out. Without path it is `<first source> edit.<format>` in the Videos folder. |
| 237 | preset: an id from export_presets (youtube_1080p, youtube_1080p60, youtube_1080p_hevc, youtube_4k, youtube_4k60, youtube_4k_hevc, shorts_reels, podcast, podcast_ogg, podcast_opus, archive, archive_prores, hdr10_hevc, archive_flac, archive_wav). It fills format, bitrate_kbps, audio_kbps, size, bit_depth, prores_profile, hdr and, for the podcast rows, a -16 LUFS / -1 dBTP loudness target applied to the exported sound. Anything you pass beside it overrides the preset's value; out's extension must match the preset's format. export_presets {} lists the rows. |
| 238 | range {from, to}: that part of the timeline, to excluded. Times as in TIMES. |
| 239 | seat: auto (the GPU for H.264 and HEVC where this machine has a GPU encoder, else the CPU; AV1 is always the CPU) · hardware (GPU or refuse) · software. |
| 240 | size: this export's picture size, WIDTHxHEIGHT (1280x720) or a height with p (720p, 1080p, 2160p, 16:9 at that height); 1080x1920 is vertical. Both sides even. Omitted: the project's resolution, which stays as it is. |
| 241 | fit: how every picture clip meets this export's canvas: keep (the default: each clip's own fit), fit (whole picture, bars) or fill (the canvas covered, the picture cropped). It changes this export's copy only; the project's clips keep their fit. Captions and titles keep their place on the canvas. |
| 242 | A 16:9 timeline as 9:16: export_start {out, size:\"1080x1920\", fit:\"fill\"}. The reply names the size and the fit, and the clip count they applied to. |
| 243 | bitrate_kbps: video, chosen from the picture size and frame rate when omitted. qp: a constant quantiser 0..51 instead of a bitrate (not with bitrate_kbps): the hardware seat for H.264, HEVC and AV1, and the software HEVC encoder; the software H.264 and AV1 encoders refuse it. keyframe_s: seconds between key frames, 0.1 to 10 (not with intra_only). faststart: mp4, hevc-mp4, av1-mp4 and m4a only, moov before mdat so it plays before it is fully read. audio_kbps: 128, 192, 256 or 320, and 384 for AAC only. |
| 244 | intra_only: hevc and hevc-mp4: true codes every picture as an IDR (intra only, large files, every frame a cut point). false, the default, codes I+P GOPs (an IDR a second, P pictures between). h264 mp4 uses it the same way. |
| 245 | Captions: burn_captions draws one track into the picture, so every player and WebM show it. subtitles adds soft |
| 246 | tracks a player can switch off (WebM has none). Both together: burned and soft. burn_captions alone: no soft track. |
| 247 | subtitles (off unless given): true for every subtitle track, placed or not, or an array of track indices (0-based, as the |
| 248 | captions tool lists them) for just those, soft, in the order given. Omitted or [] adds none. A picked track that is not placed |
| 249 | on a caption lane is still written whole (all its cues). In mp4, overlapping cues are merged into one line each; mkv keeps them as they are. |
| 250 | Still and picture-sequence exports draw each frame as the export would (titles and burnt captions included). They write no sound, so a subtitle track or a sound setting does not apply to them. |
| 251 | An .mp4 of a timeline with no picture is the sound alone (AAC, no picture track); it is not refused. burn_captions is refused for it, and for the audio-only formats (m4a, mp3, ogg, opus, wav, flac): it draws into the picture, so drop burn_captions or add a picture. |
| 252 | chapters (default true): the project's chapter markers are written into the file, timed from the start of the range. Written to mp4, av1-mp4, hevc-mp4, m4a, webm, opus and Matroska (.mkv: av1, hevc); wav, flac, mp3 and ogg say they are not written. chapters:false leaves them out, and chapters:\"markers\" writes the comment markers as the chapter list instead. The reply counts them, e.g. \"3 chapters\". |
| 253 | bit_depth: 8 or 10 for the picture. 10 writes a 10-bit AV1 or HEVC (Main 10) file: format av1 (.mkv), av1-mp4, hevc (.mkv) or hevc-mp4; H.264 and every other format refuse it. Omitted: a 10-bit source gives a 10-bit AV1 or HEVC file, an 8-bit source 8-bit. The reply says which (\"output 10-bit, from the source\"). |
| 254 | prores_profile (format prores): proxy, lt, standard, hq (the default) or 4444, 4444xq. The profile is the quality and sets the rate; bitrate_kbps means nothing to ProRes. proxy, lt, standard and hq are 4:2:2, 4444 and 4444xq are 4:4:4. ProRes is always 10-bit. A ProRes .mov carries no subtitles. |
| 255 | hevc_speed (hevc and hevc-mp4): default (the full search), fast (about 1.2-1.6x quicker, 0-3% more bits) or faster (about 1.5-2x quicker, up to 27% more bits). Other formats refuse it. |
| 256 | audio_bit_depth (format prores): 16 or 24 (the default), the bits per sample of the PCM sound. |
| 257 | hdr (hevc and hevc-mp4): off (the default), pq (HDR10) or hlg. The file is 10-bit BT.2020 tagged with that transfer, HDR sources are not tone-mapped, and bit_depth 8 is refused. Other formats refuse it. |
| 258 | Pictures are 8-bit 4:2:0 except in a 10-bit AV1 or HEVC export. (ProRes is always 10-bit.) A 10-bit export still composes edits (grades, titles, captions, transitions, layers) at 8-bit precision and shifts them up. A stream copy keeps the source's own bits. |
| 259 | The sound is as wide as its widest clip: a mono clip alone exports mono, and a mono clip beside a stereo one is widened to stereo. |
| 260 | A burn-only export reports \"subtitles: burned into the picture (no soft track)\". |
| 261 | The export keeps running while you do other things. If the client closes the server's input, the server waits for running exports to finish before it exits. A stop signal (SIGTERM or SIGINT) cancels them and deletes their partial files. Poll export_status until it finishes; export_cancel {job} stops one. |
| 262 | export_status reports progress, ETA, the encoder and the outcome; a done export reports its file size. |
| 263 | Queue: export_start {queue:true} lines an export up. It keeps its own copy of the timeline as it is at that moment (later edits do not change it) and starts when every earlier export has finished, one encode at a time, with no polling needed; export_status shows it as `waiting` with the number of exports ahead. export_cancel {job} on a waiting job removes it from the queue. Without queue the export starts at once, beside any others. |
| 264 | export_queue {action:\"pause\"} pauses the queue: the running export finishes, and the queued ones stay waiting until export_queue {action:\"start\"}, which lifts the pause and starts the next one now if nothing is running. export_queue {action:\"status\"} (the default) says whether the queue is paused, the running export and the queued ones in order. A pause holds only queued exports; a direct export starts at once. export_status says when the queue is paused. |
| 265 | Render preview: render_preview {range?} pre-renders a stretch (default: the whole timeline) so playback over the heavy parts of a cut reads finished frames instead of compositing them. It runs in the background; project_status shows the progress and the cached ranges. An edit inside a cached range drops that render. render_preview {cancel:true} stops it. |
| 266 | export_status {out} for a file this session did not write reports whether it is there, its size and its time; the progress |
| 267 | of a job from an earlier session is not known. |
| 268 | A finished file whose true peak is above -1 dBTP warns (exactly -1 is within spec, for every format); over 0 dBTP its samples clip, and that warning is the stronger one. The fix is the master limiter: |
| 269 | project_settings {limiter:{on:true, ceiling_db:-1}} for lossless, ceiling_db:-2 for lossy. The ceiling is -1 dBTP for lossless (wav, flac) and -2 dBTP for lossy (mp4, mkv, webm, mp3, ogg, m4a), since a lossy encoder can add about a dB of overshoot above the mix. The warning fires above -1 dBTP for every format, lossy ones included, since a true peak there clips on some players; the -2 figure is the limiter target that keeps a lossy encode clear of it. The mix is held to the same ceiling by normalize {target:\"mix\", allow_limiter:true, true_peak:-1} (-2 for lossy)."; |
| 270 | |
| 271 | const SUBTITLES: &str = "\ |
| 272 | SUBTITLES |
| 273 | A subtitle track is a list of cues (text with a start and an end), kept in the project. Nothing shows until |
| 274 | a track is placed on a caption lane (S1..) or exported. Tracks are numbered from 0; the captions tool's footer lists them. |
| 275 | Import: edit {ops:[{op:\"subtitles_import\", path:\"talk.srt\"}]} adds the tracks of a subtitle file, or a video's |
| 276 | own subtitle tracks. They wait off the timeline until edit {ops:[{op:\"captions_place\", track:0, lane?:\"S1\", at?:\"0\"}]} |
| 277 | puts one on a caption lane (S1 by default, at frame 0 by default). |
| 278 | Language: subtitles_import {path, lang?} takes an optional language: an ISO 639-2 code (fra, deu, eng; fr or French also work). Without one, it is guessed from the file name (talk.fr.srt, fra.srt, talk_en.srt, eng.srt); a name that says none leaves it unset, written as und. subtitles_lang {track, lang} sets it later. The mp4 and MKV exports carry the language, and an MKV track's title is the language name. |
| 279 | Reading: in WebVTT and SRT, <br> is a line break; ASS is read as UTF-8. An unreadable or reversed cue, a wrong arrow (`->`) or a cue with no timing line is skipped, and the subtitles_import reply names it with its line number. |
| 280 | Placed captions, by address: the edit ops sub_move {clip, at, to_lane?} (its group follows), sub_trim {clip, edge:\"in\"|\"out\", to} |
| 281 | (moves its start or end: edge is \"in\" or \"out\") and sub_delete {clip} (a lone caption lifts and leaves a gap; a grouped one takes its group). |
| 282 | Cue text, by track and cue number: edit {ops:[{op:\"cue_text\", track:0, index:3, text:\"Hello\\nthere\"}]} rewrites one |
| 283 | (\\n is a line break; empty text removes it). edit {ops:[{op:\"cue_delete\", track:0, index:3}]} removes one and moves nothing. |
| 284 | edit {ops:[{op:\"cue_replace\", find:\"Jon\", replace:\"John\"}]} changes words in one track, or in every track when |
| 285 | track is left out; it is case-insensitive unless case_sensitive is true. |
| 286 | edit {ops:[{op:\"cue_time\", track:0, index:3, at?:\"12s\", to?:\"14s\"}]} trims or moves one cue (timeline times; give at, to or both); it stays inside its neighbours and at least 0.1 s long. |
| 287 | edit {ops:[{op:\"cue_merge\", track:0, index:3}]} joins a cue with the next one; edit {ops:[{op:\"cue_split\", track:0, index:3, at:\"12s\"}]} divides one in two at a time. |
| 288 | edit {ops:[{op:\"cue_add\", track:0, at:\"12s\", to:\"14s\", text:\"Hello\"}]} adds a cue at timeline times (track_clock:true for the track's own); an overlap is refused unless overwrite is true. |
| 289 | The captions tool lists the placed cues as \"track T cue C\": the track and cue numbers the cue ops take."; |
| 290 | |
| 291 | const CAPTIONS: &str = "\ |
| 292 | CAPTIONS |
| 293 | Captions are the words drawn over the picture. Three steps make them. |
| 294 | 1. Put the words on a caption lane (S1..). |
| 295 | auto_captions {target:\"A1\"} transcribes a sound lane (A1 by default) and writes its cues to S1 at frame 0, as one |
| 296 | undo step. Cues are cut at pauses, sentence ends, max_chars and max_secs; the .srt is saved beside the project and |
| 297 | imported as a track. lane names another caption lane. A path that already holds a track is refused. |
| 298 | Words move between neighbouring cues to hold 0.8 s; cues the limits force shorter are named in the reply. |
| 299 | A lane with no speech is refused, \"no speech to caption in A2: the transcript has no words\", and nothing is written. |
| 300 | A lane that already holds captions takes the new run merged in; a mix splits cues at speaker changes. |
| 301 | or edit {ops:[{op:\"subtitles_import\", path}]}, then edit {ops:[{op:\"captions_place\", track, lane?, at?}]} (see SUBTITLES). |
| 302 | hint:\"Edith, LUFS\" may help spelling and vocabulary, but is not guaranteed: after transcription, a near-miss spelling of a hinted word is corrected to it, and the reply names each correction (\"hint corrected: 'Jane Dough' → 'Jane Doe'\"); numbers come out as digits (\"40 years\"). cue_replace fixes words after the fact. |
| 303 | 2. Fix them. The captions tool lists the cues as track T cue C [S1@F] (its range is from inclusive, to exclusive, in exact seconds). |
| 304 | [S1@F] is the placement that shows the cue, the address sub_move, sub_trim and sub_delete take. Cues inside one placement share its |
| 305 | address, and a cue that a cut split lists one line per part. The edit ops cue_text rewrites one, cue_delete removes one, |
| 306 | and cue_replace fixes a word in every cue. |
| 307 | Time edits (insert_time, remove_time, cut_regions and the other cuts) split a cue that a cut runs through, at the word boundary |
| 308 | nearest the cut; words inside a removed span are dropped. A one-word cue keeps its word on the longer piece only (ties: the earlier one). |
| 309 | Caption lanes ripple with the cut; locked caption lanes stay (cut_silence, find_words cut and delete all cut). |
| 310 | 3. Show them in the file. export_start with burn_captions draws the text into the picture, so every player and WebM |
| 311 | shows it. With subtitles it adds soft tracks a player can switch off (WebM has none). Both is fine too. |
| 312 | frame and contact_sheet take burn_captions as well, so a check frame shows what the export will draw. |
| 313 | The burn options (track, size, outline, boxed, place, family, animation, highlight, box, uppercase, words_per_line) are in help {topic:\"burn_captions\"}; the export keys in help {topic:\"export\"}."; |
| 314 | |
| 315 | const RIPPLE: &str = "\ |
| 316 | RIPPLE |
| 317 | A ripple moves the items after a cut or a length change, so the timeline closes up (or opens) without a gap. |
| 318 | The ripple ops: delete, ripple_delete, speed with ripple:true, cut_regions, insert_time, remove_time, and the cut |
| 319 | tools find_words with cut:true and cut_silence. Each takes lanes:[\"V1\",\"A2\"] to name the lanes it may move. |
| 320 | Default scope (no lanes): the edited lane, plus the lanes of clips linked or grouped to it (a take moves whole), |
| 321 | closed over what the ripple reaches. On a picture lane, captions and titles over the moved picture move too. |
| 322 | find_words cut: the target's lane and its linked lanes, or every lane for a mix or src target. |
| 323 | lanes replaces that default and must name the edited lane. cut_regions, insert_time and remove_time default to |
| 324 | every unlocked lane, so lanes narrows them. |
| 325 | Lanes outside the scope never move and are never split. Titles move only when a picture lane is in scope. A locked caption lane in the default scope is skipped with |
| 326 | a note; any other locked lane the ripple must move refuses the op. |
| 327 | Replies list the clips a ripple shifted, as old → new addresses. Addresses in one batch refer to the timeline as |
| 328 | the previous op left it, so use the new address from that reply before naming the clip again. |
| 329 | ripple_delete also lists the caption cues it removes or trims. |
| 330 | lift is not a ripple: it removes one clip alone and leaves its gap, so nothing after it moves. |
| 331 | A dissolve or crossfade next to a gap fades the sound to or from silence. |
| 332 | A linked trim moves every member's edge to one time. Each reply carries an effects: line for side effects |
| 333 | (clips split, holes left, takes unlinked). |
| 334 | A separate narration lane (its own A lane, not linked to the picture) is outside the default scope: a ripple that |
| 335 | lengthens, shortens or closes the picture leaves its clips at their times. Name it in lanes to move it too (see the |
| 336 | speed recipe in help {topic:\"recipes\"}). |
| 337 | split {at, lanes?} is a cut, not a ripple: it cuts the lanes it names at one time and moves nothing."; |
| 338 | |
| 339 | const PROJECT: &str = "\ |
| 340 | PROJECT |
| 341 | project_new {path, template?, resolution?, fps?, overwrite?, discard?} starts an empty project at a new path, creating its folder if it is missing; nothing is written |
| 342 | until project_save, and project_save needs at least one source in the project (media_import first). template:\"<name>\" starts from a template (see templates): the canvas, rate, lanes and caption style come with it, so resolution and fps are refused with it. |
| 343 | templates {} lists the built-in templates (YouTube 1080p 30, Vertical 1080×1920 30, Square 1080 30) and the saved ones, each marked as keeping clips or not. Saved ones come from File > Save as template in the window. overwrite:true lets the later project_save replace a file already at path, since project_new makes that file this project's (without it a save refuses |
| 344 | to replace one). discard:true drops the open project's unsaved edits to start this one (its autosave keeps them when |
| 345 | one can be written); without it a dirty open project refuses. |
| 346 | A path with an earlier session's unsaved autosave is refused before anything is created, unless overwrite:true: the reply names the autosave and offers project_open {recover:true} to continue from it; overwrite:true sets the autosave aside as a dated copy (the newest three dated copies and any from the last 7 days are kept; older ones are deleted). |
| 347 | project_open {path, recover?, discard_autosave?, search?, discard?} opens a .edith file, or a media file as a new project. |
| 348 | An autosave beside the project that holds an earlier session's unsaved edits refuses the open, and nothing is loaded: the refusal names the edits and both choices. recover:true opens the saved file with the autosave's edits on top as one undo step, so undo takes them back |
| 349 | (with this session's own unsaved edits open it needs discard:true, which drops those edits; the recovered edits are unsaved until project_save). A never-saved project has no saved file under them, so undo has nothing earlier to return to. |
| 350 | discard_autosave:true opens the saved file and sets the autosave aside (<stem>.autosave-<stamp>.edith; the newest three dated copies and any from the last 7 days are kept, older ones are deleted). recover:\"<file name or time stamp>\" loads one of the dated autosaves the reply |
| 351 | lists (<stem>.autosave-<stamp>.edith; the stamp is local time, e.g. 20261016-223636), and the newest autosave stays unloaded. |
| 352 | search:[folders] relinks offline sources by file name; the project is then unsaved until project_save writes the new paths. |
| 353 | project_save {path?, force?, discard_autosave?} saves, or saves as a new path; it needs at least one source in the project (media_import first). It refuses to overwrite a file that changed on |
| 354 | disk since the project was opened, unless force is true (force also replaces a file at path that this session did not open). project_save takes no overwrite key. It also refuses while an autosave that appeared after the open holds edits this |
| 355 | project lacks (\"an autosave from <time> holds unsaved edits ...\"): recover them with project_open {recover:true}, or pass |
| 356 | discard_autosave:true: this session's edits are saved, and that autosave is set aside as a dated copy (the newest three dated copies and any from the last 7 days are kept). |
| 357 | project_collect {folder?} copies every file the project plays into one folder (default <project stem>_media beside the project file) and points the project at the copies, |
| 358 | so the folder and the .edith can be moved or archived together. Generated sources (solids, bars, adjustment layers) are skipped; a source whose file is missing is skipped and named; a source already in the folder stays; |
| 359 | a name taken by another file becomes name-2.ext; the same bytes already there are reused. One undo step; unsaved until project_save. A failed copy changes nothing. |
| 360 | project_export_timeline {format, path?} writes the active sequence for another editor: format otio (OpenTimelineIO .otio), fcpxml (Final Cut Pro XML 1.10, for Final Cut Pro, Resolve and Premiere) or edl (CMX3600: V1 and A1/A2). Subtitles are left out and the reply says so. Default path: beside the project file. Only the file is written. |
| 361 | project_import_timeline {path} reads an .otio file as a new sequence of the project and makes it the active one, relinking each clip by its path; a missing file becomes offline. One undo step. |
| 362 | proxies {action:status|make|cancel|delete, source} manages editing copies: make starts one in the background (its progress shows in status), cancel stops it and leaves the film off, delete removes it and keeps the film off. With auto_proxies on, each media_import starts its stand-ins. |
| 363 | speech_model {download?, model?, device?, cancel?} shows the speech models installed per device (cpu, gpu) and any download in progress; download:true fetches one in the background (base by default). |
| 364 | export_captions {chapters:true} returns the chapter list as the YouTube description text, with JSON lines, writing no file. export_cancel {all:true} cancels every unfinished export. |
| 365 | render_preview {clear:true} deletes every render file in the cache (refused while a render runs). |
| 366 | project_status reports the open project. project_settings sets resolution, fps, tonemap, proxies, |
| 367 | auto_proxies, encoder, the master limiter, the notes (free text, several lines, shown by project_status when set) and the still length |
| 368 | (still_secs, 0.5 to 600 s, 5 by default: stills placed after the change take it), the speech model and device (speech_model, speech_device auto|cpu|gpu). Each change and each refusal is reported. |
| 369 | sample_rate sets the mix's rate: \"source\" (unset: the highest rate among the sources, or 48 kHz when every source is below 44.1 kHz), 44100, 48000 or 96000, the rows the GUI offers. |
| 370 | project_status {history:true} also lists every undo and redo step with the steps count that undo or redo takes to reach it (undo {steps:3} takes back the three newest). |
| 371 | templates {save:{name, with_clips?}} saves the open project as a template (settings, and the clips too with with_clips:true); a built-in's name is refused. |
| 372 | An fps change keeps clips, captions and titles at the same seconds; their frame numbers, and so |
| 373 | their addresses (V1@450), change with the rate. Positions are rounded to whole frames at the new rate, |
| 374 | so a round trip (to another fps and back) can shift a cut by up to a frame; check the cut with timeline. |
| 375 | Autosave: when the server's input closes (the client exits), a dirty project is written beside its file as |
| 376 | <stem>.autosave.edith, or to ~/.cache/edith/autosave/ when untitled. It never overwrites the project's own file. |
| 377 | project_open refuses over a newer autosave, and lists the dated autosaves beside the file (newest first) with their |
| 378 | local time and what they change. Only the newest three dated copies and any from the last 7 days are kept: setting one aside deletes the older ones. An open removes only an autosave that matches the file. |
| 379 | Voiceover sources are unsaved until project_save: the WAV is imported as a source, and the project file names it only after a save. |
| 380 | frame and contact_sheet also save their PNGs to ~/.cache/edith/frames/<project>/ (<project> is the project file's name, or untitled; |
| 381 | $XDG_CACHE_HOME/edith/frames/ when that is set to an absolute path) and print the path. |
| 382 | A frame shows the file's own pixels: edith draws no stamp on it, so a source with a timecode burned into its picture |
| 383 | (the test clips have one) shows it. A contact sheet labels each tile with its time in a band above the tile. |
| 384 | Undo: one edit call is one step, 100 steps for the session; the history is lost when the server exits. |
| 385 | media_relink is one undo step: undo puts the old file back and redo points the source at the new one. |
| 386 | media_bin {action: create|rename|remove|move|favourite} files sources in bins (named folders, one level of nesting) and stars favourites; each call is one undo step. media_list shows each source's bin and star. Saved as format v51 lines (bin, srcbin, srcfav). |
| 387 | Checkpoints last longer: checkpoint {name} saves a full copy to <project dir>/checkpoints/<stem>/<name>.edith |
| 388 | (beside the project file, once the project has a path: project_new {path} or project_save; with no path at all |
| 389 | the copy goes to the temp directory and is lost on reboot). The open project is untouched. |
| 390 | checkpoints lists them, including ones from an earlier run. |
| 391 | restore {name} first saves the open project as a checkpoint named before-restore-<name> (a suffix when that name is |
| 392 | taken), so the state before the restore stays on disk and checkpoints lists it; then it replaces the open project with |
| 393 | the named one. The undo history is cleared, and the restore itself cannot be undone, but the before-restore checkpoint can be restored."; |
| 394 | |
| 395 | const BURN_CAPTIONS: &str = "\ |
| 396 | BURN_CAPTIONS |
| 397 | burn_captions {track?, size?, outline?, boxed?, place?, family?, animation?, highlight?, box?, uppercase?, words_per_line?} draws one subtitle track's text into the picture. Pass the object, true for the defaults, or false for none. |
| 398 | Accepted by export_start, frame and contact_sheet (not with a source: those draw no timeline captions). |
| 399 | family: the font family the caption is set in, by the name the GUI's font list shows (family:\"Noto Serif\"). Default: the bundled Archivo; a name the system does not have draws in Archivo. |
| 400 | track: the track index, as in subtitles. Default: the track placed on the first caption lane with clips, |
| 401 | else track 0. A bitmap track (PGS) is refused, and so is a track with no text. |
| 402 | size: text height (the em size) as permille of the frame HEIGHT, not the width. 50 (the default) is 5% of the height; 10 to 200. |
| 403 | In pixels: size × height / 1000. At 1920x1080 the default is 54 px; at 1080x1920 (9:16) it is 96 px, nearly 9% of the width, |
| 404 | so a cue wraps at about 23 characters. For 9:16 use size 30 (58 px, about 5% of the width, about 38 characters a line on one line). |
| 405 | outline: none, thin (default) or thick. boxed: a translucent black box behind the text (default true). |
| 406 | place: bottom (default), top or centre. A lower third at the bottom collides with bottom captions: burn them at |
| 407 | place:\"top\", or move the lower third (title_add with place:\"top\", or transform) when the bottom is wanted for captions. |
| 408 | export_start and frame name a clash: a caption burned in the same place as a title on screen at the same time, as \"at 86.5s the caption overlaps title '...' (both at the bottom): burn_captions {place:\"top\"} or move the title\". |
| 409 | animation: none (default, the static cue), karaoke (the whole chunk shown, the word being spoken in the highlight colour), |
| 410 | pop (words appear as they are spoken, each popping from 125% to 100% in 120 ms), bounce (the word being spoken is raised and enlarged, easing down) |
| 411 | or word (one big word at a time, popping in). The highlighted word is the one whose time has come: in karaoke, pop, bounce and word it is drawn in `highlight`. |
| 412 | highlight: #rrggbb or #rgb (default #ffd600). box: true makes the highlight a rounded box of that colour behind white text (not the black `boxed`). uppercase: capitals. |
| 413 | words_per_line: at most N words on screen at once (2 to 4 is the shorts style); a longer cue is re-chunked by its word times, and a pause of 0.7 s or more |
| 414 | also starts a new chunk. 0 (default) keeps each cue whole, with its own line breaks. words_per_line and uppercase work with animation none too. |
| 415 | Word times: a cue made by auto_captions keeps the transcript's real word times (saved in the project), so karaoke follows the speech. Editing the cue's text drops them; |
| 416 | move and trim shift and clip them. A cue without them (SRT, VTT, typed) spreads its words over the span by letter count; a cue with no words draws nothing. |
| 417 | Clip speed and speed ramps are already in the cue times, so a sped-up clip animates at its own pace. |
| 418 | The defaults for animation, highlight, box, uppercase and words_per_line come from the project (project_settings {captions:{...}}, saved with it, undoable); |
| 419 | a key in burn_captions overrides it for that call. Preview and export draw the same pixels: frame {burn_captions} shows what the export will. |
| 420 | Lines keep the cue's own line breaks when they fit; a line too wide for the frame wraps, its words spread evenly over the lines. |
| 421 | Text is drawn from bundled Noto faces for Latin, Greek, Cyrillic, Arabic, Hebrew, Devanagari and Thai, shaped, with right-to-left text in order. Colour emoji and CJK come from the system's Noto Color Emoji and Noto Sans CJK when those are installed; without them emoji draw monochrome and CJK draws as empty boxes here: use soft subtitles (export_start subtitles) for CJK then. A character no face has draws as a box, and the reply names it. |
| 422 | Overlapping cues are all drawn, stacked upward from the bottom in start order. |
| 423 | Burned captions are pixels, not a track: a re-imported export has no caption text to read back. Check them by eye with frame or contact_sheet."; |
| 424 | |
| 425 | const OVERLAYS: &str = "\ |
| 426 | OVERLAYS (a logo or still over the picture) |
| 427 | A still is a picture with no sound. A lane higher up draws over the lanes below it, so a still on V2 sits over V1 wherever it is placed. |
| 428 | 1. Import the still: media_import {paths:[\"<dir>/logo.png\"]}. It becomes a source (src:N). |
| 429 | 2. Add the lane above the picture, then place the still on it: edit {ops:[{op:\"lane_add\", kind:\"video\"}]}, then edit {ops:[{op:\"place\", source:\"src:1\", lane:\"V2\", at:\"1s\"}]}. A still is placed 5 s long; set its length with edit {ops:[{op:\"trim\", clip:\"V2@30\", edge:\"out\", to:\"4s\"}]} (to is the timeline time the edge lands on; V2@30 is the still placed at 1s, which is frame 30 at 30 fps). Without a lane, place links V1 and A1, and a still has no sound to put there. |
| 430 | 3. Put it in a corner: edit {ops:[{op:\"transform\", clip:\"V2@30\", corner:\"bottom-right\", scale:0.3}]} puts a picture 30% of the canvas wide in the bottom-right corner, 32 px in from each edge. corner is centre, top-left, top-right, bottom-left or bottom-right; it keeps the scale you give (or the one already set), and margin:N sets the gap in pixels. The engine measures the picture itself, so a 16:9 still and a square logo both land flush. Giving x or y with corner is refused. Picture in picture is corner:\"bottom-right\" with scale:0.3. |
| 431 | x and y still work for any spot off a corner: they move the centre off the canvas centre, as fractions of the canvas width (x) and height (y), positive right and down, negative left and up. x:0.6 puts the still past the right edge, and the reply warns when a clip is mostly off the canvas. scale multiplies the size the picture is fitted to (0.05 to 8). |
| 432 | 4. Choose how it fills its box: edit {ops:[{op:\"fit\", clip:\"V2@30\", policy:\"fit\"}]}. The policies are fit, fill, stretch and center. |
| 433 | 5. Make it translucent: edit {ops:[{op:\"transform\", clip:\"V2@30\", opacity:0.5}]} is a 50% logo over the picture below. opacity runs from 0 (clear) to 1 (opaque, the default), and it keeps the placement set in step 3. |
| 434 | Check it with frame {at:\"2s\"}: the reply lists the lanes at that time and which one is on top. |
| 435 | "; |
| 436 | |
| 437 | const SEQUENCES: &str = "\ |
| 438 | SEQUENCES AND COMPOUND CLIPS |
| 439 | A project holds several named sequences (timelines). Size, frame rate and the look settings are the project's; lanes, clips, markers and chapters belong to each sequence. One is active, and every tool works on it. |
| 440 | 1. sequence {action:\"list\"} shows them (* is active); new {name?}, rename {sequence, new_name}, duplicate {sequence, name?}, delete {sequence} and switch {sequence} manage them. Switching is not an undo step; the others are. |
| 441 | 2. Group a stretch of clips into one: edit {ops:[{op:\"nest\", clips:[\"V1@0\",\"V1@90\"], name:\"Intro\"}]}. The picked clips (and their linked sound) move into a new sequence and a compound clip stands where they were; the picture and sound are the same. One undo step. break_apart {clips:[\"V1@0\"]} puts the contents back. |
| 442 | 3. Reuse a sequence: place_sequence {sequence:\"Intro\", at:\"30s\"}. A sequence that holds itself, directly or through others, is refused. |
| 443 | 4. Work inside one: sequence {action:\"switch\", sequence:\"Intro\"}, edit, switch back. Or give timeline, clip_info, edit or export_start a `sequence` argument: the read leaves the active sequence alone; edit leaves the named one active. |
| 444 | 5. export_start exports the active sequence, or `sequence`. Nested sound and picture render as the flat timeline would. |
| 445 | A compound clip trims, splits, moves, fades and takes gain like any clip; it has no speed, ramp or reverse (refused), and its own colour, effects and transform are not applied (grade the clips inside). Captions and titles inside a sequence play only when that sequence is exported or active, not inside a compound. The frame rate cannot change once there are two sequences. Saved as format v45 only when a project has more than one sequence. |
| 446 | "; |
| 447 | |
| 448 | const MULTICAM: &str = "\ |
| 449 | MULTICAM (several cameras of one event, cut by angle) |
| 450 | 1. media_import every camera's file (they should share a sound the cameras heard: a clap, a voice, a song). |
| 451 | 2. multicam_create {sources:[\"src:0\",\"src:1\",\"src:2\"], name?:\"Interview\", sync?:\"audio\"}: the cameras are lined up by the shape of their sound (accurate to 20 ms; sync:\"start\" lines them up at their starts instead) and one multicam clip goes on V1 (picture) + A1 (sound), linked. The reply lists every angle, how it was synced and a match score; an angle that did not match (or has no sound) starts with the others and says so. It plays angle 1. |
| 452 | 3. Cut between the cameras: edit {ops:[{op:\"angle\", clip:\"V1@0\", at:\"12s\", angle:2},{op:\"angle\", clip:\"V1@0\", at:\"20s\", angle:1}]}. Each op cuts the clip at `at` and shows the angle from there; the sound follows the picture. audio:2 keeps the sound on angle 2 (a lav mic, say) whatever the picture shows; audio:\"follow\" lets it follow again. Angles are numbers from 1 or the names the reply shows. Every segment is an ordinary clip: trim, move or delete it with the usual ops. |
| 453 | 4. frame {at} and contact_sheet show the cut; timeline names each segment's angle (multicam \"Interview\" angle 2 \"cam_b\"). |
| 454 | 5. multicam_flatten {clip:\"V1@0\"} replaces all the segments with the plain camera clips they play (the picture does not change), for effects or colour on one camera's stretch; the multicam sequence stays until deleted. |
| 455 | A multicam clip is a compound clip: it has no speed, ramp or reverse. One undo step each. Saved as format v47 (`mcam` and `angle` lines); a project without one keeps its older version. |
| 456 | "; |
| 457 | |
| 458 | const VERTICAL: &str = "\ |
| 459 | VERTICAL (9:16 from a 16:9 cut) |
| 460 | 1. Start at the vertical size: project_new {path:\"<dir>/short.edith\", resolution:\"1080x1920\"}, or on an open project project_settings {resolution:\"1080x1920\"}. The canvas changes; the clips keep their times. |
| 461 | 2. Choose how a 16:9 clip fits the 9:16 canvas, with edit {ops:[{op:\"fit\", clip:\"V1@0\", policy:\"...\"}]} on each picture clip. The policies: |
| 462 | fit (the default): the whole picture, aspect kept, with bars left and right. Nothing is cropped, but the sides are empty. |
| 463 | fill: the canvas is covered, aspect kept, and the sides of the picture are cropped away. The usual choice for a talking head or footage with the subject in the middle. |
| 464 | stretch: the whole picture is squeezed onto the canvas, aspect not kept. Avoid it for people. |
| 465 | center: 1:1 pixels, centred, padded or cropped per axis. Use it for a graphic that must keep its pixel size. |
| 466 | Choose fill when the subject is in the middle of the frame and cropping is fine; choose fit when the whole frame matters (a slide, a screen, a wide shot). Then check with frame. |
| 467 | Text-heavy 16:9 art (slides, screens with words): fit letterboxes it with bars, and fill crops the words off the sides. For the best result, make 9:16 versions of the slides instead. |
| 468 | 3. Follow the subject automatically: edit {ops:[{op:\"reframe\", clip:\"V1@0\"}]} finds the subject in the footage (movement and contrast, no models), keeps the crop still while the subject stays put, and writes transform keys that fill the 9:16 canvas without ever showing an edge. It sets the clip's fit to fit, replaces the clip's transform keys, and is one undo step; smoothness 0..1 (default 0.5) sets how slowly the crop follows, and aspect:\"9:16\" checks the project is that shape. Refine the keys with transform_keys, or take them off with transform_keys {clip, clear:true}. A talking head that stays put needs only fill; reframe pays off when the subject moves across a wide shot. |
| 469 | 3b. Or reframe by hand: crop first, in fractions of the source, then move and zoom. A 16:9 picture keeps about a third of its width for 9:16, so crop [0.34,0.34,0,0] keeps the middle: edit {ops:[{op:\"transform\", clip:\"V1@0\", crop:[0.34,0.34,0,0], x:-0.1}]}. |
| 470 | 4. Titles and captions are laid out on the canvas, so they adapt to the new size; look at a frame to check where they sit. CJK draws as empty boxes in titles and burned captions unless the system has Noto Sans CJK: use soft subtitles (export_start subtitles) for CJK, as help {topic:\"unsupported\"} says. |
| 471 | 5. Or skip the project change: export_start {out:\"<dir>/short.mp4\", size:\"1080x1920\", fit:\"fill\"} draws this export at 9:16 and fills every picture clip to the canvas, with the project kept at 16:9. fit:\"fit\" keeps the whole picture with bars instead. Check the file with media_probe. |
| 472 | "; |
| 473 | |
| 474 | const STRETCH: &str = "\ |
| 475 | STRETCH (a short shot made to fill a longer slot) |
| 476 | place with stretch:true plays the whole source over `length`, sped up or slowed to fit: edit {ops:[{op:\"place\", source:\"src:0\", lane:\"V1\", at:\"6s\", length:\"6s\", stretch:true}]}. A 5 s shot in a 6 s slot runs at 0.83 speed. Prerequisite: src:0 is that 5 s shot, and stretch takes a slot only within 0.25..4 of the shot's length, so a 5 s shot fits slots from 1.25 s to 20 s. Without stretch, a length shorter than the source takes the source from its in point over that span, which cuts rather than slows; a length longer than the source is refused (\"runs past the source end\"), not cut short, so add stretch:true to fill the slot. |
| 477 | A placed clip can be slowed afterwards with edit {ops:[{op:\"speed\", clip, x}]}: x 0.5 runs it twice as long, and the range is 0.25 to 4. x is the absolute rate, not a multiplier: sending 0.5 on a clip already at 0.5 changes nothing. Its end moves; ripple:true moves the clips after it too: edit {ops:[{op:\"speed\", clip:\"V1@12\", x:0.5, ripple:true}]}. |
| 478 | "; |
| 479 | |
| 480 | const UNSUPPORTED: &str = "\ |
| 481 | NOT SUPPORTED (these are not in the tools; do not search for them) |
| 482 | Transitions beyond the seven kinds (dissolve, dip-black, dip-white, wipe, slide, push, zoom): no custom shapes, no easing or keyframed progress, no transition between layered pictures (only the clips of one lane blend). A kind changes the picture only; the sound always crossfades. |
| 483 | Reversed clips (reverse) have limits: they decode at 8 bits, so a 10-bit source loses its low 2 bits on a 10-bit export (banding is possible on HDR); hardware decode is off for them; the B side of a dissolve plays forward; waveforms and thumbnails draw forward. |
| 484 | CJK text in the picture, unless the system has Noto Sans CJK: it draws as empty boxes in a title or in burned captions (burn_captions). Colour emoji need the system's Noto Color Emoji; without it emoji draw monochrome. A character no face has draws as a box either way; title_add names it in a warning, and frame names it in a caption. Soft subtitle tracks (export_start subtitles, in mp4 or mkv) keep that text, since the player draws it: use them for CJK when the font is missing. |
| 485 | 10-bit: AV1 and HEVC only (export_start bit_depth:10, or a 10-bit source); H.264 and the other formats are 8-bit and refuse bit_depth:10. Grades, titles, captions, transitions and layers are composed at 8-bit precision and shifted up, so their extra range is not used. |
| 486 | Sources the decoder refuses: HEVC in 4:4:4, 4:0:0 (monochrome) or 12-bit, and AV1 in 4:4:0. AV1 in 4:2:2, 4:4:4 or 12-bit, and HEVC 4:2:2, decode. |
| 487 | Source picture files that the decoder refuses (for example 12-bit HEVC, or a display matrix that is not a quarter turn): |
| 488 | media_probe names the reason, and media_import refuses them. |
| 489 | Sound codecs nothing here decodes (for example WavPack): media_probe names the codec and warns that its sound will be silent."; |
| 490 | |
| 491 | /// The notes under the chapter ops in `help {topic:"ops"}`, after the op signatures. |
| 492 | const MARKERS: &str = "\ |
| 493 | MARKERS |
| 494 | A chapter is C@<frame> (the frame it starts on) or C#n (its place in the list, 1 first). chapter_add, chapter_set and chapter_remove take them. |
| 495 | Cuts and inserts move chapters with the picture. timeline prints a chapters: line and a chapters_text YouTube description, with warnings. |
| 496 | Comment markers are separate from chapters: marker_add {at, name, note?, color?, length?}, marker_set {marker, ...}, marker_remove {marker}. A marker is M@<frame> (the first on that frame) or M#n. color is red, orange, yellow, green, blue or purple; a length makes a range. They move with the picture as chapters do; timeline prints a markers: line and a markers list. export_start chapters:\"markers\" writes them as the file's chapters. beats {clip, every?} marks a sound clip's beats as yellow \"Beat\" markers (every:1 default, 2 or 4 for bars), replacing that clip's earlier beat markers."; |
| 497 | |
| 498 | /// The `looks` topic: what a look is, the built-ins, and where saved ones live. |
| 499 | const LOOKS: &str = "looks: a look is a whole colour grade under one name. The look op applies it; the colour card's Looks row shows the same list. |
| 500 | Built-in (colour presets, no LUT file needed): |
| 501 | Warm warmer temperature, red up and blue down in the wheels |
| 502 | Cool cooler temperature, blue up |
| 503 | Teal & orange teal shadows, orange highlights, a little more colour |
| 504 | Bleach bypass low colour, more contrast, an S curve on the master |
| 505 | Black & white no colour at all |
| 506 | Faded film lifted blacks, softer contrast, muted colour |
| 507 | High contrast more contrast and a little more colour |
| 508 | Vintage muted colour, a warm cast, lifted blacks |
| 509 | Saved: 'Save current as look' on the colour card writes $XDG_DATA_HOME/edith/looks/<name>.look (or ~/.local/share/edith/looks). The file is plain text: the sliders, the wheels, the curves, and a LUT's path and mix if the grade has one. |
| 510 | edit {ops:[{op:\"look\", clip:\"V1@0\", name:\"Warm\"}]} replaces the clip's grade with the look in one undo step. A name nobody has is refused with the list of looks there are. |
| 511 | auto_color is not a look: it reads the clip and sets a correction from its own frame."; |
| 512 | |
| 513 | const VISUALIZER: &str = "\ |
| 514 | VISUALIZER |
| 515 | clip_info says \"visualizer off\" for an ordinary clip. \"visualizer on (style S, fast)\" means the clip is a |
| 516 | visualizer: its picture is drawn from the sound it plays, as a waveform, not from its source picture. |
| 517 | Set it on a clip whose sound is drawn. On an AUDIO clip (a voiceover or music with no picture) on:true makes a linked |
| 518 | waveform picture: the op places it on a free video lane at that clip's start, over the same span, grouped with the sound |
| 519 | clip so moves, trims and deletes carry it. The waveform goes on a new top picture lane (V2 or V3, the next free one above |
| 520 | the picture; the reply names it, e.g. V2@0), and it covers the picture under it where they overlap. style defaults to fill: |
| 521 | edit {ops:[{op:\"visualizer\", clip:\"A2@0\", on:true, style:\"ring\", fast:true}]}. |
| 522 | Position and size it with transform on that picture: edit {ops:[{op:\"transform\", clip:\"V2@0\", x:0, y:0.27, scale:0.4}]} puts it as a bottom band, 40% of the height, inside the canvas. |
| 523 | (x and y move its centre by a share of the canvas, -1 to 1, y positive down; scale multiplies its size). opacity under 1 lets the picture show through. |
| 524 | Keep it on the canvas: its centre sits at (0.5 + x, 0.5 + y) of the canvas, so a box of height scale (a 16:9 waveform on a 16:9 canvas) stays inside when y is at most 0.5 − scale / 2. With scale 0.4, y:0.27 puts its bottom edge at 0.97 of the height; y:0.7 would put the centre at 1.2 of the height, entirely off the canvas. |
| 525 | Turn it off with on:false on the waveform picture (V2@0), or on the sound clip it draws (A2@0), which also turns the picture off. |
| 526 | on: true or false (false turns it off). style: fill, ribbon, ring or wave, the look of the trace. |
| 527 | fast: true paints the trace from a 0.2 s window instead of 2 s, so it reads as a line (an Audacity-style view). |
| 528 | Omitted keys keep their setting. One undo step."; |
| 529 | |
| 530 | /// Full text for ops whose manual line is cut short or leaves out the ranges. These |
| 531 | /// replace the manual's text in `help {topic: op}`; the signature still comes from the manual. |
| 532 | const OP_TEXTS: & = & |
| 533 | |
| 534 | |
| 535 | |
| 536 | |
| 537 | |
| 538 | |
| 539 | |
| 540 | |
| 541 | |
| 542 | |
| 543 | |
| 544 | |
| 545 | |
| 546 | |
| 547 | |
| 548 | |
| 549 | |
| 550 | |
| 551 | |
| 552 | |
| 553 | |
| 554 | |
| 555 | |
| 556 | |
| 557 | |
| 558 | |
| 559 | |
| 560 | |
| 561 | |
| 562 | |
| 563 | |
| 564 | |
| 565 | |
| 566 | |
| 567 | |
| 568 | |
| 569 | |
| 570 | |
| 571 | |
| 572 | |
| 573 | |
| 574 | |
| 575 | |
| 576 | |
| 577 | |
| 578 | |
| 579 | |
| 580 | |
| 581 | |
| 582 | |
| 583 | |
| 584 | |
| 585 | |
| 586 | |
| 587 | |
| 588 | |
| 589 | |
| 590 | |
| 591 | |
| 592 | |
| 593 | |
| 594 | |
| 595 | |
| 596 | |
| 597 | |
| 598 | |
| 599 | |
| 600 | |
| 601 | |
| 602 | |
| 603 | |
| 604 | |
| 605 | |
| 606 | |
| 607 | |
| 608 | |
| 609 | |
| 610 | |
| 611 | |
| 612 | |
| 613 | |
| 614 | |
| 615 | |
| 616 | |
| 617 | |
| 618 | |
| 619 | |
| 620 | |
| 621 | |
| 622 | |
| 623 | |
| 624 | |
| 625 | |
| 626 | |
| 627 | |
| 628 | |
| 629 | |
| 630 | |
| 631 | |
| 632 | |
| 633 | |
| 634 | |
| 635 | |
| 636 | |
| 637 | |
| 638 | |
| 639 | |
| 640 | |
| 641 | |
| 642 | |
| 643 | |
| 644 | |
| 645 | |
| 646 | |
| 647 | |
| 648 | |
| 649 | |
| 650 | |
| 651 | |
| 652 | |
| 653 | |
| 654 | |
| 655 | |
| 656 | |
| 657 | |
| 658 | |
| 659 | |
| 660 | |
| 661 | |
| 662 | |
| 663 | |
| 664 | |
| 665 | |
| 666 | |
| 667 | |
| 668 | |
| 669 | |
| 670 | |
| 671 | |
| 672 | |
| 673 | |
| 674 | |
| 675 | |
| 676 | |
| 677 | |
| 678 | |
| 679 | |
| 680 | |
| 681 | |
| 682 | |
| 683 | |
| 684 | |
| 685 | |
| 686 | |
| 687 | |
| 688 | |
| 689 | |
| 690 | |
| 691 | |
| 692 | |
| 693 | |
| 694 | |
| 695 | |
| 696 | |
| 697 | |
| 698 | |
| 699 | |
| 700 | |
| 701 | |
| 702 | |
| 703 | |
| 704 | |
| 705 | |
| 706 | |
| 707 | |
| 708 | |
| 709 | |
| 710 | |
| 711 | |
| 712 | |
| 713 | |
| 714 | |
| 715 | |
| 716 | |
| 717 | |
| 718 | |
| 719 | |
| 720 | |
| 721 | |
| 722 | |
| 723 | |
| 724 | |
| 725 | |
| 726 | |
| 727 | |
| 728 | |
| 729 | |
| 730 | |
| 731 | |
| 732 | |
| 733 | |
| 734 | |
| 735 | |
| 736 | |
| 737 | |
| 738 | |
| 739 | |
| 740 | |
| 741 | |
| 742 | |
| 743 | |
| 744 | |
| 745 | |
| 746 | |
| 747 | |
| 748 | |
| 749 | |
| 750 | |
| 751 | |
| 752 | |
| 753 | |
| 754 | |
| 755 | |
| 756 | |
| 757 | |
| 758 | |
| 759 | |
| 760 | |
| 761 | |
| 762 | |
| 763 | |
| 764 | |
| 765 | |
| 766 | |
| 767 | |
| 768 | |
| 769 | |
| 770 | |
| 771 | |
| 772 | |
| 773 | |
| 774 | |
| 775 | |
| 776 | |
| 777 | |
| 778 | |
| 779 | |
| 780 | |
| 781 | |
| 782 | |
| 783 | |
| 784 | |
| 785 | |
| 786 | ; |
| 787 | |
| 788 | /// The tools the server answers: the registered table plus `help` itself. |
| 789 | |
| 790 | |
| 791 | |
| 792 | |
| 793 | |
| 794 | |
| 795 | /// The whole cheat sheet, as the `edith://help` resource and the `help` tool give it. |
| 796 | |
| 797 | |
| 798 | |
| 799 | |
| 800 | |
| 801 | /// The first 25 lines of the sheet, for the initialize `instructions`. |
| 802 | |
| 803 | |
| 804 | |
| 805 | |
| 806 | |
| 807 | /// One topic of the help, or the whole sheet when `name` is None. A name is a fixed |
| 808 | /// topic, an edit op name, or a tool name, in that order. |
| 809 | |
| 810 | |
| 811 | |
| 812 | |
| 813 | |
| 814 | |
| 815 | |
| 816 | |
| 817 | |
| 818 | |
| 819 | |
| 820 | |
| 821 | |
| 822 | |
| 823 | |
| 824 | |
| 825 | |
| 826 | |
| 827 | |
| 828 | |
| 829 | |
| 830 | |
| 831 | |
| 832 | |
| 833 | |
| 834 | |
| 835 | |
| 836 | |
| 837 | |
| 838 | |
| 839 | |
| 840 | |
| 841 | |
| 842 | |
| 843 | |
| 844 | |
| 845 | |
| 846 | |
| 847 | |
| 848 | |
| 849 | |
| 850 | |
| 851 | |
| 852 | |
| 853 | |
| 854 | |
| 855 | |
| 856 | |
| 857 | |
| 858 | |
| 859 | |
| 860 | |
| 861 | |
| 862 | |
| 863 | |
| 864 | |
| 865 | |
| 866 | |
| 867 | /// The schema's description of `topic`: every fixed topic, from `TOPICS`, then the op and tool forms. |
| 868 | |
| 869 | |
| 870 | |
| 871 | |
| 872 | |
| 873 | |
| 874 | |
| 875 | |
| 876 | |
| 877 | |
| 878 | |
| 879 | |
| 880 | |
| 881 | |
| 882 | |
| 883 | /// The first sentence of a tool description, with its whitespace flattened. A sentence |
| 884 | /// ends at a full stop followed by a capital, so `"<n>. track"` inside a description |
| 885 | /// does not end it. |
| 886 | |
| 887 | |
| 888 | |
| 889 | |
| 890 | |
| 891 | |
| 892 | |
| 893 | |
| 894 | |
| 895 | |
| 896 | |
| 897 | |
| 898 | |
| 899 | /// The note under the tool list: every tool takes its own arguments, and the two |
| 900 | /// shapes an agent most often gets wrong. |
| 901 | const TOOL_ARGS: &str = " Every tool takes its own arguments: help {topic:\"<tool>\"} lists any tool's arguments (media_probe takes paths, a glob, or both). |
| 902 | burn_captions {track:N} (on export_start, frame, contact_sheet) draws one caption track into the picture. |
| 903 | N is 0-based: the track index as the captions tool lists it, so the first track is 0."; |
| 904 | |
| 905 | |
| 906 | |
| 907 | |
| 908 | |
| 909 | |
| 910 | |
| 911 | |
| 912 | |
| 913 | |
| 914 | |
| 915 | |
| 916 | |
| 917 | |
| 918 | |
| 919 | |
| 920 | |
| 921 | |
| 922 | |
| 923 | |
| 924 | /// The op names of the `edit` tool, read from the enum in its schema. |
| 925 | |
| 926 | |
| 927 | |
| 928 | |
| 929 | |
| 930 | |
| 931 | |
| 932 | |
| 933 | |
| 934 | |
| 935 | |
| 936 | /// The manual for the edit ops: the `edit` tool's description, or "" if it is not registered. |
| 937 | |
| 938 | |
| 939 | |
| 940 | |
| 941 | /// The op names on one wrapped list, for the overview. |
| 942 | |
| 943 | |
| 944 | |
| 945 | |
| 946 | |
| 947 | |
| 948 | |
| 949 | |
| 950 | |
| 951 | |
| 952 | |
| 953 | |
| 954 | /// One entry of the edit manual: the section it sits under, the op it describes, and |
| 955 | /// the entry as the manual writes it. |
| 956 | |
| 957 | |
| 958 | |
| 959 | |
| 960 | |
| 961 | |
| 962 | /// Every entry the manual gives an edit op, in manual order. An entry starts at an |
| 963 | /// op name followed by ` {` where the line starts or follows a `·` or a `.`; so |
| 964 | /// `title_set ... title_remove {title} ...` splits into two entries. |
| 965 | |
| 966 | |
| 967 | |
| 968 | |
| 969 | |
| 970 | |
| 971 | |
| 972 | |
| 973 | |
| 974 | |
| 975 | |
| 976 | |
| 977 | |
| 978 | |
| 979 | |
| 980 | |
| 981 | |
| 982 | |
| 983 | |
| 984 | |
| 985 | |
| 986 | |
| 987 | |
| 988 | |
| 989 | |
| 990 | |
| 991 | |
| 992 | /// A manual section heading: a line of capitals and spaces only. |
| 993 | |
| 994 | |
| 995 | |
| 996 | |
| 997 | /// Whether an op entry can begin right after `before` on its line. |
| 998 | |
| 999 | |
| 1000 | |
| 1001 | |
| 1002 | |
| 1003 | /// The argument signature of an entry: its head before the dash, with a `[group]` or |
| 1004 | /// `[clip]` tag where the entry gives one. |
| 1005 | |
| 1006 | |
| 1007 | |
| 1008 | |
| 1009 | |
| 1010 | |
| 1011 | |
| 1012 | |
| 1013 | |
| 1014 | |
| 1015 | |
| 1016 | |
| 1017 | /// An op named inside another op's entry, such as `captions_place {track}` on the |
| 1018 | /// subtitles_import line: the heading it sits under, its signature as written, and the line. |
| 1019 | |
| 1020 | |
| 1021 | |
| 1022 | |
| 1023 | |
| 1024 | |
| 1025 | /// The first manual line that names `op` as `op {...}` inside another entry. The |
| 1026 | /// name must not be the tail of a longer one (`move {` is not `sub_move {`). |
| 1027 | |
| 1028 | |
| 1029 | |
| 1030 | |
| 1031 | |
| 1032 | |
| 1033 | |
| 1034 | |
| 1035 | |
| 1036 | |
| 1037 | |
| 1038 | |
| 1039 | |
| 1040 | |
| 1041 | |
| 1042 | |
| 1043 | |
| 1044 | |
| 1045 | |
| 1046 | |
| 1047 | |
| 1048 | |
| 1049 | |
| 1050 | |
| 1051 | |
| 1052 | |
| 1053 | /// Adds a signature under its heading, opening the heading the first time it is seen. |
| 1054 | |
| 1055 | |
| 1056 | |
| 1057 | |
| 1058 | |
| 1059 | |
| 1060 | |
| 1061 | /// The signature of an op from its `OP_TEXTS` override, when it has one. The manual line can |
| 1062 | /// be shorter than the op (the manual's transform line has no `opacity`), so the override's |
| 1063 | /// head wins, as its entry does in `help {topic:"<op>"}`. |
| 1064 | |
| 1065 | |
| 1066 | |
| 1067 | |
| 1068 | /// `help {topic:"ops"}`: every edit op with its argument signature, one per line, |
| 1069 | /// under the manual's headings. Each heading appears once, and an op the manual only |
| 1070 | /// names inside another entry gets the signature written there. |
| 1071 | /// A whole batch in the form `edit` takes: each op is a flat object, `{"op": name, ...args}`. |
| 1072 | /// The op-list lines below show `place {source, at, …}`, which is the argument list, not the shape. |
| 1073 | const OPS_EXAMPLE: &str = r#" Example batch (each op is a flat object with "op" and its arguments): edit {"ops":[{"op":"place","source":"src:0","at":"0s"},{"op":"fade","clip":"V1@0","in":"15f"}]}"#; |
| 1074 | |
| 1075 | |
| 1076 | |
| 1077 | |
| 1078 | |
| 1079 | |
| 1080 | |
| 1081 | |
| 1082 | |
| 1083 | |
| 1084 | |
| 1085 | |
| 1086 | |
| 1087 | |
| 1088 | |
| 1089 | |
| 1090 | |
| 1091 | |
| 1092 | |
| 1093 | |
| 1094 | |
| 1095 | |
| 1096 | |
| 1097 | |
| 1098 | |
| 1099 | |
| 1100 | |
| 1101 | |
| 1102 | |
| 1103 | |
| 1104 | |
| 1105 | |
| 1106 | |
| 1107 | |
| 1108 | |
| 1109 | |
| 1110 | |
| 1111 | |
| 1112 | |
| 1113 | |
| 1114 | |
| 1115 | |
| 1116 | |
| 1117 | |
| 1118 | |
| 1119 | /// `help {topic:"<op>"}`: that op's manual entry, or None if `op` is not an edit op. |
| 1120 | /// An `OP_TEXTS` override replaces the manual's text; the heading still comes from the manual. |
| 1121 | |
| 1122 | |
| 1123 | |
| 1124 | |
| 1125 | |
| 1126 | |
| 1127 | |
| 1128 | |
| 1129 | |
| 1130 | |
| 1131 | |
| 1132 | |
| 1133 | |
| 1134 | |
| 1135 | |
| 1136 | |
| 1137 | |
| 1138 | |
| 1139 | |
| 1140 | |
| 1141 | |
| 1142 | |
| 1143 | /// The refusal for a tool name nothing answers. An edit op name gets the shape it |
| 1144 | /// goes in; any other name gets the nearest tool names. |
| 1145 | |
| 1146 | |
| 1147 | |
| 1148 | |
| 1149 | |
| 1150 | |
| 1151 | |
| 1152 | |
| 1153 | |
| 1154 | |
| 1155 | |
| 1156 | |
| 1157 | |
| 1158 | |
| 1159 | |
| 1160 | |
| 1161 | |
| 1162 | |
| 1163 | |
| 1164 | /// The Levenshtein distance between two names, in characters. |
| 1165 | |
| 1166 | |
| 1167 | |
| 1168 | |
| 1169 | |
| 1170 | |
| 1171 | |
| 1172 | |
| 1173 | |
| 1174 | |
| 1175 | |
| 1176 | |
| 1177 | |
| 1178 | |
| 1179 | /// `help {topic:"<tool>"}`: the tool's description and its argument list from its schema. |
| 1180 | |
| 1181 | |
| 1182 | |
| 1183 | |
| 1184 | |
| 1185 | |
| 1186 | |
| 1187 | |
| 1188 | |
| 1189 | |
| 1190 | |
| 1191 | |
| 1192 | |
| 1193 | |
| 1194 | |
| 1195 | |
| 1196 | |
| 1197 | |
| 1198 | |
| 1199 | |
| 1200 | |
| 1201 | |
| 1202 | |
| 1203 | |
| 1204 | |
| 1205 | |
| 1206 | |
| 1207 | |
| 1208 | |
| 1209 | |
| 1210 | |
| 1211 | |
| 1212 | /// The JSON types a schema property takes: its `type` (one name or a list), or, when it has |
| 1213 | /// none, the types of its `anyOf` or `oneOf` branches. Empty when the property names no type. |
| 1214 | |
| 1215 | |
| 1216 | |
| 1217 | |
| 1218 | |
| 1219 | |
| 1220 | |
| 1221 | |
| 1222 | |
| 1223 | |
| 1224 | |
| 1225 | |
| 1226 | |
| 1227 | |
| 1228 | |
| 1229 | |
| 1230 | |
| 1231 | /// One value of an argument's schema as JSON text, for the `e.g.` in help and in a refusal: |
| 1232 | /// the schema's `examples` or `default` when it has one, else the first enum option, else a |
| 1233 | /// value of its type. An array shows its item shape, `["clip.mp4"]`. Untyped parts show `…`. |
| 1234 | |
| 1235 | |
| 1236 | |
| 1237 | |
| 1238 | |
| 1239 | /// The example for a value of `prop`, named `key`, described by `desc`. `in_list` is set for the |
| 1240 | /// item of a list, where a time description does not make the item a time. |
| 1241 | |
| 1242 | |
| 1243 | |
| 1244 | |
| 1245 | |
| 1246 | |
| 1247 | |
| 1248 | |
| 1249 | |
| 1250 | |
| 1251 | |
| 1252 | |
| 1253 | |
| 1254 | |
| 1255 | |
| 1256 | |
| 1257 | |
| 1258 | |
| 1259 | |
| 1260 | |
| 1261 | |
| 1262 | |
| 1263 | |
| 1264 | |
| 1265 | |
| 1266 | |
| 1267 | |
| 1268 | |
| 1269 | |
| 1270 | |
| 1271 | |
| 1272 | |
| 1273 | |
| 1274 | |
| 1275 | |
| 1276 | |
| 1277 | |
| 1278 | |
| 1279 | |
| 1280 | |
| 1281 | |
| 1282 | |
| 1283 | |
| 1284 | |
| 1285 | |
| 1286 | |
| 1287 | |
| 1288 | |
| 1289 | |
| 1290 | |
| 1291 | |
| 1292 | |
| 1293 | |
| 1294 | |
| 1295 | |
| 1296 | |
| 1297 | |
| 1298 | |
| 1299 | |
| 1300 | /// The example for the `ops` argument: a list holding one place op, a flat object with "op" and its arguments. |
| 1301 | const OPS_EXAMPLE_VALUE: &str = r#"[{"op": "place", "source": "src:0", "at": "0s"}]"#; |
| 1302 | |
| 1303 | /// A string argument's example, by its name, then by its description. A file name shows the file it |
| 1304 | /// takes (a project, a subtitle file, an output movie, or an input clip); an address, a source, a |
| 1305 | /// lane or a time shows one of its own kind. A name it does not know shows "text". |
| 1306 | |
| 1307 | |
| 1308 | |
| 1309 | |
| 1310 | |
| 1311 | |
| 1312 | |
| 1313 | |
| 1314 | |
| 1315 | |
| 1316 | |
| 1317 | |
| 1318 | |
| 1319 | |
| 1320 | |
| 1321 | |
| 1322 | |
| 1323 | |
| 1324 | |
| 1325 | |
| 1326 | |
| 1327 | |
| 1328 | |
| 1329 | |
| 1330 | |
| 1331 | |
| 1332 | |
| 1333 | |
| 1334 | |
| 1335 | |
| 1336 | |
| 1337 | |
| 1338 | |
| 1339 | |
| 1340 | |
| 1341 | |
| 1342 | |
| 1343 | /// An enum option as the help shows it: a string as is, a number as its digits. |
| 1344 | |
| 1345 | |
| 1346 | |
| 1347 | |
| 1348 | |
| 1349 | |
| 1350 | |
| 1351 | /// The captions workflow, then the `captions` tool's own arguments: the tool shares its |
| 1352 | /// name with this topic, so the topic has to answer for both. |
| 1353 | |
| 1354 | |
| 1355 | |
| 1356 | |
| 1357 | |
| 1358 | |
| 1359 | |
| 1360 | |
| 1361 | |
| 1362 | |
| 1363 | |
| 1364 | |
| 1365 | |
| 1366 | |
| 1367 | |
| 1368 | |
| 1369 | |
| 1370 | |
| 1371 | |
| 1372 | |
| 1373 | |
| 1374 | |
| 1375 | |
| 1376 | |
| 1377 | |
| 1378 | |
| 1379 | |
| 1380 | |
| 1381 | |
| 1382 | |
| 1383 | |
| 1384 | |
| 1385 | |
| 1386 | |
| 1387 | |
| 1388 | |
| 1389 | |
| 1390 | |
| 1391 | |
| 1392 | |
| 1393 | |
| 1394 | |
| 1395 | |
| 1396 | |
| 1397 | |
| 1398 | |
| 1399 | |
| 1400 | |
| 1401 | |
| 1402 | |
| 1403 | |
| 1404 | |
| 1405 | |
| 1406 | |
| 1407 | |
| 1408 | |
| 1409 | |
| 1410 | |
| 1411 | |
| 1412 | |
| 1413 | |
| 1414 | |
| 1415 | |
| 1416 | |
| 1417 | |
| 1418 | |
| 1419 | |
| 1420 | |
| 1421 | |
| 1422 | |
| 1423 | |
| 1424 | |
| 1425 | |
| 1426 | |
| 1427 | |
| 1428 | |
| 1429 | |
| 1430 | |
| 1431 | |
| 1432 | |
| 1433 | |
| 1434 | |
| 1435 | |
| 1436 | |
| 1437 | |
| 1438 | |
| 1439 | |
| 1440 | |
| 1441 | |
| 1442 | |
| 1443 | |
| 1444 | |
| 1445 | |
| 1446 | |
| 1447 | |
| 1448 | |
| 1449 | |
| 1450 | |
| 1451 | |
| 1452 | |
| 1453 | |
| 1454 | |
| 1455 | |
| 1456 | |
| 1457 | |
| 1458 | |
| 1459 | |
| 1460 | |
| 1461 | |
| 1462 | |
| 1463 | |
| 1464 | |
| 1465 | |
| 1466 | |
| 1467 | |
| 1468 | |
| 1469 | |
| 1470 | |
| 1471 | |
| 1472 | |
| 1473 | |
| 1474 | |
| 1475 | |
| 1476 | |
| 1477 | |
| 1478 | |
| 1479 | |
| 1480 | |
| 1481 | |
| 1482 | |
| 1483 | |
| 1484 | |
| 1485 | |
| 1486 | |
| 1487 | |
| 1488 | |
| 1489 | |
| 1490 | |
| 1491 | |
| 1492 | |
| 1493 | |
| 1494 | |
| 1495 | |
| 1496 | |
| 1497 | |
| 1498 | |
| 1499 | |
| 1500 | |
| 1501 | |
| 1502 | |
| 1503 | |
| 1504 | |
| 1505 | |
| 1506 | |
| 1507 | |
| 1508 | |
| 1509 | |
| 1510 | |
| 1511 | |
| 1512 | |
| 1513 | |
| 1514 | |
| 1515 | |
| 1516 | |
| 1517 | |
| 1518 | |
| 1519 | |
| 1520 | |
| 1521 | |
| 1522 | |
| 1523 | |
| 1524 | |
| 1525 | |
| 1526 | |
| 1527 | |
| 1528 | |
| 1529 | |
| 1530 | |
| 1531 | |
| 1532 | |
| 1533 | |
| 1534 | |
| 1535 | |
| 1536 | |
| 1537 | |
| 1538 | |
| 1539 | |
| 1540 | |
| 1541 | |
| 1542 | |
| 1543 | |
| 1544 | |
| 1545 | |
| 1546 | |
| 1547 | |
| 1548 | |
| 1549 | |
| 1550 | |
| 1551 | |
| 1552 | |
| 1553 | |
| 1554 | |
| 1555 | |
| 1556 | |
| 1557 | |
| 1558 | |
| 1559 | |
| 1560 | |
| 1561 | |
| 1562 | |
| 1563 | |
| 1564 | |
| 1565 | |
| 1566 | |
| 1567 | |
| 1568 | |
| 1569 | |
| 1570 | |
| 1571 | |
| 1572 | |
| 1573 | |
| 1574 | |
| 1575 | |
| 1576 | |
| 1577 | |
| 1578 | |
| 1579 | |
| 1580 | |
| 1581 | |
| 1582 | |
| 1583 | |
| 1584 | |
| 1585 | |
| 1586 | |
| 1587 | |
| 1588 | |
| 1589 | |
| 1590 | |
| 1591 | |
| 1592 | |
| 1593 | |
| 1594 | |
| 1595 | |
| 1596 | |
| 1597 | |
| 1598 | |
| 1599 | |
| 1600 | |
| 1601 | |
| 1602 | |
| 1603 | |
| 1604 | |
| 1605 | |
| 1606 | |
| 1607 | |
| 1608 | |
| 1609 | |
| 1610 | |
| 1611 | |
| 1612 | |
| 1613 | |
| 1614 | |
| 1615 | |
| 1616 | |
| 1617 | |
| 1618 | |
| 1619 | |
| 1620 | |
| 1621 | |
| 1622 | |
| 1623 | |
| 1624 | |
| 1625 | |
| 1626 | |
| 1627 | |
| 1628 | |
| 1629 | |
| 1630 | |
| 1631 | |
| 1632 | |
| 1633 | |
| 1634 | |
| 1635 | |
| 1636 | |
| 1637 | |
| 1638 | |
| 1639 | |
| 1640 | |
| 1641 | |
| 1642 | |
| 1643 | |
| 1644 | |
| 1645 | |
| 1646 | |
| 1647 | |
| 1648 | |
| 1649 | |
| 1650 | |
| 1651 | |
| 1652 | |
| 1653 | |
| 1654 | |
| 1655 | |
| 1656 | |
| 1657 | |
| 1658 | |
| 1659 | |
| 1660 | |
| 1661 | |
| 1662 | |
| 1663 | |
| 1664 | |
| 1665 | |
| 1666 | |
| 1667 | |
| 1668 | |
| 1669 | |
| 1670 | |
| 1671 | |
| 1672 | |
| 1673 | |
| 1674 | |
| 1675 | |
| 1676 | |
| 1677 | |
| 1678 | |
| 1679 | |
| 1680 | |
| 1681 | |
| 1682 | |
| 1683 | |
| 1684 | |
| 1685 | |
| 1686 | |
| 1687 | |
| 1688 | |
| 1689 | |
| 1690 | |
| 1691 | |
| 1692 | |
| 1693 | |
| 1694 | |
| 1695 | |
| 1696 | |
| 1697 | |
| 1698 | |
| 1699 | |
| 1700 | |
| 1701 | |
| 1702 | |
| 1703 | |
| 1704 | |
| 1705 | |
| 1706 | |
| 1707 | |
| 1708 | |
| 1709 | |
| 1710 | |
| 1711 | |
| 1712 | |
| 1713 | |
| 1714 | |
| 1715 | |
| 1716 | |
| 1717 | |
| 1718 | |
| 1719 | |
| 1720 | |
| 1721 | |
| 1722 | |
| 1723 | |
| 1724 | |
| 1725 | |
| 1726 | |
| 1727 | |
| 1728 | |
| 1729 | |
| 1730 | |
| 1731 | |
| 1732 | |
| 1733 | |
| 1734 | |
| 1735 | |
| 1736 | |
| 1737 | |
| 1738 | |
| 1739 | |
| 1740 | |
| 1741 | |
| 1742 | |
| 1743 | |
| 1744 | |
| 1745 | |
| 1746 | |
| 1747 | |
| 1748 | |
| 1749 | |
| 1750 | |
| 1751 | |
| 1752 | |
| 1753 | |
| 1754 | |
| 1755 | |
| 1756 | |
| 1757 | |
| 1758 | |
| 1759 | |
| 1760 | |
| 1761 | |
| 1762 | |
| 1763 | |
| 1764 | |
| 1765 | |
| 1766 | |
| 1767 | |
| 1768 | |
| 1769 | |
| 1770 | |
| 1771 | |
| 1772 | |
| 1773 | |
| 1774 | |
| 1775 | |
| 1776 | |
| 1777 | |
| 1778 | |
| 1779 | |
| 1780 | |
| 1781 | |
| 1782 | |
| 1783 | |
| 1784 | |
| 1785 | |
| 1786 | |
| 1787 | |
| 1788 | |
| 1789 | |
| 1790 | |
| 1791 | |
| 1792 | |
| 1793 | |
| 1794 | |
| 1795 | |
| 1796 | |
| 1797 | |
| 1798 | |
| 1799 | |
| 1800 | |
| 1801 | |
| 1802 | |
| 1803 | |
| 1804 | |
| 1805 | |
| 1806 | |
| 1807 | |
| 1808 | |
| 1809 | |
| 1810 | |
| 1811 | |
| 1812 | |
| 1813 | |
| 1814 | |
| 1815 | |
| 1816 | |
| 1817 | |
| 1818 | |
| 1819 | |
| 1820 | |
| 1821 | |
| 1822 | |
| 1823 | |
| 1824 | |
| 1825 | |
| 1826 | |
| 1827 | |
| 1828 | |
| 1829 | |
| 1830 | |
| 1831 | |
| 1832 | |
| 1833 | |
| 1834 | |
| 1835 | |
| 1836 | |
| 1837 | |
| 1838 | |
| 1839 | |
| 1840 | |
| 1841 | |
| 1842 | |
| 1843 | |
| 1844 | |
| 1845 | |
| 1846 | |
| 1847 | |
| 1848 | |
| 1849 | |
| 1850 | |
| 1851 | |
| 1852 | |
| 1853 | |
| 1854 | |
| 1855 | |
| 1856 | |
| 1857 | |
| 1858 | |
| 1859 | |
| 1860 | |
| 1861 | |
| 1862 | |
| 1863 | |
| 1864 | |
| 1865 | |
| 1866 | |
| 1867 | |
| 1868 | |
| 1869 | |
| 1870 | |
| 1871 | |
| 1872 | |
| 1873 | |
| 1874 | |
| 1875 | |
| 1876 | |
| 1877 | |
| 1878 | |
| 1879 | |
| 1880 | |
| 1881 | |
| 1882 | |
| 1883 | |
| 1884 | |
| 1885 | |
| 1886 | |
| 1887 | |
| 1888 | |
| 1889 | |
| 1890 | |
| 1891 | |
| 1892 | |
| 1893 | |
| 1894 | |
| 1895 | |
| 1896 | |
| 1897 | |
| 1898 | |
| 1899 | |
| 1900 | |
| 1901 | |
| 1902 | |
| 1903 | |
| 1904 | |
| 1905 | |
| 1906 | |
| 1907 | |
| 1908 | |
| 1909 | |
| 1910 | |
| 1911 | |
| 1912 | |
| 1913 | |
| 1914 | |
| 1915 | |
| 1916 | |
| 1917 | |
| 1918 | |
| 1919 | |
| 1920 | |
| 1921 | |
| 1922 | |
| 1923 | |
| 1924 | |
| 1925 | |
| 1926 | |
| 1927 | |
| 1928 | |
| 1929 | |
| 1930 | |
| 1931 | |
| 1932 | |
| 1933 | |
| 1934 | |
| 1935 | |
| 1936 | |
| 1937 | |
| 1938 | |
| 1939 | |
| 1940 | |
| 1941 | |
| 1942 | |
| 1943 | |
| 1944 | |
| 1945 | |
| 1946 | |
| 1947 | |
| 1948 | |
| 1949 | |
| 1950 | |
| 1951 | |
| 1952 | |
| 1953 | |
| 1954 | |
| 1955 | |
| 1956 | |
| 1957 | |
| 1958 | |
| 1959 | |
| 1960 | |
| 1961 | |
| 1962 | |
| 1963 | |
| 1964 | |
| 1965 | |
| 1966 | |
| 1967 | |
| 1968 | |
| 1969 | |
| 1970 | |
| 1971 | |
| 1972 | |
| 1973 | |
| 1974 | |
| 1975 | |
| 1976 | |
| 1977 | |
| 1978 | |
| 1979 | |
| 1980 | |
| 1981 | |
| 1982 | |
| 1983 | |
| 1984 | |
| 1985 | |
| 1986 | |
| 1987 | |
| 1988 | |
| 1989 | |
| 1990 | |
| 1991 | |
| 1992 | |
| 1993 | |
| 1994 | |
| 1995 | |
| 1996 | |
| 1997 | |
| 1998 | |
| 1999 | |
| 2000 | |
| 2001 | |
| 2002 | |
| 2003 | |
| 2004 | |
| 2005 | |
| 2006 | |
| 2007 | |
| 2008 | |
| 2009 | |
| 2010 | |
| 2011 | |
| 2012 | |
| 2013 | |
| 2014 | |
| 2015 | |
| 2016 | |
| 2017 | |
| 2018 | |
| 2019 | |
| 2020 | |
| 2021 | |
| 2022 | |
| 2023 | |
| 2024 | |
| 2025 | |
| 2026 | |
| 2027 | |
| 2028 | |
| 2029 | |
| 2030 | |
| 2031 | |
| 2032 | |
| 2033 | |
| 2034 | |
| 2035 | |
| 2036 | |
| 2037 | |
| 2038 | |
| 2039 | |
| 2040 | |
| 2041 | |
| 2042 | |
| 2043 | |
| 2044 | |
| 2045 | |
| 2046 | |
| 2047 | |
| 2048 | |
| 2049 | |
| 2050 | |
| 2051 | |
| 2052 | |
| 2053 | |
| 2054 | |
| 2055 | |
| 2056 | |
| 2057 | |
| 2058 | |
| 2059 | |
| 2060 | |
| 2061 | |
| 2062 | |
| 2063 | |
| 2064 | |
| 2065 | |
| 2066 | |
| 2067 | |
| 2068 | |
| 2069 | |
| 2070 | |
| 2071 | |
| 2072 | |
| 2073 | |
| 2074 | |
| 2075 | |
| 2076 | |
| 2077 | |
| 2078 | |
| 2079 | |
| 2080 | |
| 2081 | |
| 2082 | |
| 2083 | |
| 2084 | |
| 2085 | |
| 2086 | |
| 2087 | |
| 2088 | |
| 2089 | |
| 2090 | |
| 2091 | |
| 2092 | |
| 2093 | |
| 2094 | |
| 2095 | |
| 2096 | |
| 2097 | |
| 2098 | |
| 2099 | |
| 2100 | |
| 2101 | |
| 2102 | |
| 2103 | |
| 2104 | |
| 2105 | |
| 2106 | |
| 2107 | |
| 2108 | |
| 2109 | |
| 2110 | |
| 2111 | |
| 2112 | |
| 2113 | |
| 2114 | |
| 2115 | |
| 2116 | |
| 2117 | |
| 2118 | |
| 2119 | |
| 2120 | |
| 2121 | |
| 2122 | |
| 2123 | |
| 2124 | |
| 2125 | |
| 2126 | |
| 2127 | |
| 2128 | |
| 2129 | |
| 2130 | |
| 2131 | |
| 2132 | |
| 2133 | |
| 2134 | |
| 2135 | |
| 2136 | |
| 2137 | |
| 2138 | |
| 2139 | |
| 2140 | |
| 2141 | |
| 2142 | |
| 2143 | |
| 2144 | |
| 2145 | |
| 2146 | |
| 2147 | |
| 2148 | |
| 2149 | |
| 2150 | |
| 2151 | |
| 2152 | |
| 2153 | |
| 2154 | |
| 2155 | |
| 2156 | |
| 2157 | |
| 2158 | |
| 2159 | |
| 2160 | |
| 2161 | |
| 2162 | |
| 2163 | |
| 2164 | |
| 2165 | |
| 2166 | |
| 2167 | |
| 2168 | |
| 2169 | |
| 2170 | |
| 2171 | |
| 2172 | |
| 2173 | |
| 2174 | |
| 2175 | |
| 2176 | |
| 2177 | |
| 2178 | |
| 2179 | |
| 2180 | |
| 2181 | |
| 2182 | |
| 2183 | |
| 2184 | |
| 2185 | |
| 2186 | |
| 2187 | |
| 2188 | |
| 2189 | |
| 2190 | |
| 2191 | |
| 2192 | |
| 2193 | |
| 2194 | |
| 2195 | |
| 2196 | |
| 2197 | |
| 2198 | |
| 2199 | |
| 2200 | |
| 2201 | |
| 2202 | |
| 2203 | |
| 2204 | |
| 2205 | |
| 2206 | |
| 2207 | |
| 2208 | |
| 2209 | |
| 2210 | |
| 2211 | |
| 2212 | |
| 2213 | |
| 2214 | |
| 2215 | |
| 2216 | |
| 2217 | |
| 2218 | |
| 2219 | |
| 2220 | |
| 2221 | |
| 2222 | |
| 2223 | |
| 2224 | |
| 2225 | |
| 2226 | |
| 2227 | |
| 2228 | |
| 2229 | |
| 2230 | |
| 2231 | |
| 2232 | |
| 2233 | |
| 2234 | |
| 2235 | |
| 2236 | |
| 2237 | |
| 2238 | |
| 2239 | |
| 2240 | |
| 2241 | |
| 2242 | |
| 2243 | |
| 2244 | |
| 2245 | |
| 2246 | |
| 2247 | |
| 2248 | |
| 2249 | |
| 2250 | |
| 2251 | |
| 2252 | |
| 2253 | |
| 2254 | |
| 2255 | |
| 2256 | |
| 2257 | |
| 2258 | |
| 2259 | |
| 2260 | |
| 2261 | |
| 2262 | |
| 2263 | |
| 2264 | |
| 2265 | |
| 2266 | |
| 2267 | |
| 2268 | |
| 2269 | |
| 2270 | |
| 2271 | |
| 2272 | |
| 2273 | |
| 2274 | |
| 2275 | |
| 2276 | |
| 2277 | |
| 2278 | |
| 2279 | |
| 2280 | |
| 2281 | |
| 2282 | |
| 2283 | |
| 2284 | |
| 2285 | |
| 2286 | |
| 2287 | |
| 2288 | |
| 2289 | |
| 2290 | |
| 2291 | |
| 2292 | |
| 2293 | |
| 2294 | |
| 2295 |