Skip to content

MovieLength

Narta Xaymar Dirks edited this page Oct 28, 2026 · 5 revisions
BlitzLLVM

MovieLength 〔BlitzLLVM〕

MovieLength:Float32 movie:Int32
Parameter Mode Type Default Description
movie In Int32 required A movie handle from OpenMovie.

Returns: The length in seconds, or 0 if the movie is not open or its file does not say.

Description

〔BlitzLLVM〕 This command does not exist in the original Blitz products. BlitzLLVM adds it.

Gives how long a movie is, in seconds. The length is what the file says; some formats (MPEG programs) only estimate it from their bit rate, and once the movie has been decoded to its end the time of its last picture is used if that is longer. This is a BlitzLLVM extension: the originals do not tell how long a movie is.

Differences

  • A debug build (-d) stops the program when the movie does not exist, for example the 0 of a movie that failed to open, other builds ignore the command, see Debug handle checks.

Examples

movie = OpenMovie("intro.mpg")
Print "The intro takes " + MovieLength(movie) + " seconds."

Related Commands

CloseMovie, DrawMovie, GetMovieTexture 〔BlitzLLVM〕, MovieHeight, MoviePlaying, MoviePosition 〔BlitzLLVM〕, MovieVolume 〔BlitzLLVM〕, MovieWidth

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally