frameloom/docs/README.md

5.8 KiB

Functions

exec(cmd)Promise

Shells out to execute a command with async/await. Async wrapper to exec module.

delay(ms)Promise

Delays process for specified amount of time in milliseconds.

zeroPad(i, max)string

Pads a numerical value with preceding zeros to make strings same length.

shuffle(a)

Shuffles an array into a random state.

clear()

Clears the temporary directory of all files. Establishes a directory if none exists.

frames(video, order)string

Exports all frames from video. Appends number to the string to keep frames in alternating order to be quickly stitched together or re-sorted.

weave(pattern, realtime)

Re-arranges the frames into the order specified in the pattern. Calls patternSort() to perform the rename and unlink actions

altSort(list, pattern, realtime)

Alternate frame sorting method.

standardSort(list, pattern, realtime)

Standard frame sorting method.

randomSort(list, pattern, realtime)

Ramdomly sort frames for re-stitching.

render(output)

Render the frames into a video using ffmpeg.

main(arg)

Parses the arguments and runs the process of exporting, sorting and then "weaving" the frames back into a video

exec(cmd) ⇒ Promise

Shells out to execute a command with async/await. Async wrapper to exec module.

Kind: global function
Returns: Promise - Promise containing the complete stdio

Param Type Description
cmd string Command to execute

delay(ms) ⇒ Promise

Delays process for specified amount of time in milliseconds.

Kind: global function
Returns: Promise - Promise that resolves after set time

Param Type Description
ms integer Milliseconds to delay for

zeroPad(i, max) ⇒ string

Pads a numerical value with preceding zeros to make strings same length.

Kind: global function
Returns: string - Padded number as a string

Param Type Default Description
i integer Number to pad
max integer 5 (optional) Maximum length of string to pad to

shuffle(a)

Shuffles an array into a random state.

Kind: global function

Param Type Description
a array Array to randomize

clear()

Clears the temporary directory of all files. Establishes a directory if none exists.

Kind: global function

frames(video, order) ⇒ string

Exports all frames from video. Appends number to the string to keep frames in alternating order to be quickly stitched together or re-sorted.

Kind: global function
Returns: string - String with the export order, not sure why I did this

Param Type Description
video string String representing path to video
order integer Integer to be appended to pathname of file

weave(pattern, realtime)

Re-arranges the frames into the order specified in the pattern. Calls patternSort() to perform the rename and unlink actions

Kind: global function

Param Type Description
pattern array Pattern of the frames per input
realtime boolean Flag to turn on or off realtime behavior (drop frames / number of vids)

altSort(list, pattern, realtime)

Alternate frame sorting method.

Kind: global function

Param Type Description
list array List of frames to group
pattern array Array representing pattern
realtime boolean Flag to group with "realtime" behavior

standardSort(list, pattern, realtime)

Standard frame sorting method.

Kind: global function

Param Type Description
list array List of frames to group
pattern array Array representing pattern
realtime boolean Flag to group with "realtime" behavior

randomSort(list, pattern, realtime)

Ramdomly sort frames for re-stitching.

Kind: global function

Param Type Description
list array List of frames to group
pattern array Array representing pattern
realtime boolean Flag to group with "realtime" behavior

render(output)

Render the frames into a video using ffmpeg.

Kind: global function

Param Type Description
output string Path to export the video to

main(arg)

Parses the arguments and runs the process of exporting, sorting and then "weaving" the frames back into a video

Kind: global function

Param Type Description
arg object Object containing all arguments