Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • FFmpegInterface

Implemented by

Index

Properties

ComponentStore

ComponentStore: typeof ComponentStore

Reference to entire component store, which is the store that contains all stores ComponentStore

FileStore

FileStore: typeof FileStore

Reference to the FileStore FileStore

VideoStore

VideoStore: typeof VideoStore

Reference to the VideoStore VideoStore

changeFileExtension

changeFileExtension: (newExtension: string) => void

Changes the File Extension After this Feature is Executed

This Changes the format of video file, check formats folder to see supported formats

param

Expect a string of the format name with the dot Example .mp4, .avi

Type declaration

    • (newExtension: string): void
    • Parameters

      • newExtension: string

      Returns void

commonInputTypes

commonInputTypes: { default: () => void; fileRead: (filename: string) => void; images: (frameRate: number, ext: string) => void }

If a function needs a specific type of input command, other than default then this object as a few common inputs that can be used

Type declaration

  • default: () => void
      • (): void
      • Returns void

  • fileRead: (filename: string) => void
      • (filename: string): void
      • Parameters

        • filename: string

        Returns void

  • images: (frameRate: number, ext: string) => void
      • (frameRate: number, ext: string): void
      • Parameters

        • frameRate: number
        • ext: string

        Returns void

configuration

configuration: {}

Every Feature is expected to set its own configuration properties,

these properties will be in an Object {key: {}}

where the keys are the names of the parents you set in your UI component

Each key will have an object of type {value : any, [name:string]: any}

This object is expected to be used in setting the configurations of the Feature.

Type declaration

display

display: boolean

Boolean indicating if a video file can be displayed in the browser or not

ffmpegCommands

ffmpegCommands: string

String Representing the ffmpeg command executed

ffmpegInputCommand

ffmpegInputCommand: string

String representing the how files are inputted to FFmpeg

fileConfig

fileConfig: FileConfigType

Determines the configuration of how you plan to use files in your feature

Default Settings

number : {min : 1, max : -1}, this means the function will use at minimum 1 file and use all the files the user uploads

types : ['video'], this means the function will only use video files and nothing else will be given to it.

Accepted Types 'video', 'image', 'audio', 'other'(represents any other file, eg text files)

fileInputType

fileInputType: (fileName: string) => void

Sets FFmpeg Input Command for reading from input file

Please make sure this works in FFmpeg first

Further text file expectation,

A) Follow FFmpeg File Name Rules

B) Use FFmpeg WriteTxt to write the file to memory

Eg https://github.com/Etwas-Builders/ffmpeg.wasm/blob/ebdc295b4ab7e6412b4cdcbd31b9ceae0b9ad364/src/createFFmpeg.js#L114

param

A string that is the name of the text file

Type declaration

    • (fileName: string): void
    • Parameters

      • fileName: string

      Returns void

getCurrentFile

getCurrentFile: () => { name: string; type: FileTypes }

Retrieves the current file of the last modified file from the store

Type declaration

imageInputType

imageInputType: (frameRate: number, ext: string) => void

Sets FFmpeg Input Command for reading images for any function

You will have to do further changes to the FFmpeg Command to use Images

This command just loads the images

Type declaration

    • (frameRate: number, ext: string): void
    • Parameters

      • frameRate: number
      • ext: string

      Returns void

inputFile

inputFile: CustomFileType

outputFile

outputFile: CustomFileType

parseConfiguration

parseConfiguration: () => {}

Function Expected to parse the required values from this.configuration and return to constructor

Type declaration

    • (): {}
    • Returns {}

      • [name: string]: any

progressBar

progressBar: { color: string; name: string }

Object determining the text and color of the progress bar

Type declaration

  • color: string
  • name: string

runFFmpeg

runFFmpeg: () => Promise<CustomFileType>

Calls FFmpeg with the given ffmpegCommands and appropriate inputFileName

returns

The file name of the processed file

Type declaration

setFFmpegCommands

setFFmpegCommands: (...args: any[]) => void

Expect Child Class to define this function to set ffmpegCommands property

This method can take N number of arguments of any type

Type declaration

    • (...args: any[]): void
    • Parameters

      • Rest ...args: any[]

      Returns void

setFFmpegInputCommand

setFFmpegInputCommand: () => void

Sets the FFmpeg Input Command, this function can and

should be overwritten when special input cases are needed

By default, this function will set the current file as single file input

Check commonInputTypes to see already implemented functions for you

Type declaration

    • (): void
    • Returns void

setFileConfig

setFileConfig: () => void

Function is Expected to the configuration of files for this feature

this.fileConfig :

{primaryType : string, types : [{name : string,number : {min : number, max : number}]}}

Type declaration

    • (): void
    • Returns void

setProgress

setProgress: () => void

Function is Expected to set the name and color of the progress bar for this feature

this.progressBar : { name: string; color: string}

This function is expected to be called in constructor

Type declaration

    • (): void
    • Returns void

threads

threads: number

Number of threads in a user's computer

updateDisplay

updateDisplay: (displayType: boolean, type: string) => void

Updates the video display parameter for a format, which determines if it is showed in the video player or not.

param

Expect a boolean of if the video format can be shown in an HTML5

Type declaration

    • (displayType: boolean, type: string): void
    • Parameters

      • displayType: boolean
      • type: string

      Returns void

updateProgress

updateProgress: () => void

Function sets the chosen progressBar values to the store

Type declaration

    • (): void
    • Returns void

Generated using TypeDoc