AVBlocks for .NET  2.3
Audio and Video Software Development Kit
Transcoder Input/Output Model

Transcoder Input/Output Requirements and Limitations

Using file or stream as input

  • A file input is always allowed. It is a valid source for all media formats (defined in the StreamType enumeration).
  • A System.IO.Stream can be used as input if it supports reading and seeking. A seekable System.IO.Stream is equivalent to a file and therefore it can be used with all media formats (StreamType).
    Note
    A future version of AVBlocks will support the usage of non-seekable streams as Transcoder inputs for certain media formats.

Using Transcoder push mode to provide input

  • Only elementary streams and uncompressed video/audio may be pushed. Container formats cannot be pushed.
    Elementary stream types and container types are defined in separate ranges in the StreamType enumeration:
    BEGIN_AUDIO, END_AUDIO, BEGIN_VIDEO, END_VIDEO, BEGIN_CONTAINER, END_CONTAINER.
    Note
    A future version of AVBlocks will support push mode for certain container formats.
  • When a video stream is pushed the video data must be provided in whole video frames (compressed or uncompressed). The MediaSample pushed to the Transcoder must describe a single video frame. The video frame may be combined with header frames.
  • When an audio stream is pushed the audio data may be pushed in any fragments.

Using file or stream as output

  • A file output is always allowed. It is a valid sink for all media formats (defined in the StreamType enumeration).
  • A System.IO.Stream can be used as output if it supports writing. For certain media formats seeking is also required. It is needed in order to overwrite some meta structures of the generated stream. Seeking is required for the following media formats: WAVE, MP4, WebM, ASF (Windows Media).

Using Transcoder pull mode to get output

  • Only elementary streams and uncompressed video/audio may be pulled. Container formats cannot be pulled.
  • When a video stream is pulled the retrieved MediaSample contains a single and complete video frame (compressed or uncompressed).
  • When an audio stream is pulled the audio data is retrieved in one or more compressed frames or uncompressed LPCM samples.