Class IgvideoEntity

Hierarchy

  • IgvideoEntity

Constructors

Properties

file: Buffer

Methods

  • Returns {
        duration: number;
        height: number;
        width: number;
    }

    • duration: number
    • height: number
    • width: number
  • Returns Buffer[]

  • Gets duration in ms, width and height info for a video in the mp4 container

    Parameters

    • buffer: Buffer

      Buffer, containing the video-file

    Returns {
        duration: number;
        height: number;
        width: number;
    }

    duration in ms, width and height in px

    • duration: number
    • height: number
    • width: number
  • Reads the duration in ms from any MP4 file with at least one stream (a/v)

    Parameters

    • buffer: Buffer

    Returns number

  • Reads a 16bit unsigned integer from a given Buffer by walking along the keys and getting the value with the given offset ref: https://gist.github.com/OllieJones/5ffb011fa3a11964154975582360391c#file-streampeek-js-L25

    Parameters

    • buffer: Buffer

      The buffer to read from

    • keys: string[]

      Keys the 'walker' should pass (stopping at the last key)

    • offset: number

      Offset from the ast key to read the uint16

    Returns number

  • Reads a 32bit unsigned integer from a given Buffer by walking along the keys and getting the value with the given offset ref: https://gist.github.com/OllieJones/5ffb011fa3a11964154975582360391c#file-streampeek-js-L9

    Parameters

    • buffer: Buffer

      The buffer to read from

    • keys: string[]

      Keys the 'walker' should pass (stopping at the last key)

    • offset: number

      Offset from the ast key to read the uint32

    Returns number