Audio-only and video-only streaming

更新时间:
复制 MD 格式

ApsaraVideo Live supports audio-only and video-only streams. Ingest over RTMP and play back over RTMP, FLV, or ARTC — with or without the opposite track.

Stream ingest

Ingest audio-only and video-only streams over the Real-Time Messaging Protocol (RTMP). The ingest stream type does not need to match the playback mode. The supported combinations are:

  1. For audio-only live streaming: push an audio-only stream or a stream that contains both audio and video.

  2. For video-only live streaming: push a video-only stream or a stream that contains both audio and video.

Playback

Play audio-only and video-only streams over RTMP, FLV, or Alibaba Real-Time Communication (ARTC). To receive only audio or only video, append a query parameter to the playback URL. Omitting the parameter plays the stream in normal mode (audio and video together).

  • Playback URLs that start with RTMP or FLV

    Audio only: onlyaudio=1

    Video only: onlyvideo=1

    Note

    These parameters are supported only for playback URLs that use the RTMP or FLV protocol.

    Examples:

    • URL without authentication:

      rtmp://DomainName/AppName/StreamName?onlyaudio=1
      http://DomainName/AppName/StreamName.flv?onlyaudio=1
    • URL with authentication:

      rtmp://DomainName/AppName/StreamName?auth_key=timestamp-rand-uid-md5hash&onlyaudio=1
      http://DomainName/AppName/StreamName.flv?auth_key=timestamp-rand-uid-md5hash&onlyaudio=1
  • Playback URLs that start with ARTC

    Audio only: subvideo=no (suppresses the video track)

    Video only: subaudio=no (suppresses the audio track)

    Note

    These parameters are supported only for playback URLs that use the ARTC protocol.

    Examples:

    • URL without authentication:

      artc://DomainName/AppName/StreamName@subvideo=no
    • URL with authentication:

      artc://DomainName/AppName/StreamName?auth_key=timestamp-rand-uid-md5hash@subvideo=no