Stream Parts

A media stream contains the following parts:

PropertyTypeDescription
headobjectRepresent the beginning of the media stream.
bodyobjectRepresents the middle of the media stream.
tailobjectRepresents the end of the media stream.

Each part supported the following properties:

PropertyTypeDescription
durationnumberDuration of the part expressed in seconds.

The visual scale rotate translate opacity operators and the audial volume operator can be applied to a stream part.

The operators are interpolated from the head to the body and from the body to the tail. For example the following composition will produce a 2 second fade up at the start of the stream and a 2 seconds fade out at the end:

---
input:
  segment:
  - container:
    - name: pcm
      audio:
      - name: a1
        head:
          volume: 0.0
          duration: 2.0
        body:
          volume: 1.0
        tail:
          volume: 0.0
          duration: 2.0
{
  "input": {
    "segment": [
      {
        "container": [
          {
            "name": "pcm",
            "audio": [
              {
                "name": "a1",
                "head": {
                  "volume": 0.0,
                  "duration": 2.0
                },
                "body": {
                  "volume": 1.0
                },
                "tail": {
                  "volume": 0.0,
                  "duration": 2.0
                }
              }
            ]
          }
        ]
      }
    ]
  }
}

Note that stream parts must appear within a segment.