protected function ensureStreams(array $rawStreams)
	{
		$streams = [];
		
		foreach ($rawStreams as $stream)
		{
			$stream['type'] = isset($stream['type']) ? strtolower($stream['type']) : null;
			
			if ($stream['type'] == 'audio')
			{
				$streams[] = AudioStream::create($this, $stream);
			}
			else if ($stream['type'] == 'video')
			{
				if ($this instanceof AudioInterface && $this instanceof VideoInterface)
				{
					$streams[] = VideoStream::create($this, $stream);
				}
				else
				{
					$streams[] = FrameStream::create($this, $stream);
				}
			}
			else if ($stream['type'] == 'subtitle')
			{
				$streams[] = SubtitleStream::create($this, $stream);
			}
			else
			{
				throw new TranscoderException('This stream unsupported.');
			}
		}
		
		return $streams;
	}