Stream Video to one user and receive audio from the user
Asked Answered
S

2

-1

My requirement: I want to stream to a person (Larix?) With my smartphone and get the audio from that person. The latency should be as low as possible and the quality as high as possible. I want to host the whole thing on my server.

What is the best method? I've tried SRS, the quality is high and the latency is low, but I don't know how to get the audio from the other person.

Would SRT also be an option?

What is best suited to make that happen?

Sublapsarianism answered 26/1, 2021 at 13:45 Comment(0)
U
2

Once published live stream to SRS, over RTMP by OBS, FFmpeg or other encoder, you could play the stream on other devices.

Generally there are serval players, on both H5 or mobile:

  • HLS, about 5~10s latency, easy to play, you only need a H5 video tag, or hls.js.
  • HTTP-FLV, about 1~3s latency, also very easy, please use flv.js player.
  • WebRTC WHIP/WHEP, about 0.5~1s latency, it's realtime, but be careful, especially on your mobile browser.

Note that all H5 native js player works perfect with MSE except iOS Safari browser. For iOS Safari, it's possible to play the HTTP-FLV by WASM also, or use WebRTC WHEP, please read link for details.

WebCodecs and WebTransport can also be used to play live streams, but they are not yet stable and supported on all devices. Please refer to this post and WebCodecs API for more details.

On mobile(iOS/Android) native platform, it's OK to use ijkplayer which use FFmpeg, and there is some wraps like fijkplayer for flutter.

Unhorse answered 15/12, 2021 at 5:43 Comment(2)
Just so you are aware, there is an ongoing discussion about the srs tag on Meta: meta.#415296Fluellen
Thank you very much, I answered that question. I really need a tag to gather all questions about SRS. But seems it's not good to use tag srs, because it's too simple and lots of same meanings.Unhorse
T
1

Given the latency requirements it sounds like a real time focused solution leveraging RTSP, Web RTC or similar would be a good approach.

Using something like this as close to standard as possible with video only in one direction and audio only in the other direction (or both if you need it) seems like it might be the easiest approach.

I think you may find this much easier and quicker than starting from scratch yourself, especially to get the best quality within a given latency budget as this is a core consideration of WebRTC.

There are existing Web RTC Android and iOS clients which you can build on - more are available all the time so worth searching but some examples:

Trappings answered 27/1, 2021 at 13:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.