frame_export: Export a Single Frame at a Given Time

View source: R/frame.R

frame_exportR Documentation

Export a Single Frame at a Given Time

Description

Pull one frame from a video at time seconds and write it as an image. A call-by-call primitive: no timeline, no asset lookup. The caller (an editor such as kerNLE) decides which file and which time; this just extracts the frame. Seeking is placed before -i for a fast keyframe seek.

Usage

frame_export(input, time, output, overwrite = TRUE, dry_run = FALSE)

Arguments

input

Path to input video.

time

Time in seconds to grab the frame at.

output

Path for output image (e.g. .png, .jpg).

overwrite

If TRUE (default), overwrite output file.

dry_run

If TRUE, return the FFmpeg command without executing.

Value

Invisibly returns the output path. If dry_run, returns command string.

Examples

## Not run: 
frame_export("scene.mp4", 4.0, "frame.png")

## End(Not run)


compost documentation built on Aug. 4, 2026, 5:11 p.m.