frame_export

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

frame_export("scene.mp4", 4.0, "frame.png")