Patent attributes
An online system receives a media stream from a host of a live broadcasting stream and a second media stream from a guest of the host, and generates a single composite stream that includes the multiple live streams. The online system decodes and aligns the video and audio frames of each live stream to ensure that the composite stream displays the multiple live streams in a synchronized fashion. Additionally, the composite stream can display the multiple live streams in a particular format (e.g. side-by-side, or picture-in-picture), and therefore, the online system adjusts the video and audio frames of each live stream to fit that format. For each composite stream, the online system employs a decision engine that identifies the optimal set of encoded composite streams based on a variety of characteristics. The online system encodes the composite stream and distributes the appropriately encoded composite stream to client devices for display to viewers.