MAWT Reference 0.3.0

::mawt

Commands

GetFfmpegVersion [::mawt]

mawt, Top

Get FFMPEG library version string.

GetFfmpegVersion

Return value

Returns the version of the wrapped FFMPEG library as a string. The version is returned as "Major.Minor.Patch".

Description

Get FFMPEG library version string.

See also: VideoOpen SetDebugMode GetErrorMessage

VideoExport [::mawt]

mawt, Top

Export video frames into a series of image files.

VideoExport movieFile imgFilePattern args

Parameters
movieFile Movie file name.
imgFilePattern Pattern for image output files. Must contain a printf like integer format specifier.
args List of key-value pairs specifying export configuration options and its values.
Description

Export video frames into a series of image files.

Option keys:

-start <int>

   Start frame. Default: First video frame.

-end <int>

   End frame. Default: Last video frame.

See also: VideoImport

VideoImport [::mawt]

mawt, Top

Generate a video by importing a series of image files.

VideoImport imgFilePattern movieFile args

Parameters
imgFilePattern Pattern for image output files. Must contain a printf like integer format specifier.
movieFile Movie file name.
args List of key-value pairs specifying import configuration options and its values.
Description

Generate a video by importing a series of image files.

Option keys:

-start <int>

   Start frame. Default: First video frame.

-end <int>

   End frame. Default: Last video frame.

-fps <int>

   Frames per second. Default: 25.

-bitrate <float>

   Bitrate in MBit per second. Default: 4.0.

-flip <bool>

   Flip images. Default: false.

-verbose <bool>

   Print verbose messages. Default: false.

See also: VideoExport

Classes

Vector [::mawt]

mawt, Top

constructorConstructor for the class
destructorDestructor for the class
FromByteArrayCreate a Vector from a binary string.
FromPhoto
Get
ToByteArrayCopy a Vector into a binary string.
ToPhoto
constructor [::mawt::Vector]

Vector, Top

::mawt::Vector create numBytes

Parameters
numBytes
destructor [::mawt::Vector]

Vector, Top

OBJECT destroy

FromByteArray [::mawt::Vector]

Vector, Top

Create a Vector from a binary string.

OBJECT FromByteArray str

Parameters
str Binary string.
Description

Create a Vector from a binary string.

Create a new Vector from given binary string "str".

See also: ToByteArray

FromPhoto [::mawt::Vector]

Vector, Top

OBJECT FromPhoto phImg numChans scale offset

Parameters
phImg
numChans
scale
offset
Get [::mawt::Vector]

Vector, Top

OBJECT Get

ToByteArray [::mawt::Vector]

Vector, Top

Copy a Vector into a binary string.

OBJECT ToByteArray numBytes srcOff destOff

Parameters
numBytes int
srcOff(optional, default 0) int
destOff(optional, default 0) int
Description

Copy a Vector into a binary string.

Copy "numBytes" elements into a Tcl binary string and return that string. "srcOff" and "destOff" may be used optionally to specify an offset into the source and the destination.

See also: FromByteArray

ToPhoto [::mawt::Vector]

Vector, Top

OBJECT ToPhoto phImg width height numChans linesAreBottomUp

Parameters
phImg
width
height
numChans(optional, default 3)
linesAreBottomUp(optional, default 0)

Video [::mawt]

mawt, Top

CloseClose a video stream.
constructorConstructor for the class
CreateCreate a new empty video file.
destructorDestructor for the class
GetDurationGet video duration information as a dict.
GetDurationAsStringGet video duration information as a string.
GetErrorMessageGet the last error message issued by MAWT.
GetFramerate
GetHeightGet the height of a video stream.
GetImageGet an image from a video stream.
GetNextImageGet next image from a video stream.
GetNumFrames
GetWidthGet the width of a video stream.
IsOpen
LockLock a video stream.
OpenOpen a video file.
SetDebugModeEnable or disable the debug mode of the MAWT library.
StartStart acquisition of a video stream.
StopStop acquisition of a video stream.
UnlockUnlock a video stream.
WriteNextImageGet next image from a video stream.
constructor [::mawt::Video]

Video, Top

::mawt::Video create fileName mode args

Parameters
fileName
mode
argsAdditional options.
destructor [::mawt::Video]

Video, Top

OBJECT destroy

Close [::mawt::Video]

Video, Top

Close a video stream.

OBJECT Close

Description

Close a video stream.

See also: Open

Create [::mawt::Video]

Video, Top

Create a new empty video file.

OBJECT Create fileName width height fps bitrate

Parameters
fileName Create the video stream in file "fileName".
width
height
fps
bitrate
Description

Create a new empty video file.

Throws an error, if the file could not be openend.

See also: Close

GetDuration [::mawt::Video]

Video, Top

Get video duration information as a dict.

OBJECT GetDuration

Description

Get video duration information as a dict.

