Registry / Framework

framework · v0.1.2
Video Keycut
Snap a requested cut forward to the next eligible keyframe and preserve the resulting sample boundary.
Use Video Keycut
use vendor::video_keycut::video_keycut;
Run the example
nest demo video_keycut@0.1.2
blyxc native-run video_keycut-demo/main.blyx
Example source and expected output
use std::cli;
use std::text;
use vendor::video_keycut::video_keycut;
fn main() {
let arguments = cli_args();
if args_len(arguments) > 0 {
if args_len(arguments) % 2 != 0 {
stderr_line("Expected event and value pairs");
process_exit(2);
}
let mut live = video_keycut_start();
let mut i = 0;
while i < args_len(arguments) {
let input = args_at(arguments, i + 1);
if !text_is_number(input) {
stderr_line("Expected a whole numeric event value");
process_exit(2);
}
live = video_keycut_step(live, args_at(arguments, i), text_number(input));
let command = video_keycut_command(live);
println!(command);
if command == "reject" { process_exit(1); }
i += 2;
}
return;
}
let mut state = video_keycut_start();
state = video_keycut_step(state, "cut", 40.0);
println!(video_keycut_command(state));
state = video_keycut_step(state, "keyframe", 35.0);
println!(video_keycut_command(state));
state = video_keycut_step(state, "keyframe", 48.0);
println!(video_keycut_command(state));
state = video_keycut_step(state, "confirm", 48.0);
println!(video_keycut_command(state));
}
Expected output
request_keyframe
skip_keyframe
split_at
index_clip
Published versions
| Version | Package | Source commit | SHA-256 |
|---|---|---|---|
| 0.1.2 | Download ZIP · Browse files | 60233d35a0 | 6313a8f4cc97686b31235db6fc0025f3de9640adc73039072c214329eb4dde09 |
| 0.1.1 | Download ZIP · Browse files | 43ce801156 | e5d9922eb7bf778a5a4f886ca4f823396fd4dbf57b38de2dc78188dca7bbc4eb |
| 0.1.0 | Download ZIP · Browse files | 6349f23784 | 5fb33573cf3b374879967b5f2aae58ce49baebfb3a31dd081f4e18835e75c32f |