Connecting BUTT to a second shoutcast stream - streaming

I am trying to connect BUTT to a second stream source on my shoutcast server. The first stream works fine as Shoutcast Administration shows it as stream #1. It is connected through a seperate machine running MIXXX and is working fine. It also shows the stream #2 information so I've confirmed it's active. (see screenshot)
This is my sc_serv.conf file:
password=xxxxxxxxxxxxx
requirestreamconfigs=1
streamadminpassword_1=xxxxxxxxxxxxx
streamid_1=1
streampassword_1=xxxxxxxxxxxxx
streampath_1=stream
streamid_2=2
streampassword_2=xxxxxxxxxxxxx
streampath_2=radio
logfile=logs/sc_serv_2.log
w3clog=logs/sc_w3c.log
banfile=control/sc_serv.ban
ripfile=control/sc_serv.rip
streamauthhash_1=xxxxxxxxxxxxx
I want to connect BUTT to the streamid_2 stream. How does one configure BUTT to do this for shoutcast? It has no ability to indicate the stream ID in the software. I appreciate the help to get this second stream connection.
Butt Screenshot
Shoutcast Server Screenshot
Butt Config for connecting to stream 2 screenshot
Just need help configuring BUTT to connect to the 2nd stream.

The solution to this was to place the stream ID at the end of the password for the streampassword_2:
streamid_2=2
streampassword_2=mypassword:#2
streampath_2=radio
Subsequently, if you have a #3, 4,5.. you add that number after the password accordingly.

Related

Change value after period of time in Firebase

I have a lobby in which I want the users to be in sync. So when a user turns off his internet while the app is running, he should be removed. I know Firebase does not support server side coding, so the coding needs to be client side. The answers from How to delete firebase data after "n" days and Delete firebase data older than 2 hours do not answer this question since they expect that the user is online and they have an internet connection. So my question is if is possible to delete users when they got no internet? I thought maybe it is an idea to let the users update a value every 5 seconds, and when that update is not done, the other users in that lobby remove the player. This way is not good, since every player needs to retrieve and upload alot of data every 5 seconds. What is the best way to solve this?
Edit: to make it short, lets say each user has an image. The image should be green when the user is connected, and grey when disconnected.
Edit 2: after thinking it over, it is really hard to accurate present the connected users on a client-side server. That is why, if nobody has a different solution, I should add another server which can execute server-side codes. Because of the larges amount of servers, I would like to know which server I should use. The server should run a simple function which only checks if the users are connected or disconnected and can communicate with Firebase. If I am correct it should look like this:
But the server also needs to communicate with the users directly. I have absoluty no idea where to start.
If I'm not completely wrong, you should be able to use onDisconnect.
From the Firebase, documentation:
How onDisconnect:Works:
When an onDisconnect() operation is established, it lives on the Firebase Realtime Database server. The server checks security to make sure the user can perform the write event requested, and informs the client if it is invalid. The server then monitors the connection. If at any point it times out, or is actively closed by the client, the server checks security a second time (to make sure the operation is still valid) and then invokes the event.
In app in production I'm using onDisconnectRemoveValue, and when I close the app, the user removes himself from the lobby. Not sure how it works when you turn the device in airplane mode, but from the documentation it seems there should be no problem.
One thing: when you test it better do it on real device, the simulator have issues with turning it off and on, at least the on I have installed.
Edit: So i checked the onDisconnect when you put the device on airplane mode and it works! The question is, that it removes the user in about a 1:30 min, approximately, so if you read the documentation or ask the support, you may be (and only may be) able to find a way to set the time you want.

BigBlueButton How save chat messages to external server

I want to save all chat messages in BigBlueButton to database on external server.
I saw that BigBlueButton don't have API for it.
Could I get messages using some method on external server or I must change BBB methods?
Thank you
Late answer but this is how you to do it.
There are multiple ways to this.
Depending on which version you are using.
I am going to assume you are using the latest 0.9 one.
On you external server, you have an application listen to the redis messages sent by the BBB server, and store them to the database.
You would need, of course, to listen to the correct channel.
Look up redis, to see how you can achieve that.
An other way would be to go to the following service ChatService.java, and search for the following function sendPublicMessage.
Inside of it, all the variables and data would have already been extracted. So you can connect to your database from there and add the entry.
There are others ways to this. I personally recommend that you hook your external server to listen to redis, cause it seems to be the simplest and least invasive way to the functionality of BigBlueButton.
BBB do not have API to fetch the chat data, however we can parse and pass the chat message to other server/API.
BBB stores chat data in events.xml file something like this
<event timestamp="1321843915276" module="CHAT" eventname="PublicChatEvent">
<locale>en</locale>
<message>&#60;/message&#62;</message>
<color>0</color>
<sender>c</sender>
</event>
you can write small script to read events.xml after meeting completion and push chat data for respective meeting to your dB or exposed service using curl.
hope this helps.

