Constructor
# new MPEG1(filename, audioopt)
load MPEG1 for video/audio playback. Videos can be converted using ffmpeg, e.g. for converting to MPEG1 with 320 width: "ffmpeg -i infile -filter:v scale=320:-1 -c:v mpeg1video -c:a mp2 -format mpeg outfile"
Note: MPEG1 module must be loaded by calling LoadLibrary("mpeg1") before using!
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
filename |
string | file name of the soundfile to load. |
|
audio |
bool |
<optional> |
enable audioo playback with true, disable with false (default: false). |
- See:
-
- LoadLibrary()
Members
Methods
# Play(x, y)
must be called periodically (e.g. every Loop()) to render audio/video.
Parameters:
Name | Type | Description |
---|---|---|
x |
number | x position of the upper left corner of the video |
y |
number | y position of the upper left corner of the video |
# Seek(tidx)
seek to given time index.
Parameters:
Name | Type | Description |
---|---|---|
tidx |
number | the index in seconds |