From a347d3ae3d18f5a328225bf1ac284581b2948da8 Mon Sep 17 00:00:00 2001 From: Dan Dennedy Date: Thu, 7 Jul 2011 21:36:53 -0700 Subject: [PATCH] Convert services.txt to metadata YAML (WIP). Patch by Brian Matherly. --- src/modules/core/filter_data_show.yml | 47 +++++++ src/modules/core/filter_gamma.yml | 13 ++ src/modules/core/filter_greyscale.yml | 1 + src/modules/core/filter_luma.yml | 22 ++++ src/modules/core/filter_watermark.yml | 66 ++++++++++ src/modules/core/producer_colour.yml | 15 +++ src/modules/core/producer_noise.yml | 39 ++++++ src/modules/dv/producer_libdv.yml | 56 +++++++++ src/modules/gtk2/producer_pango.yml | 163 +++++++++++++++++++++++++ src/modules/gtk2/producer_pixbuf.yml | 99 +++++++++++++++ src/modules/vorbis/producer_vorbis.yml | 42 +++++++ src/modules/xml/producer_xml.yml | 27 ++++ 12 files changed, 590 insertions(+) diff --git a/src/modules/core/filter_data_show.yml b/src/modules/core/filter_data_show.yml index b15678d3..e289b3d8 100644 --- a/src/modules/core/filter_data_show.yml +++ b/src/modules/core/filter_data_show.yml @@ -9,3 +9,50 @@ license: LGPLv2.1 language: en tags: - Video +description: Show data based on properties of the producer. +notes: | + The data show filter uses data provided by the data feed filter. + The producer properties must supply: > + * The keyword text to be inserted in the form of: + meta.attr.[keyword].markup=[text to insert] + + * The name of the properties to be used from the feed file in the form of: + meta.attr.[name]=1 + + * The text to be displayed in the form of: + meta.attr.[name].markup=[some text #keyword#] + (Keyword text is enclosed between #s.) + + e.g. + melt file.dv meta.attr.sometext.markup="this is some text" meta.attr.titles=1 meta.attr.titles.markup=#sometext# -filter data_show dynamic=1 + > + Two special keywords exist + * #timecode# shows the frame position as a timecode. + * #frame# shows the frame position as an integer. + e.g. + melt file.dv meta.attr.timecode=1 meta.attr.timecode.markup=#timecode# -attach data_feed:attr_check -attach data_show:custom_file.properties dynamic=1 + (where the file "custom_file" contains a filter definition by the name of "timecode") +parameters: + - identifier: argument + title: Feed Properties File + type: string + required: no + readonly: no + default: data_fx.properties + widget: fileopen + + - identifier: resource + title: Feed Properties File + type: string + required: no + readonly: yes + default: data_fx.properties + widget: fileopen + + - identifier: dynamic + title: Dynamic + type: integer + default: 0 + minimum: 0 + maximum: 1 + widget: checkbox diff --git a/src/modules/core/filter_gamma.yml b/src/modules/core/filter_gamma.yml index 963dde96..d3b0e0b3 100644 --- a/src/modules/core/filter_gamma.yml +++ b/src/modules/core/filter_gamma.yml @@ -9,3 +9,16 @@ license: LGPLv2.1 language: en tags: - Video +description: Adjust image luma using a non-linear power-law curve. +parameters: + - identifier: argument + title: Gamma + type: double + description: The exponential factor of the power-law curve + default: 1.0 + - identifier: gamma + title: Gamma + type: double + description: See "argument" + mutable: yes + default: 1.0 diff --git a/src/modules/core/filter_greyscale.yml b/src/modules/core/filter_greyscale.yml index ff312849..86e146fd 100644 --- a/src/modules/core/filter_greyscale.yml +++ b/src/modules/core/filter_greyscale.yml @@ -9,3 +9,4 @@ license: LGPLv2.1 language: en tags: - Video +description: Convert colour image to greyscale \ No newline at end of file diff --git a/src/modules/core/filter_luma.yml b/src/modules/core/filter_luma.yml index 2f371059..49df1914 100644 --- a/src/modules/core/filter_luma.yml +++ b/src/modules/core/filter_luma.yml @@ -9,3 +9,25 @@ license: LGPLv2.1 language: en tags: - Video +description: | + Applies a luma transition between the current and next frames. Useful for + transitions from a slideshow created using producer pixbuf. +parameters: + - identifier: argument + title: File + type: string + description: The luma map file to be used for the transition + - identifier: period + title: Period + type: integer + description: > + How long to wait between success iterations of the transition. For best + results set this to a multiple of ttl used in pixbuf. + mutable: yes + default: 24 + - identifier: luma.* + title: Luma Properties + description: > + All properties beginning with "luma." are passed to the encapsulated luma + transition. For example, luma.out controls the duration of the wipe. + mutable: yes diff --git a/src/modules/core/filter_watermark.yml b/src/modules/core/filter_watermark.yml index 8b963dd1..0da36d16 100644 --- a/src/modules/core/filter_watermark.yml +++ b/src/modules/core/filter_watermark.yml @@ -9,3 +9,69 @@ license: LGPLv2.1 language: en tags: - Video +description: Overlay text or images onto the video +notes: | + The watermark filter combines a frame producer and a composite transition to + overlay the specified text or image onto the video. + + Supplying a filename with extension ".txt" causes the loader to load a pango + producer. Supplying a file name with an extension supported by gtk-pixbuf + causes the loader to load a pixbuf producer. See the pango and pixbuf + producers for details. + + Note: If the filename begins with "+" the pango producer interprets the + filename as pango text. + + Text Example: + melt colour:red -filter watermark:"+First Line~Second Line.txt" composite.progressive=1 producer.align=centre composite.valign=c composite.halign=c + + Image Example: + melt clip.dv -filter watermark:logo.png + +parameters: + - identifier: argument + title: File or Text + type: string + description: A pango or pixbuf producer file name. + required: no + readonly: no + default: unset + widget: fileopen + + - identifier: resource + title: File or Text + type: string + description: see argument + required: no + readonly: no + default: unset + widget: fileopen or text + + - identifier: distort + title: Allow distorted scaling + type: integer + default: 0 + minimum: 0 + maximum: 1 + widget: checkbox + + - identifier: producer + title: Pango or Pixbuf producer + type: producer + description: | + A pango or pixbuf producer (as appropriate for the file name). + Properties may be set on the producer to control its behavior. + e.g.: producer.align=centre + See "pango" and "pixbuf" producers for details. + readonly: no + + - identifier: composite + title: Composite Transition + type: transition + description: | + The transition that combines the images from the pango or pixbuf producer + with the images from the track. + Properties may be set on the composite to control its behavior. + e.g.: composite.valign=c + See "composite" transition for details. + readonly: no diff --git a/src/modules/core/producer_colour.yml b/src/modules/core/producer_colour.yml index 0a34349f..5c2ead9d 100644 --- a/src/modules/core/producer_colour.yml +++ b/src/modules/core/producer_colour.yml @@ -9,3 +9,18 @@ license: LGPLv2.1 language: en tags: - Video +description: A simple color generator. +parameters: + - identifier: argument + title: Color value + description: | + A color value is a hexadecimal representation of RGB plus alpha channel + as 0xrrggbbaa. Colors can also be the words: white, black, red, green, + or blue. + type: string + required: no + readonly: no + default: black + widget: textbox + + diff --git a/src/modules/core/producer_noise.yml b/src/modules/core/producer_noise.yml index 9cbb86a5..1e848961 100644 --- a/src/modules/core/producer_noise.yml +++ b/src/modules/core/producer_noise.yml @@ -10,3 +10,42 @@ language: en tags: - Audio - Video +description: White noise producer +parameters: + - identifier: in + title: In point + type: time + description: Set the start time offset to use within the clip + readonly: no + mutable: no + minimum: 0 + default: 0 + widget: timecode + + - identifier: out + title: Out point + type: time + description: Set the ending time offset to use within the clip + readonly: no + minimum: 0 + mutable: no + widget: timecode + + - identifier: fps + title: Frame Rate + type: double + description: The output frame rate of the producer + readonly: yes + + - identifier: aspect_ratio + title: Aspect Ratio + type: double + description: The sample aspect ratio of the producer + readonly: yes + + - identifier: length + title: Length + type: time + description: The duration of the file (in frames) + readonly: yes + widget: timecode diff --git a/src/modules/dv/producer_libdv.yml b/src/modules/dv/producer_libdv.yml index 2b508830..416a71cc 100644 --- a/src/modules/dv/producer_libdv.yml +++ b/src/modules/dv/producer_libdv.yml @@ -10,3 +10,59 @@ language: en tags: - Audio - Video +description: A libdv based decoder for video and audio. +parameters: + - identifier: argument + title: Filename + description: The name of a .dv file. + type: string + required: yes + readonly: no + default: + widget: fileopen + + - identifier: in + title: In point + type: time + description: Set the start time offset to use within the clip + readonly: no + mutable: no + minimum: 0 + default: 0 + widget: timecode + + - identifier: out + title: Out point + type: time + description: Set the ending time offset to use within the clip + readonly: no + minimum: 0 + mutable: no + widget: timecode + + - identifier: resource + title: Resource + type: string + description: The location of the file + readonly: yes + + - identifier: fps + title: Frame Rate + type: double + description: The output frame rate of the producer + readonly: yes + + - identifier: length + title: Length + type: time + description: The duration of the file (in frames) + readonly: yes + widget: timecode + + - identifier: quality + title: Quality + type: string + description: One of "best," "fast" or anything else chooses medium. + readonly: no + mutable: yes + widget: combobox diff --git a/src/modules/gtk2/producer_pango.yml b/src/modules/gtk2/producer_pango.yml index e90d0a5a..cd03f8d0 100644 --- a/src/modules/gtk2/producer_pango.yml +++ b/src/modules/gtk2/producer_pango.yml @@ -9,3 +9,166 @@ license: LGPLv2.1 language: en tags: - Video +description: | + A title generator that uses the Pango international text layout and Freetype2 + font renderer. +notes: | + Supplying a filename with extension ".txt" causes the loader producer to load + with pango. If the filename begins with "+" the pango producer interprets the + filename as pango text. This is a shortcut to embed titles in melt commands. + For MLT XML, it is recommended that you embed the title text in the property + value. + + Pango has builtin scaling. It will rescale the originally rendered title to + whatever the consumer requests. Therefore, it will lose its aspect ratio if + so requested, and it is up to the consumer to request a proper width and + height that maintains the image aspect. + +parameters: + - identifier: argument + title: File + type: string + description: | + A text file containing Pango markup, see: + http://developer.gnome.org/doc/API/2.0/pango/PangoMarkupFormat.html + requires xml-like encoding special chars from: + <, >, & -to- <, >, & + readonly: no + required: yes + mutable: no + widget: fileopen # could provide a button to use a file-open dialog + + - identifier: in + title: In point + type: time + description: Set the start time offset to use within the clip + readonly: no + mutable: no + minimum: 0 + default: 0 + widget: timecode + + - identifier: out + title: Out point + type: time + description: Set the ending time offset to use within the clip + readonly: no + minimum: 0 + mutable: no + widget: timecode + + - identifier: markup + title: Markup + type: string + description: | + A string containing Pango markup see: + http://developer.gnome.org/doc/API/2.0/pango/PangoMarkupFormat.html + requires xml-like encoding special chars from: + <, >, & -to- <, >, & + readonly: no + mutable: yes + widget: textbox + + - identifier: fgcolour + title: Foreground Colour + type: string + description: an RGBA colour specification of the text (i.e. 0xrrggbbaa) + readonly: no + mutable: yes + widget: colorpicker + + - identifier: bgcolour + title: Background Colour + type: string + description: an RGBA colour of the background rectangle (i.e. 0xrrggbbaa) + readonly: no + mutable: yes + widget: colorpicker + + - identifier: align + title: Paragraph Alignment + type: string + description: | + left, centre, right (also, numbers 0, 1 and 2 can be used respectively) + readonly: no + mutable: yes + widget: combobox + + - identifier: pad + title: Padding + type: integer + description: | + The number of pixels to pad the background rectangle beyond edges of text. + readonly: no + default: 0 + mutable: yes + widget: spinner + + - identifier: text + title: Text + type: string + description: | + A non-markup string in UTF-8 encoding + (can contain markup chars un-encoded) + readonly: no + mutable: yes + widget: textbox + + - identifier: font + title: Font + type: string + description: The default typeface to use when not using markup. + default: "Sans 48". FreeType2 renders at 72 dpi. + readonly: no + mutable: yes + widget: combobox + + - identifier: weight + title: Font Weight + type: integer + description: The weight of the font. + default: 400 + readonly: no + mutable: yes + widget: spinner + + - identifier: encoding + title: Encoding + type: string + description: | + The text encoding type of the input if not UTF-8. + See 'iconv --list' for a list of possible inputs. + default: UTF-8 + readonly: no + mutable: yes + widget: combobox + + - identifier: resource + title: Resource + type: string + description: The text/markup file or "pango" if no file. + readonly: yes + + - identifier: real_width + title: Real Width + type: integer + description: The original, unscaled width of the rendered title. + readonly: yes + + - identifier: real_height + title: Real Height + type: integer + description: The original, unscaled height of the rendered title. + readonly: yes + + - identifier: width + title: Width + type: integer + description: The last requested scaled image width. + readonly: yes + + - identifier: height + title: Height + type: integer + description: The last requested scaled image height. + readonly: yes \ No newline at end of file diff --git a/src/modules/gtk2/producer_pixbuf.yml b/src/modules/gtk2/producer_pixbuf.yml index 14fc62ee..4156e745 100644 --- a/src/modules/gtk2/producer_pixbuf.yml +++ b/src/modules/gtk2/producer_pixbuf.yml @@ -9,3 +9,102 @@ license: LGPLv2.1 language: en tags: - Video +description: | + A still graphics to video generator using gdk-pixbuf +notes: | + Pixbuf has builtin scaling. It will rescale the originally rendered title to + whatever the consumer requests. Therefore, it will lose its aspect ratio if + so requested, and it is up to the consumer to request a proper width and + height that maintains the image aspect. + +parameters: + - identifier: argument + title: File + type: string + description: + - > + The name of a graphics file loadable by a gdk-pixbuf loader. + See /usr/lib/gdk-pixbuf/loaders + definitely png, jpeg, tiff, pnm, and xpm + - > + If "%" in filename, the filename is used with sprintf generate a + filename from a counter for multi-file/flipbook animation. The file + sequence ends when numeric discontinuity >100. + - > + If filename contains "/.all.", suffix with an extension to load all + pictures with matching extension from a directory. + - > + If filename contains the string "