## Modules
ffmpeg
lib/ffmpeg
## ffmpeg ## lib/ffmpeg * [lib/ffmpeg](#module_lib/ffmpeg) * [~Creates an ffmpeg class](#module_lib/ffmpeg..Creates an ffmpeg class) * [new Creates an ffmpeg class(sys)](#new_module_lib/ffmpeg..Creates an ffmpeg class_new) * [~FFMPEG](#module_lib/ffmpeg..FFMPEG) * [.init()](#module_lib/ffmpeg..FFMPEG+init) * [.padded_frame(i)](#module_lib/ffmpeg..FFMPEG+padded_frame) ⇒ string * [.parseStderr(line)](#module_lib/ffmpeg..FFMPEG+parseStderr) * [.frame(state, light)](#module_lib/ffmpeg..FFMPEG+frame) ⇒ string * [.frames(video, obj)](#module_lib/ffmpeg..FFMPEG+frames) ⇒ ? * [.clear(frame)](#module_lib/ffmpeg..FFMPEG+clear) ⇒ boolean * [.clearAll()](#module_lib/ffmpeg..FFMPEG+clearAll) * [.checkDir()](#module_lib/ffmpeg..FFMPEG+checkDir) ### lib/ffmpeg~Creates an ffmpeg class **Kind**: inner class of [lib/ffmpeg](#module_lib/ffmpeg) #### new Creates an ffmpeg class(sys) | Param | Type | Description | | --- | --- | --- | | sys | object | System object to be used to get temp directory | ### lib/ffmpeg~FFMPEG Class representing all ffmpeg features. **Kind**: inner class of [lib/ffmpeg](#module_lib/ffmpeg) * [~FFMPEG](#module_lib/ffmpeg..FFMPEG) * [.init()](#module_lib/ffmpeg..FFMPEG+init) * [.padded_frame(i)](#module_lib/ffmpeg..FFMPEG+padded_frame) ⇒ string * [.parseStderr(line)](#module_lib/ffmpeg..FFMPEG+parseStderr) * [.frame(state, light)](#module_lib/ffmpeg..FFMPEG+frame) ⇒ string * [.frames(video, obj)](#module_lib/ffmpeg..FFMPEG+frames) ⇒ ? * [.clear(frame)](#module_lib/ffmpeg..FFMPEG+clear) ⇒ boolean * [.clearAll()](#module_lib/ffmpeg..FFMPEG+clearAll) * [.checkDir()](#module_lib/ffmpeg..FFMPEG+checkDir) #### ffmpeG.init() Async method to call async functions from constructor **Kind**: instance method of [FFMPEG](#module_lib/ffmpeg..FFMPEG) #### ffmpeG.padded\_frame(i) ⇒ string Add padding to a number to 5 places. Return a string. **Kind**: instance method of [FFMPEG](#module_lib/ffmpeg..FFMPEG) **Returns**: string - Padded string | Param | Type | Description | | --- | --- | --- | | i | integer | Integer to pad | #### ffmpeG.parseStderr(line) Parse the stderr output of ffmpeg **Kind**: instance method of [FFMPEG](#module_lib/ffmpeg..FFMPEG) | Param | Type | Description | | --- | --- | --- | | line | string | Stderr line | #### ffmpeG.frame(state, light) ⇒ string Render a single frame from a video or image to a png. **Kind**: instance method of [FFMPEG](#module_lib/ffmpeg..FFMPEG) **Returns**: string - Path of frame | Param | Type | Description | | --- | --- | --- | | state | object | State object containing file data | | light | object | Object containing color information for frame | #### ffmpeG.frames(video, obj) ⇒ ? Render all frames in a video to the temp directory. Not in use. **Kind**: instance method of [FFMPEG](#module_lib/ffmpeg..FFMPEG) | Param | Type | Description | | --- | --- | --- | | video | string | Path to video | | obj | object | Not sure | #### ffmpeG.clear(frame) ⇒ boolean Clears a specific frame from the tmp directory **Kind**: instance method of [FFMPEG](#module_lib/ffmpeg..FFMPEG) **Returns**: boolean - True if successful, false if not | Param | Type | Description | | --- | --- | --- | | frame | integer | Integer of frame to clear | #### ffmpeG.clearAll() Deletes all frames in temp directory. **Kind**: instance method of [FFMPEG](#module_lib/ffmpeg..FFMPEG) #### ffmpeG.checkDir() Checks if mcopy temp directory exists. If it doesn't, creates it. **Kind**: instance method of [FFMPEG](#module_lib/ffmpeg..FFMPEG)