Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STREAM: [NFR] Can it support mixed configuration of multiple streams and ignore when the additional stream has no data? #721

Closed
dreamsxin opened this issue Dec 18, 2016 · 7 comments
Assignees
Labels
Feature It's a new feature. TransByAI Translated by AI/GPT.
Milestone

Comments

@dreamsxin
Copy link

dreamsxin commented Dec 18, 2016

Generally used for audio stream synthesis or special effects.

TRANS_BY_GPT3

@winlinvip winlinvip modified the milestones: srs 3.0 release, srs 4.0 release Dec 23, 2016
@winlinvip
Copy link
Member

winlinvip commented Dec 23, 2016

Mixing is quite complicated, we'll see if future versions can support it.

TRANS_BY_GPT3

@winlinvip winlinvip added the Feature It's a new feature. label Dec 23, 2016
@dreamsxin
Copy link
Author

dreamsxin commented Dec 23, 2016

Or provide the cutting stream function, which can facilitate third-party tools for mixing and pushing. For example:
streamOut serves as the external output stream, by default pulling the stream from streamIn.
streamIn is the client input stream.

If a third party wants to mix StreamIn, they can first pull the stream from streamIn, then synthesize a new stream streamMux, and push it to streamOut. If this switching can be seamless, it would also be a solution.

TRANS_BY_GPT3

@w5750584
Copy link

w5750584 commented Feb 23, 2017

@dreamsxin
May I ask, what third-party tool are you using for mixing?
I tested using ffmpeg for mixing, but if one of the streams is interrupted, there will be issues with streamOut.
./ffmpeg -i rtmp://srs.xxx.com:1935/live/1 -i rtmp://srs.xxx.com:1935/live/2 -filter_complex "[0:a][1:a]amerge=inputs=2[aout]" -map "[aout]" -f flv rtmp://srs.xxx.com:1935/live/test
When stream 1 or 2 is disconnected, the test stream will encounter an error.

TRANS_BY_GPT3

@dreamsxin
Copy link
Author

dreamsxin commented Feb 23, 2017

@w5750584 Mixing, mixing in an audio file, specifying time and length, there will be no interruption problem, using a stream will definitely cause errors, unless you write it yourself

TRANS_BY_GPT3

@winlinvip
Copy link
Member

winlinvip commented Feb 25, 2017

I plan to mix the audio at the PCM level myself. SRS sends AAC or Speex or Opus frames to an external program, which decodes them into PCM, mixes them, encodes them back into AAC, and then sends them back to SRS.

TRANS_BY_GPT3

@winlinvip
Copy link
Member

winlinvip commented Feb 25, 2017

This program can be written in GOLANG, which makes it convenient to communicate with SRS using HTTP. Some work has already been done, including using GOLANG to call the libraries for SPEEX and AAC, as well as resampling.

  1. https://github.com/winlinvip/go-speex
  2. https://github.com/winlinvip/go-fdkaac
  3. https://github.com/winlinvip/go-aresample

TRANS_BY_GPT3

@winlinvip winlinvip changed the title [NFR]能否支持多流混合配置,当附加流没有数据时忽略 STREAM: [NFR]能否支持多流混合配置,当附加流没有数据时忽略 Mar 26, 2017
@winlinvip
Copy link
Member

winlinvip commented Jan 25, 2020

Currently, it seems that mixing may not be necessary, and possible directions could be:

  1. RTC communication direction, such as WebRTC, where the server typically does audio ranking instead of mixing. WebRTC: Support WebRTC, for video meeting, SFU server, video converence. #307
  2. RTSP monitoring direction, such as GB18181, Do you support integration with GB28181? Monitoring, intelligent cameras, national standard streaming. #1500, where there may be audio transcoding to AAC.
  3. Low-latency live streaming direction, such as WebRTC streaming, where Opus to AAC conversion may exist. WebRTC: Support WebRTC, for video meeting, SFU server, video converence. #307

TRANS_BY_GPT3

@winlinvip winlinvip self-assigned this Sep 18, 2021
@winlinvip winlinvip changed the title STREAM: [NFR]能否支持多流混合配置,当附加流没有数据时忽略 STREAM: [NFR] Can it support mixed configuration of multiple streams and ignore when the additional stream has no data? Jul 28, 2023
@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature It's a new feature. TransByAI Translated by AI/GPT.
Projects
None yet
Development

No branches or pull requests

3 participants