Mixing two icecast streams with liquid and stream to an icecast server

I am trying to combine two streams with liquid, one from the left to the other from the right, how to mix it and stream to an icecast server. I've already sunk these two streams with darkness

Here is my pseudocode

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 an idea? I'm new to problems like this.

+3


source to share


2 answers


You can use input.harbor

to get flows into liquid and then mix them.

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 this should work. Otherwise, the liquidsoap function has a function stereo.pan

.

+2


source


liquidsoap has a built-in crossfade feature that does what you want. For more advanced attenuation, there is a smart crossfade function .



0


source







All Articles