Get the duration of current video stream. The duration is returned as a dictionary with the keys: "minutes", "seconds", "frames".

See also: GetDurationAsString

GetDurationAsString [::mawt::Video]

Video, Top

Get video duration information as a string.

OBJECT GetDurationAsString

Description

Get video duration information as a string.

Get the duration of current video stream. The duration is returned as a string in the following format: "minutes:seconds.frames".

See also: GetDuration

GetErrorMessage [::mawt::Video]

Video, Top

Get the last error message issued by MAWT.

OBJECT GetErrorMessage

Description

Get the last error message issued by MAWT.

See also: Open SetDebugMode

GetFramerate [::mawt::Video]

Video, Top

OBJECT GetFramerate

GetHeight [::mawt::Video]

Video, Top

Get the height of a video stream.

OBJECT GetHeight

Return value

Returns the height of a video stream in pixels.

Description

Get the height of a video stream.

See also: Open GetWidth

GetImage [::mawt::Video]

Video, Top

Get an image from a video stream.

OBJECT GetImage img flip num

Parameters
img A Vector of appropriate size to store the image data.
flip Boolean value to specify image flipping.
num Image number as integer value starting at zero.
Description

Get an image from a video stream.

Get image "num" from current video stream. The image will be stored in variable "img". "img" must point to a buffer of appropriate size. If "flip" is set to 1, the image is returned in bottom-up scanline order as needed by OpenGL. If "flip" is set to 0, the image is returned in top-down scanline order as needed by the img::raw extension.

Throws an error, if the image could not be retrieved from the video stream.

See also: Open GetNextImage GetWidth GetHeight

GetNextImage [::mawt::Video]

Video, Top

Get next image from a video stream.

OBJECT GetNextImage img flip

Parameters
img A Vector of appropriate size to store the image data.
flip Boolean value to specify image flipping.
Description

Get next image from a video stream.

Get the next image from current video stream. The image will be stored in variable "img". "img" must point to a buffer of appropriate size. If "flip" is set to 1, the image is returned in bottom-up scanline order as needed by OpenGL. If "flip" is set to 0, the image is returned in top-down scanline order as needed by the img::raw extension.

Throws an error, if the image could not be retrieved from the video stream.

See also: Open Close GetImage GetWidth GetHeight

GetNumFrames [::mawt::Video]

Video, Top

OBJECT GetNumFrames

GetWidth [::mawt::Video]

Video, Top

Get the width of a video stream.

OBJECT GetWidth

Return value

Returns the width of a video stream in pixels.

Description

Get the width of a video stream.

See also: Open GetHeight

IsOpen [::mawt::Video]

Video, Top

OBJECT IsOpen

Lock [::mawt::Video]

Video, Top

Lock a video stream.

OBJECT Lock

Description

Lock a video stream.

See also: Open Unlock

Open [::mawt::Video]

Video, Top

Open a video file.

OBJECT Open fileName

Parameters
fileName Open the video stream stored in file "fileName".
Description

Open a video file.

If a video stream is already open, it is closed before opening the new video stream.

Throws an error, if the file could not be openend.

See also: Close Start Stop

SetDebugMode [::mawt::Video]

Video, Top

Enable or disable the debug mode of the MAWT library.

OBJECT SetDebugMode onOff

Parameters
onOff Boolean value to enable or disable the debug mode.
Description

Enable or disable the debug mode of the MAWT library.

See also: VideoOpen

Start [::mawt::Video]

Video, Top

Start acquisition of a video stream.

OBJECT Start width height

Parameters
width(optional, default -1) integer
height(optional, default -1) integer
Return value

Returns the number of bytes needed for a video frame. If the video could not be started, an error is thrown.

Description

Start acquisition of a video stream.

Start acquisition of current video stream. If "width" and "height" are specified and greater than zero, stretch the video to that size. Otherwise the video is played in it's original size.

See also: Open Stop

Stop [::mawt::Video]

Video, Top

Stop acquisition of a video stream.

OBJECT Stop

Description

Stop acquisition of a video stream.

See also: Start Open Close

Unlock [::mawt::Video]

Video, Top

Unlock a video stream.

OBJECT Unlock

Description

Unlock a video stream.

See also: Open Lock

WriteNextImage [::mawt::Video]

Video, Top

Get next image from a video stream.

OBJECT WriteNextImage img flip

Parameters
img A Vector containing the image data.
flip Boolean value to specify image flipping.
Description

Get next image from a video stream.

Get the next image from current video stream. The image will be stored in variable "img". "img" must point to a buffer of appropriate size. If "flip" is set to 1, the image is returned in bottom-up scanline order as needed by OpenGL. If "flip" is set to 0, the image is returned in top-down scanline order as needed by the img::raw extension.

Throws an error, if the image could not be written to the video stream.

See also: Create Close GetImage GetWidth GetHeight

Document generated by Ruff!