|(require video/core)||package: video|
The structs given to the render function are found here. Examples are found in private/examples.rkt.
mlt-object contains the compiled mlt-object, or #f if it has not yet been compiled. This bit of the library is particularly unstable, and may change if it stops using MLT as a backend.
(struct link video (source target index))
source : video? target : video? index : exact-nonnegative-integer?
As such, this is only required if you plan to use convert-to-mlt! directly.
source contains the producer that is linked together.
target contains the consumer that receives the produced video.
prop contains the actual properties table.
(properties-ref dict key default-type) → any/c
dict : properties? key : string? default-type : (or/c 'string 'int 'int64 'mlt-position 'double)
dict is the video object to search.
The key identifies which property to search for.
default-type indicates the assumed type used when requesting the object from MLT. This is required because MLT does not store this information and internally represents everything as a string.
value is the actual property.
position and length are extra field when setting the anim property.
(struct frame properties ())
Producers actually create videos. A producer can be anything from a picture, to a video file, to text.
Consumers consume the content from a producer (or filter), and stream it to a source that accepts videos. An example consumer can output the video to a file.
A transition combines two videos together, such as to fade two clips. These are generally used inside of playlists.
Filters modify an aspect of the video, such as to make the video grayscale.
A service can additionally have filters attached to it, stored in filters.
Filters can be attached to services directly in the filters field for that service.
Filters can be linked in between a producer and a consumer.
Filters can be added to a field that is associated with a multitrack.
Many filters apply to only one producer. For example, the grayscale filter turns a producer to grayscale.
Other filters, however, become relevant only when multiple tracks are used in a tractor. For example, a filter can be used to shrink a video and overlay it on top of another one.
type stores the type of filter. This presumes that the needed plugin is installed for MLT. #f is the default type, which is generally 'loader.
source is the source for the filter. This can be used to set some default properties that MLT uses when setting default values.
type indicates the type of the transition.
source indicates the source for the transition if the type requires it. This generally remains #f.
type stores what the consumer outputs. Some common types used are:
Used for outputting videos using FFMPEG.
Used for previewing videos an SDL window.
Used for producing an XML file that the melt command line tool can process.
The target field indicates the file to create, or a different parameter that the specific plugin uses. It is frequently #f for the default consumer.
(struct producer service (type source start end speed seek))
type : (or/c symbol? #f) source : (or/c string? #f) start : exact-nonnegative-integer? end : exact-nonnegative-integer? speed : number? seek : exact-nonnegative-integer?
Yes, yes, I know, this is really kludgy. It is currently this way to deal with MLT bugs.
The start and end of the producer is given, or is the length of the producer when it is #f. Note that some producers, such as still images, do not have a natural start or end, and will fill up as much time as needed.
The speed of the producer sets the speed the producer feeds frames into its consumer. A speed of 1 is regular playing speed. 0 is paused and will continuously output the same frame. Values greater than 1 play faster than the producers speed, and values less than 0 rewind the producer. Finally, values between 0 and 1 play at a slower than normal rate.
seek can be combined with speed to alter the way the video is played. seek determines the point where the producer begins to play. Normally this is the same position as start, but could be set to the middle of the clip and speed set to a negative value, to simulate a rewinding clip.
Transitions can also be put in a playlist and are used to combine two clips, such as to fade from one video to another. A transition shortens its two surrounding clips and producers a new clip for the transition. Note that a playlist with transitions in it will be shortened by the length of the transition.
elements is the list of producers and transitions in the video.
(struct playlist-producer video (producer start end))
producer : producer? start : exact-nonnegative-integer? end : exact-nonnegative-integer?
tracks : (listof producer) field : (listof field-element?)