Reputation:
I trying to mix two stream with liquidsoap one on the left another on the right side how to mix it and stream it to icecast server. I'm already stream those two stream with darkice
Here is my pseudo-code
stream1 = 'localhost/stream1' " streamed with darkice on my localmachine
stream2 = 'localhost/stream2' " streamed with darkice on my localmachine
stream3 = mix(stream1[on the left], stream2[on the right])
output.icecast(stream3)
Anyone have any idea? i'm new to this kind of problems.
Upvotes: 5
Views: 3047
Reputation: 2254
You could use input.harbor
to get the streams into liquidsoap, then mix them together.
source_1 = input.harbor('source1',port=9000)
source_2 = input.harbor('source2',port=9001)
mixed = add([source_1,source_2])
output.icecast(%vorbis,id="icecast",
mount="mystream.ogg",
host="localhost", password="hackme",
icy_metadata="true",description="",
url="",
mixed)
If the streams are already left/right panned, this should work. Otherwise liquidsoap does have a stereo.pan
function.
Upvotes: 6
Reputation: 3258
liquidsoap has a built in a crossfade function that does what you want. For more advanced fading there is the smart crossfade function.
Upvotes: 0