Author Topic: Two BASS_Encode_CastInit() and two icecast servers  (Read 80 times)

hub73

  • Posts: 85
Hello !
I've two icecast servers.
Could i use two BASS_Encode_CastInit() inside the same program ? BASS_Encode_CastInit(...IceCastServer1...) and BASS_Encode_CastInit(...IceCastServer2...)
My idea was to send mixer -> ogg to IceCastServer1 and mixer -> mp3 to IceCastServer2.
Ogg (server1) could be play on Google chrome, Ie, FireFox (PC, android, linux) ... and mp3 (Server2) on Safari (iphone, ipad, ...)
Many thanks !
« Last Edit: 16 Jan '23 - 07:01 by hub73 »

Chris

  • Posts: 2105
Re: Two BASS_Encode_CastInit() and two icecast servers
« Reply #1 on: 16 Jan '23 - 09:54 »
I would recommend 1 Icecastserver with 4 Mountpoints.
so 2 Mountpoints for ogg/opus   and 2 Mountpoint for mp3.

Code: [Select]
<mount>
   <mount-name>/live.ogg</mount-name>
   <fallback-mount>/playlist.ogg</fallback-mount>
</mount>

Code: [Select]
<mount>
   <mount-name>/playlist.ogg</mount-name>
</mount>

Code: [Select]
<mount>
   <mount-name>/live.mp3</mount-name>
   <fallback-mount>/playlist.mp3</fallback-mount>
</mount>

Code: [Select]
<mount>
   <mount-name>/playlist.mp3</mount-name>
</mount>

About the Bass Stuff
you will  need 2 Encoders , and 2 Bass_Encode_cast_Init 

 
« Last Edit: 16 Jan '23 - 10:01 by Chris »

hub73

  • Posts: 85
Re: Two BASS_Encode_CastInit() and two icecast servers
« Reply #2 on: 16 Jan '23 - 10:44 »
i don't know why i can't have a second mountpoint on the icecast server (the same).
Is there something to modify into the icecast XML conf file ?

i could cast to mp3 or Ogg. But not both.
 
The two encoders are Ok. (ogg and mp3)

The second BASS_Encode_CastInit returns -1

Is there somethig particular to control with two BASS_Encode_CastInit ? Problem seems to be here...
« Last Edit: 16 Jan '23 - 12:45 by hub73 »

Ian @ un4seen

  • Administrator
  • Posts: 24797
Re: Two BASS_Encode_CastInit() and two icecast servers
« Reply #3 on: 16 Jan '23 - 14:55 »
What parameters are you using in your BASS_Encode_CastInit calls? Make sure you have different mount points for each encoder, eg. "stream.ogg" and "stream.mp3". You shouldn't usually need to define the mount points in the Icecast server config. If it still isn't working in your app then please try the pre-compiled CAST.EXE example included in the BASSenc package (C\BIN folder) for comparison, ie. run 2 instances of it and connect to the server with different mount points. That was working fine here when I tried just now.

hub73

  • Posts: 85
Re: Two BASS_Encode_CastInit() and two icecast servers
« Reply #4 on: 16 Jan '23 - 15:04 »
Thanks Ian an Chris. This was inside the XML Icecast file :

Code: [Select]
  <limits>
        <clients>100</clients>
        <sources>8</sources>
   ...