流混合是一种将多个音频或视频流组合到云上的一个流技术,广泛应用于直播、在线教育、音频室直播等场景。开发人员可以通过播放混合流来查看屏幕并听到聊天室中所有成员的声音,无需管理聊天室中的每个流。
Stream mixing is a streaming technology that combines multiple audio or video streams onto the cloud, and is widely used in live broadcast, online education, audio studio live broadcast and other scenarios. Developers can view the screen and hear all members of the chat room by playing the mixed stream, without having to manage each stream in the chat room.
Advantages of stream mixing
Stream mixing is widely used in audio and video because of the following benefits it offers developers.
1. Low cost
In large live or online education scenarios, if multiple parties are co-hosting in a room, all users in the room need to play multiple streams. With stream mixing technology, only one stream needs to be played. That is, in the case of mutual custody, the fee can be halved. In the case of multi-party escrow, the cost can be reduced by (n – 1)/n. The cost can also be reduced by (n – 1) /n if a censorship mechanism is used (e.g. obscene content moderation) because only one stream of images needs to be viewed.
2. Simple code logic
When multiple hosts are co-hosted and stream mixing is used, the viewer simply plays the mixed stream and renders instead of playing and rendering multiple streams.
3. Easily forward between different platforms
Without stream mixing, we cannot forward live broadcasts to Facebook, YouTube and other live streaming platforms in a multi-party co-hosting scenario. Because these platforms only have a single RTMP address, we cannot forward multiple streams to a single address.
4. Multi-party co-hosting supported by web browsers on mobile clients
For iPhone users, the Safari browser does not support simultaneous playback of multiple audio files. When playing multiple streams, only one stream can be played, and stream mixing can solve this problem. Most web browsers on mobile phones can generally play up to four streams due to limitations in phone performance and browser performance. With stream mixing technology, the maximum number of streams that can be played is greatly increased without additional bandwidth and performance consumption.
What is stream mixing
As shown in the figure below, when multiple users in a chat room publish streams, the server will combine the two streams into one stream according to the layout configuration, so that viewers can play the mixed stream to view the screens of User A and User B.
Implementation of stream mixing
1. Fluid mixing process
a) …
The post Improving the Audio/Video Live Streaming Experience with Stream Mixing first appeared on Lenix Blog .
This article is reprinted from https://blog.p2hp.com/archives/9024
This site is for inclusion only, and the copyright belongs to the original author.