Home > @infiniteobjects/ffmpeg
Pre configured ffmpeg
instance
Function | Description |
---|---|
appendToFileName(fileName, append, ext) | Appends the given string to a filename |
asPromise(command, bailAfter) | Promisify an ffmpeg command |
countBlackFrames(filePath) | Count the black frames in a video file |
generatePoster(filePath) | Generates a poster image from the given video |
generateThumbnails(filePath, count) | Generates thumbnails from the given video |
getVideoMetadata(filePath, useAverageFps) | Gets the metadata from a video file |
hasInOutBlackFrames(filePath, checkDuration) | Check if a video file has black frames at the start or end |
isAnimatedImage(filePath) | Checks if the given file is an animated image |
optimizeForWeb(filePath) | Optimizes the video for web use. (h264, 24pfs, 1080p max) |
Interface | Description |
---|---|
CodecMeta | Video File metadata |
Variable | Description |
---|---|
FFMPEG_PATH | FFMPEG PATH |
FFPROBE_PATH | FFPROBE PATH |
KNOWN_ANIMATED_CODECS | Known animated codecs |
MAX_COMMAND_TIME | Default max command time: 500 seconds |
OPTIMIZED_SIZE | Max optimized video size |