Module ffmpeg

Lua bindings to FFmpeg libraries.

Info:

  • Copyright: Aiden Nibali 2015
  • License: MIT
  • Author: Aiden Nibali

Functions

new (path) Opens a video file for reading.

Class Video

Video:filter (pixel_format_name[, filterchain='null']) Sets a filter to apply to the video.
Video:duration () Gets the video duration in seconds.
Video:pixel_format_name () Gets the name of the video pixel format.
Video:read_video_frame () Reads the next video frame.

Class VideoFrame

VideoFrame:to_ascii () Converts the video frame to an ASCII visualisation.


Functions

new (path)
Opens a video file for reading.

Parameters:

  • path string A relative or absolute path to the video file.

Returns:

    Video

Class Video

A Video class.
Video:filter (pixel_format_name[, filterchain='null'])
Sets a filter to apply to the video.

Parameters:

  • pixel_format_name string The name of the desired output pixel format. Pixel names can be found in pixdesc.c.
  • filterchain string The filterchain to be applied. Refer to the libav documentation for the syntax of this string. (default 'null')

Returns:

    Video A copy of this Video with the specified filter set up.

Usage:

     -- Set up a filter which scales the video to 128x128 pixels, flips it
     -- horizontally and sets the output pixel format to 24-bit RGB:
     video = video:filter('rgb24', 'scale=128x128,hflip')
Video:duration ()
Gets the video duration in seconds.
Video:pixel_format_name ()
Gets the name of the video pixel format.
Video:read_video_frame ()
Reads the next video frame.

Returns:

    VideoFrame

Class VideoFrame

A VideoFrame class.
VideoFrame:to_ascii ()
Converts the video frame to an ASCII visualisation.
generated by LDoc 1.4.3 Last updated 2015-12-23 12:05:16