describe method

String describe()

Print a formatted text of all the streams. Like youtube-dl -F option.

Implementation

String describe() {
  final column = _Column(['format code', 'extension', 'resolution', 'note']);
  for (final e in this) {
    column.write([
      e.tag,
      e.container.name,
      if (e is VideoStreamInfo) e.videoResolution else 'audio only',
      e.qualityLabel,
      e.bitrate,
      e.codec.parameters['codecs'],
      if (e is VideoStreamInfo) e.framerate,
      if (e is VideoOnlyStreamInfo) 'video only',
      if (e is MuxedStreamInfo) 'muxed',
      e.size,
      if (e case AudioStreamInfo(:AudioTrack audioTrack))
        audioTrack.displayName,
    ]);
  }
  return column.toString();
}