veaml

How to write Veaml?

Composing a Veaml file is simple. We just need to use our favorite text editor and write the marks that form the language. The following is an example:

/ Timeline is a container that will generate an only video as output

%timeline{width: 1920, height: 1080, videocodec: libx264, audiocodec: libfaac, fps: 24} srfc.mp4
  / Each mark can be specified limits
  %video{from:  .1.70, to:     .4, volume: 0} surface.mp4
  %video{from:  .7.50, to:     .8, volume: 0} surface.mp4
  %video{from:    .23, to:    .24, volume: 0} surface.mp4
  %video{from:    .27, to: .27.50, volume: 0} surface.mp4
  %video{from: .28.70, to:    .29, volume: 0} surface.mp4
  %video{from:    .42, to: .42.90, volume: 0} surface.mp4
  %video{from:    .46, to: .47.10, volume: 0} surface.mp4

  %audio{from:    .15, to: .21.50, start:  0} srfc.aac
        

Timeline

The first mark in a Veaml file should always be %timeline, which allows to specify details about the desired output: width and height, name of the file and data about the codecs. The attributes accepted by %timeline are:
  • width: Specifies width
  • height: Specifies height
  • audiocodec: Encoder for audio output (e.g, libfaac, flac or libmp3lame)
  • videocodec: Encoder for video output (e.g, libx264, libtheora or libvpx)
  • fps: Frames per second ratio (25 by default)
  • samplerate: The audio sample rate (44100 by default)

After a %timeline mark we can add any %audio, %video or %image marks, which will form the resulting video. You can specify more than one %timeline on a single file.

Video

These attributes are accepted by the %video mark:

  • width: Specifies width
  • height: Specifies height
  • top: Specifies position from the top border
  • left: Specifies position from the left border
  • from: The temporal instant in the video where to start playing
  • to: The temporal instant where to stop playing
  • start: Temporal instant on the timeline where to be inserted
  • end: Temporal instant on the timeline where to stop
  • codec: Decoder for video input
  • volume: Volume from 0 to 100 (100 by default)

By default added clips will be included sequentially, that is, each clip will be played when the preceding one finishes. To modify this behavior we use the attributes start, end.

Audio

These attributes are accepted by the %audio mark:

  • from: Temporal instant in the audio where to start playing
  • to: Temporal instant in the audio where to stop playing
  • start: Temporal instant on the timeline where to be inserted
  • end: Temporal instant on the timeline where to stop
  • codec: Decoder for audio input
  • volume: Volume from 0 to 100 (100 by default)

Image

These attributes are accepted by the %image mark:

  • width: Specifies width
  • height: Specifies height
  • top: Specifies position from the top border
  • left: Specifies position from the left border
  • to: Duration of the picture on screen
  • start: Temporal instant on the timeline where to be inserted
  • end: Temporal instant on the timeline where to stop