videokit

v0.1.0
io.github.CloudCorpRecords/videokit Checked 4 days ago Published 1 month ago

Probe, 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

ParameterTypeDescription
file_path *stringPath to the local video file to probe.

get_thumbnail

Extract a single frame of a video as a thumbnail image file

ParameterTypeDescription
file_path *stringPath to the local video file to extract the thumbnail frame from.
output_file *stringPath of the image file to write the extracted thumbnail frame to.
timestamp_secondsnumberOptional 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

ParameterTypeDescription
file_path *stringPath to the local video file to extract frames from.
output_dir *stringDirectory to write the extracted frame image files into, named frame-%04d.png.
fpsnumberOptional 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

ParameterTypeDescription
file_path *stringPath to the local video file to extract the audio track from.
output_file *stringPath 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

ParameterTypeDescription
file_path *stringPath to the local video file to trim.
output_file *stringPath of the video file to write the trimmed segment to.
start_seconds *numberOffset in seconds from the start of the video at which the trimmed segment begins; must be >= 0.
duration_secondsnumberOptional 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

ParameterTypeDescription
file_path *stringPath to the local video file to transcode.
format *stringTarget container format to transcode the video to; output_file must end with '.' followed by this format.
output_file *stringPath 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

ParameterTypeDescription
file_path *stringPath to the local video file to resize.
height *numberTarget height in pixels for the resized video; must be > 0.
output_file *stringPath of the video file to write the resized video to.
width *numberTarget width in pixels for the resized video; must be > 0.