Live Stream midroll ad injection in Wowza Streaming Engine

I haven't found any way to automate inserting an ad spot into an existing live stream without stopping the streams and/or using a Flash client to interact with Wowza.
The idea is that these ads can be randomly chosen and inserted into the stream programatically & automated.
Can someone please point me in the right direction of how to properly change sources on the fly?
Thanks!
The following articles may be of interest for you
https://www.wowza.com/docs/how-to-switch-streams-using-stream-class-streams
https://www.wowza.com/docs/how-to-control-stream-class-streams-dynamically-modulestreamcontrol
https://www.wowza.com/docs/how-to-use-ipublishingprovider-api-to-publish-server-side-live-streams
I've previously created a custom module for Wowza that allows you to create an output stream from a live input stream, then control the output and switch between the live input stream and other live or on demand streams.

How do I extract streamed "now playing" data embedded in an Icecast audio (radio) stream on Samsung Smart-TV

I am creating a Samsung TV app for a radio station and they provide the "Now Playing" info within the Icecast stream. Is it possible to (and how do I) extract this information?
Shoutcast supports "Icy-MetaData" - an additional field in the request header. When set, its a request to the shoutcast server to embed metadata about the stream at periodic intervals(once every "icy-metaint" bytes) in the encoded audio stream itself. The value of "icy-metaint" is decided by the shoutcast server configuration and is sent to the client as part of the initial reply.
Check out this post on Shoutcast Internet Radio Protocol for details on icy:metadata and sample code in C.
A somewhat more technical discussion is also available at
http://forums.radiotoolbox.com/viewtopic.php?t=74
Yes, this is possible. The metadata is interleaved into the stream data at a specified interval. Basically, you read 8192 bytes (or whatever is specified by the Icy-MetaInt response header), and then you read the metadata block.
The first byte of that metadata block tells you the length of the data. A length of 0 means there is no updated metadata.
Once you read the meta block, then you go back to reading stream data.
I have all of this in more detail on my answer here: https://stackoverflow.com/a/4914538/362536 While I know you're not writing PHP, the principal is identical no matter what language.
From native player there is no option to get this meta.
You could probably use jQuery.stream plugin to fetch the meta directly - but you need to setup Access-Control-Allow-Origin on you icecast server - but I have no idea if it will work.
The best solution here will be to use this script:
http://code.google.com/p/icecast-now-playing-script/
So you install this script on your web server and from the SmartTV application you will AJAX it once for a while, while your stream is playing.
I just created a radio player for icecast and centova, it uses lastFM api to extract the song meta data. https://github.com/johndavedecano/Icecast-Centova-LastFM-API
If you are doing this for a radio station, then they can provide this data through the XSLT feature of Icecast. Some random old XSLT examples for offering stream metadata that I did at some point.
The other option is to run Icecast 2.4.1 or add the two files (xml2json.xsl status-json.xsl) to an old version.
Note that only Icecast 2.4.1 or newer supports adding CORS/ACAO headers that might be necessary to access data from a web app / web site.
If you are not directly cooperating with the radio station and can't ask them to do this, then disregard this answer. Someone else might find it useful though.

GWT event servise browsers synchronization problem

I have implemented pretty simple application, using gwt and gwt event service 1.1.1, it sends some information to the server and waits for particular event to come back.
When application is opened in one browser window, it works fine.
When it is opened in two browser windows (the same browser and the same address: localhost:port/app or ip:port/app) on one machine, only one instance of my application receives event (UI reflects changes only in one window).
When it is opened in two different browsers, but with the same addresses (for instance, both are localhost:port/app), then both browsers receive events.
When it is opened in two windows of the same browser, but with different addresses (one is localhost:port/app, second is ip:port/app), then it also receives events.
So, could somebody provide any explanation to such behavior? And if is there some kind of workaround for this problem.
Thanks in advance,
Alex.
You are using gwt event service on the server, right?
They claim to have "Only one open connection for event listening". So they actively check that one client has only one connection for sending events. They probably use web sessions to achieve this.
Since you open the same URL in the same browses in two tabs, this two tabs share the same session. There is no way around it. There are a lot of questions about this: https://stackoverflow.com/search?q=browser+tabs+session
Update:
It seems that gwt-event-service can be configured to support multiple sessions: use SessionExtendedConnectionIdGenerator
Update 2:
Use a config file like this: http://code.google.com/p/gwteventservice/source/browse/trunk/conf/eventservice.properties?r=265