Skip to content
v2.273.0

MediaStreamAudio Struct ​

A media stream represents one component of your content, such as video, audio, or ancillary data.

After you add a media stream to your flow, you can associate it with sources and outputs that use the ST 2110 JPEG XS or CDI protocol.

Example ​

ts
declare const stack: Stack;

// Create media streams
const videoStream = MediaStream.video({
  mediaStreamId: 1,
  mediaStreamName: 'video-stream',
  videoFormat: MediaVideoFormat.HD_1080P,
  fmtp: {
    colorimetry: Colorimetry.BT709,
    exactFramerate: Framerate.FPS_29_97,
    par: PixelAspectRatio.SQUARE,
    videoRange: VideoRange.NARROW,
    scanMode: ScanMode.PROGRESSIVE,
    tcs: Tcs.SDR,
  },
});

const audioStream = MediaStream.audio({
  mediaStreamId: 2,
  mediaStreamName: 'audio-stream',
  channelOrder: AudioStreamOrderOptions.STANDARD_STEREO,
});

// Add to flow
const flow = new Flow(stack, 'MyFlow', {
  source: SourceConfiguration.router(),
  mediaStreams: [videoStream, audioStream],  // Declare at flow level
});

Properties ​

channelOrderAudioStreamOrderOptionschannel_orderAudioStreamOrderOptionschannelOrderAudioStreamOrderOptionsChannelOrderAudioStreamOrderOptionsChannelOrderAudioStreamOrderOptions= the MediaConnect service default#
The format of the audio channel.
clockRatenumberclock_rateint | floatclockRateNumberClockRatedoubleClockRate*float64= default clock rate for the media…#
The sample rate for the stream.

This value is measured in Hz.

default

Default: default clock rate for the media stream type

descriptionstringdescriptionstrdescriptionStringDescriptionstringDescription*string= no description#
A description that can help you quickly identify what your media stream is used for.
fmtnumberfmtint | floatfmtNumberFmtdoubleFmt*float64= assigned by MediaConnect#
The format type number (sometimes referred to as RTP payload type) of the media stream.

MediaConnect assigns this value to the media stream. For ST 2110 JPEG XS outputs, you need to provide this value to the receiver.

langstringlangstrlangStringLangstringLang*string= no language specified#
The audio language, in a format that is recognized by the receiver.
mediaStreamIdnumbermedia_stream_idint | floatmediaStreamIdNumberMediaStreamIddoubleMediaStreamId*float64required#
A unique identifier for the media stream.
mediaStreamNamestringmedia_stream_namestrmediaStreamNameStringMediaStreamNamestringMediaStreamName*stringrequired#
A name that helps you distinguish one media stream from another.