videokit
v0.1.0Probe, trim, transcode and extract frames or audio from local video files with ffmpeg.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
probe_video
Probe a local video file for duration, dimensions, codecs and format
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Path to the local video file to probe. |
get_thumbnail
Extract a single frame of a video as a thumbnail image file
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Path to the local video file to extract the thumbnail frame from. |
output_file * | string | Path of the image file to write the extracted thumbnail frame to. |
timestamp_seconds | number | Optional timestamp in seconds into the video at which to capture the thumbnail frame; defaults to 0 and must be >= 0. |
extract_frames
Extract frames of a video as image files in an output directory at a given rate
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Path to the local video file to extract frames from. |
output_dir * | string | Directory to write the extracted frame image files into, named frame-%04d.png. |
fps | number | Optional rate in frames per second at which to extract frames; defaults to 1 and must be > 0. |
extract_audio
Extract the audio track of a video into an audio file
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Path to the local video file to extract the audio track from. |
output_file * | string | Path of the audio file to write the extracted audio track to. |
trim_video
Trim a video to a segment starting at an offset, optionally with a duration
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Path to the local video file to trim. |
output_file * | string | Path of the video file to write the trimmed segment to. |
start_seconds * | number | Offset in seconds from the start of the video at which the trimmed segment begins; must be >= 0. |
duration_seconds | number | Optional length in seconds of the trimmed segment, starting at start_seconds; must be > 0 when given. |
transcode_video
Transcode a video to another container format
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Path to the local video file to transcode. |
format * | string | Target container format to transcode the video to; output_file must end with '.' followed by this format. |
output_file * | string | Path of the video file to write the transcoded video to; must end with '.' followed by the target format. |
resize_video
Resize a video to the given width and height
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Path to the local video file to resize. |
height * | number | Target height in pixels for the resized video; must be > 0. |
output_file * | string | Path of the video file to write the resized video to. |
width * | number | Target width in pixels for the resized video; must be > 0. |