dist:
git archive --format=tar --prefix=mlt-$(version)/ v$(version) | gzip >mlt-$(version).tar.gz
+
+validate-yml:
+ for file in `find ./ -type f -name \*.yml`; do \
+ echo "validate: $$file"; \
+ kwalify -f src/framework/metaschema.yaml $$file; \
+ done
This option allows other services to encapsulate the avformat consumer and
do something different (not already available in a protocol) with its
output by listening to the avformat-write event.
- type; integer
+ type: integer
minimum: 0
maximum: 1
default: 0
maximum: 1
widget: checkbox
- - identifer: force_colorspace
+ - identifier: force_colorspace
title: Force colorspace
description: When provided, this overrides the detected colorspace of the video (Y'CbCr only).
type: integer
static mlt_properties metadata( mlt_service_type type, const char *id, void *data )
{
char file[ PATH_MAX ];
- const char *service_type = NULL;
- switch ( type )
- {
- case filter_type:
- service_type = "filter";
- break;
- case producer_type:
- service_type = "producer";
- break;
- case transition_type:
- service_type = "transition";
- break;
- default:
- return NULL;
- }
- if ( !strcmp( id, "grayscale" ) )
- id = "greyscale";
- else if ( !strcmp( id, "color" ) )
- id = "colour";
- else if ( !strcmp( id, "channelswap" ) )
- id = "channelcopy";
- snprintf( file, PATH_MAX, "%s/core/%s_%s.yml", mlt_environment( "MLT_DATA" ), service_type, id );
+ snprintf( file, PATH_MAX, "%s/core/%s", mlt_environment( "MLT_DATA" ), (char*) data );
return mlt_properties_parse_yaml( file );
}
MLT_REGISTER( transition_type, "mix", transition_mix_init );
MLT_REGISTER( transition_type, "region", transition_region_init );
- MLT_REGISTER_METADATA( filter_type, "audiowave", metadata, NULL );
- MLT_REGISTER_METADATA( filter_type, "brightness", metadata, NULL );
- MLT_REGISTER_METADATA( filter_type, "channelcopy", metadata, NULL );
- MLT_REGISTER_METADATA( filter_type, "channelswap", metadata, NULL );
- MLT_REGISTER_METADATA( filter_type, "crop", metadata, NULL );
- MLT_REGISTER_METADATA( filter_type, "data_show", metadata, NULL );
- MLT_REGISTER_METADATA( filter_type, "gamma", metadata, NULL );
- MLT_REGISTER_METADATA( filter_type, "greyscale", metadata, NULL );
- MLT_REGISTER_METADATA( filter_type, "grayscale", metadata, NULL );
- MLT_REGISTER_METADATA( filter_type, "luma", metadata, NULL );
- MLT_REGISTER_METADATA( filter_type, "mirror", metadata, NULL );
- MLT_REGISTER_METADATA( filter_type, "mono", metadata, NULL );
- MLT_REGISTER_METADATA( filter_type, "obscure", metadata, NULL );
- MLT_REGISTER_METADATA( filter_type, "region", metadata, NULL );
- MLT_REGISTER_METADATA( filter_type, "transition", metadata, NULL );
- MLT_REGISTER_METADATA( filter_type, "watermark", metadata, NULL );
- MLT_REGISTER_METADATA( producer_type, "colour", metadata, NULL );
- MLT_REGISTER_METADATA( producer_type, "color", metadata, NULL );
- MLT_REGISTER_METADATA( producer_type, "consumer", metadata, NULL );
- MLT_REGISTER_METADATA( producer_type, "hold", metadata, NULL );
- MLT_REGISTER_METADATA( producer_type, "noise", metadata, NULL );
- MLT_REGISTER_METADATA( transition_type, "composite", metadata, NULL );
- MLT_REGISTER_METADATA( transition_type, "luma", metadata, NULL );
- MLT_REGISTER_METADATA( transition_type, "mix", metadata, NULL );
- MLT_REGISTER_METADATA( transition_type, "region", metadata, NULL );
+ MLT_REGISTER_METADATA( filter_type, "audiowave", metadata, "filter_audiowave.yml" );
+ MLT_REGISTER_METADATA( filter_type, "brightness", metadata, "filter_brightness.yml" );
+ MLT_REGISTER_METADATA( filter_type, "channelcopy", metadata, "filter_channelcopy.yml" );
+ MLT_REGISTER_METADATA( filter_type, "channelswap", metadata, "filter_channelcopy.yml" );
+ MLT_REGISTER_METADATA( filter_type, "crop", metadata, "filter_crop.yml" );
+ MLT_REGISTER_METADATA( filter_type, "data_show", metadata, "filter_data_show.yml" );
+ MLT_REGISTER_METADATA( filter_type, "gamma", metadata, "filter_gamma.yml" );
+ MLT_REGISTER_METADATA( filter_type, "greyscale", metadata, "filter_greyscale.yml" );
+ MLT_REGISTER_METADATA( filter_type, "grayscale", metadata, "filter_greyscale.yml" );
+ MLT_REGISTER_METADATA( filter_type, "luma", metadata, "filter_luma.yml" );
+ MLT_REGISTER_METADATA( filter_type, "mirror", metadata, "filter_mirror.yml" );
+ MLT_REGISTER_METADATA( filter_type, "mono", metadata, "filter_mono.yml" );
+ MLT_REGISTER_METADATA( filter_type, "obscure", metadata, "filter_obscure.yml" );
+ MLT_REGISTER_METADATA( filter_type, "region", metadata, "filter_region.yml" );
+ MLT_REGISTER_METADATA( filter_type, "rescale", metadata, "filter_rescale.yml" );
+ MLT_REGISTER_METADATA( filter_type, "resize", metadata, "filter_resize.yml" );
+ MLT_REGISTER_METADATA( filter_type, "transition", metadata, "filter_transition.yml" );
+ MLT_REGISTER_METADATA( filter_type, "watermark", metadata, "filter_watermark.yml" );
+ MLT_REGISTER_METADATA( producer_type, "colour", metadata, "producer_colour.yml" );
+ MLT_REGISTER_METADATA( producer_type, "color", metadata, "producer_colour.yml" );
+ MLT_REGISTER_METADATA( producer_type, "consumer", metadata, "producer_consumer.yml" );
+ MLT_REGISTER_METADATA( producer_type, "loader", metadata, "producer_loader.yml" );
+ MLT_REGISTER_METADATA( producer_type, "hold", metadata, "producer_hold.yml" );
+ MLT_REGISTER_METADATA( producer_type, "noise", metadata, "producer_noise.yml" );
+ MLT_REGISTER_METADATA( transition_type, "composite", metadata, "transition_composite.yml" );
+ MLT_REGISTER_METADATA( transition_type, "luma", metadata, "transition_luma.yml" );
+ MLT_REGISTER_METADATA( transition_type, "mix", metadata, "transition_mix.yml" );
+ MLT_REGISTER_METADATA( transition_type, "region", metadata, "transition_region.yml" );
}
creator: Dan Dennedy
license: LGPLv2.1
language: en
-description: Copy one audio channel to another.
tags:
- Audio
+description: Copy one audio channel to another.
parameters:
- identifier: argument
title: To
minimum: 0
maximum: 15
default: 1
- - identifer: from
+ - identifier: from
title: From
type: integer
minimum: 0
parameters:
- identifier: argument
title: Gamma
- type: double
+ type: float
description: The exponential factor of the power-law curve
default: 1.0
- identifier: gamma
title: Gamma
- type: double
+ type: float
description: See "argument"
mutable: yes
default: 1.0
results set this to a multiple of ttl used in pixbuf.
mutable: yes
default: 25
- - identifer: duration
+ - identifier: duration
title: Duration
type: integer
description: The length of the transition.
description: >
Apply one or more filters to a region of the video image. The region can be
shaped as well using the alpha channel of another producer.
-bugs: "circle" is unpredictable in the absence of the librsvg pixbuf loader.
+bugs:
+ - Circle is unpredictable in the absence of the librsvg pixbuf loader.
parameters:
- identifier: argument
title: File
- identifier: region.*
title: Region
description: >
- Properties may be set on the encapsulated region transition.See "region"
+ Properties may be set on the encapsulated region transition. See "region"
transition for details.
--- /dev/null
+schema_version: 0.1
+type: filter
+identifier: rescale
+title: Rescale
+version: 1
+copyright: Ushodaya Enterprises Limited
+creator: Dan Dennedy <dan@dennedy.org>
+license: LGPLv2.1
+language: en
+tags:
+ - Video
+ - Hidden
+description: >
+ Scale the producer video frame size to match the consumer. This filter is
+ designed for use as a normaliser for the loader producer.
+notes: >
+ If a property "consumer_aspect_ratio" exists on the frame, then rescaler
+ normalises the producer's aspect ratio and maximises the size of the frame,
+ but may not produce the consumer's requested dimension. Therefore, this
+ option works best in conjunction with the resize filter. This behavior can be
+ disabled by another service by either removing the property, setting it to
+ zero, or setting frame property "distort" to 1.
+bugs:
+ - >
+ It only implements a nearest neighbour scaling - it is used as the base
+ class for the gtkrescale and mcrescale filters.
--- /dev/null
+schema_version: 0.1
+type: filter
+identifier: resize
+title: Resize
+version: 1
+copyright: Ushodaya Enterprises Limited
+creator: Charles Yates <charles.yates@pandora.be>
+license: LGPLv2.1
+language: en
+tags:
+ - Video
+ - Hidden
+description: >
+ Image scaling and padding and field order adjustment.
+notes: >
+ Normally resize is used to pad the producer's output to what the consumer has
+ requested after an upstream rescale filter first scales the image to maximise
+ usage of the image area. This filter also adjusts the field order to lower
+ field first if the frame property "top_field_first" has been set to 1.
+ Therefore, when done, it sets the top_field_first to 0. This filter is
+ automatically invoked by the loader as part of image sample aspect ratio
+ normalisation.
+bugs:
+ - Assumes lower field first output.
+parameters:
+ - identifier: argument
+ title: Scale
+ type: string
+ description: The scaling method.
+ values:
+ - affine
+ required: no
+ readonly: no
--- /dev/null
+schema_version: 0.1
+type: producer
+identifier: loader
+title: Loader
+version: 1
+copyright: Ushodaya Enterprises Limited
+creator: Charles Yates
+license: LGPLv2.1
+language: en
+tags:
+ - Audio
+ - Video
+ - Hidden
+description: >
+ This producer has two roles:
+
+ 1. it handles the mappings of all file names to the other producers;
+
+ 2. it attaches normalising filters (rescale, resize and resample) to the
+ producers (when necessary).
+
+ This producer simplifies many aspects of use. Essentially, it ensures that a
+ consumer will receive images and audio precisely as they request them.
+parameters:
+ - identifier: argument
+ title: File/URL
+ type: string
+ description: The file for the producer to be based on.
+ required: no
+ readonly: no
+ default: unset
+ widget: fileopen
\ No newline at end of file
language: en
tags:
- Video
+description: >
+ A key-framable alpha-channel compositor for two frames.
+notes: >
+ Performs dissolves and luma wipes in addition to alpha compositing.
+
+ By default, the aspect ratio of the B frame is respected and the size
+ portion of the geometry specification simply defines a bounding rectangle.
+
+ This performs field-based rendering unless the A frame property
+ "progressive" or "consumer_progressive" or the transition property
+ "progressive" is set to 1.
+bugs:
+ - Assumes lower field first during field rendering.
+parameters:
+ - identifier: factory
+ title: Factory
+ type: string
+ description: >
+ The name of a factory service used as a non-PGM producer loader.
+ default: loader
+ - identifier: geometry
+ title: Geometry
+ type: geometry
+ description: >
+ Key frame specification. This is a ";" delimited form of the deprecated
+ start, key[n], end properties.
+ mutable: yes
+ - identifier: progressive
+ title: Progressive
+ description: >
+ Enable or disable field-based rendering.
+ type: integer
+ minimum: 0
+ maximum: 1
+ mutable: yes
+ widget: checkbox
+ - identifier: distort
+ title: Allow distorted scaling
+ description: >
+ When set, causes the B frame image to fill the WxH completely with no
+ regard to B's aspect ratio.
+ type: integer
+ default: 0
+ minimum: 0
+ maximum: 1
+ mutable: yes
+ widget: checkbox
+ - identifier: halign
+ title: Horizontal alignment
+ description: >
+ When not distorting, set the horizontal alignment of B within the
+ geometry rectangle.
+ type: string
+ default: left
+ values:
+ - left
+ - centre
+ - right
+ mutable: yes
+ widget: combo
+ - identifier: valign
+ title: Vertical alignment
+ description: >
+ When not distorting, set the vertical alignment of B within the
+ geometry rectangle.
+ type: string
+ default: top
+ values:
+ - top
+ - middle
+ - bottom
+ mutable: yes
+ widget: combo
+ - identifier: luma
+ title: Luma map
+ description: >
+ The luma map file name. If not supplied, a dissolve.
+ type: string
+ default: unset
+ mutable: yes
+ widget: fileopen
+ - identifier: softness
+ title: Softness
+ description: >
+ Only when using a luma map, how soft to make the edges between A and B.
+ type: float
+ default: 0.0
+ minimum: 0.0
+ maximum: 1.0
+ mutable: yes
+ - identifier: luma.*
+ title: Luma producer
+ description: >
+ Properties may be set on the encapsulated producer. Any property starting
+ with "luma." is passed to the non-PGM luma producer.
+ readonly: no
+ mutable: yes
+ - identifier: start
+ title: Start geometry
+ description: >
+ A geometry specification as X/Y:WxH[!][:mix]
+
+ X, Y, W, H are assumed to pixel units unless they have the suffix '%'.
+
+ '!' is a shortcut to specify distort.
+
+ Mix is always a 2 digit percentage, defaults to 100.
+ type: geometry
+ default: "85%/5%:10%x10%"
+ readonly: no
+ mutable: yes
+ - identifier: end
+ title: End geometry
+ description: >
+ X/Y:WxH[:mix] - The end geometry specification (see "start").
+ type: geometry
+ readonly: no
+ mutable: yes
+ - identifier: key[F]
+ title: Key frame geometry
+ description: >
+ X/Y:WxH[:mix] - set a key frame for geometry between the in and out. F is
+ a frame number and can be negative to make it relative to the out point.
+ type: geometry
+ readonly: no
+ mutable: yes
0.0 = no softness. 1.0 = too soft.
- identifier: reverse
title: Reverse
- type: int
+ type: integer
mutable: yes
description: >
Reverse the direction of the transition.
description: One of "best," "fast" or anything else chooses medium.
readonly: no
mutable: yes
- widget: combobox
+ widget: combo
default: best
MLT_REGISTER( producer_type, "pixbuf", create_service );
MLT_REGISTER_METADATA( consumer_type, "gtk2_preview", metadata, "consumer_gtk2_preview.yml" );
+ MLT_REGISTER_METADATA( filter_type, "gtkrescale", metadata, "filter_rescale.yml" );
MLT_REGISTER_METADATA( producer_type, "pango", metadata, "producer_pango.yml" );
MLT_REGISTER_METADATA( producer_type, "pixbuf", metadata, "producer_pixbuf.yml" );
}
--- /dev/null
+schema_version: 0.1
+type: filter
+identifier: gtkrescale
+title: Gtk Rescale
+version: 1
+copyright: Ushodaya Enterprises Limited
+creator: Dan Dennedy <dan@dennedy.org>
+license: LGPLv2.1
+language: en
+tags:
+ - Video
+ - Hidden
+description: >
+ Scale the producer video frame size to match the consumer. This filter is
+ designed for use as a normaliser for the loader producer.
+notes: >
+ If a property "consumer_aspect_ratio" exists on the frame, then rescaler
+ normalises the producer's aspect ratio and maximises the size of the frame,
+ but may not produce the consumer's requested dimension. Therefore, this
+ option works best in conjunction with the resize filter. This behavior can be
+ disabled by another service by either removing the property, setting it to
+ zero, or setting frame property "distort" to 1.
+parameters:
+ - identifier: argument
+ title: Interpolation
+ type: string
+ description: The rescaling method.
+ values:
+ - nearest (lowest quality, fastest)
+ - tiles
+ - bilinear (good quality, moderate speed)
+ - hyper (best quality, slowest)
+ required: no
+ readonly: no
+ default: bilinear
+ widget: combo
left, centre, right (also, numbers 0, 1 and 2 can be used respectively)
readonly: no
mutable: yes
- widget: combobox
+ widget: combo
- identifier: pad
title: Padding
- identifier: font
title: Font
type: string
- description: The default typeface to use when not using markup.
- default: "Sans 48". FreeType2 renders at 72 dpi.
+ description: >
+ The default typeface to use when not using markup.
+ FreeType2 renders at 72 dpi.
+ default: Sans 48
readonly: no
mutable: yes
- widget: combobox
+ widget: combo
- identifier: weight
title: Font weight
default: UTF-8
readonly: no
mutable: yes
- widget: combobox
+ widget: combo
- identifier: real_width
title: Real width
schema_version: 0.1
type: filter
-identifier:boxblur
+identifier: boxblur
title: Box Blur
version: 1
copyright: Leny Grisel, Jean-Baptiste Mardelle
install: all
install -m 755 $(TARGET) "$(DESTDIR)$(libdir)/mlt"
+ install -d "$(DESTDIR)$(datadir)/mlt/resample"
+ install -m 644 *.yml "$(DESTDIR)$(datadir)/mlt/resample"
ifneq ($(wildcard .depend),)
include .depend
*/
#include <string.h>
+#include <limits.h>
#include <framework/mlt.h>
extern mlt_filter filter_resample_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg );
+static mlt_properties metadata( mlt_service_type type, const char *id, void *data )
+{
+ char file[ PATH_MAX ];
+ snprintf( file, PATH_MAX, "%s/resample/%s", mlt_environment( "MLT_DATA" ), (char*) data );
+ return mlt_properties_parse_yaml( file );
+}
+
MLT_REPOSITORY
{
MLT_REGISTER( filter_type, "resample", filter_resample_init );
+
+ MLT_REGISTER_METADATA( filter_type, "resample", metadata, "filter_resample.yml" );
}
--- /dev/null
+schema_version: 0.1
+type: filter
+identifier: resample
+title: Resample
+version: 1
+copyright: Ushodaya Enterprises Limited
+creator: Dan Dennedy <dan@dennedy.org>
+license: LGPLv2.1
+language: en
+tags:
+ - Audio
+ - Hidden
+description: >
+ Adjust an audio stream's sampling rate, and duplicate channels if producer
+ provides less than consumer requested.
+
+ This filter is automatically invoked by the loader producer for the sake of
+ normalisation over inputs and with the consumer.
+bugs:
+ - >
+ Assumes 2 channels during libsamplerate initialisation. Untested with >2
+ channels.
+parameters:
+ - identifier: argument
+ title: Frequency
+ type: integer
+ description: The target sample rate.
+ required: no
+ readonly: no