github.com/ssetin/penguincast@v0.2.0/readme.md (about) 1 # PenguinCast 2 3 Icecast compatible streaming audio server - server part of your internet radio station. 4 5 ## Capabilities 6 * Receiving stream from Source and sending it to Clients 7 * Operating with shoutcast metadata 8 * Collecting and saving listening statistics to access.log file 9 * Html and json interface for accessing server status (__http://host:port/info.html__ and __http://host:port/info.json__) 10 * Real time server state monitoring (__http://host:port/monitor.html__) 11 12 ## Configuring 13 Configuration parameters are stored in config.json. 14 15 ```json 16 { 17 "Name": "Rollstation radio", 18 "Admin": "admin@site.com", 19 "Location": "Saint Petersburg", 20 "Host": "127.0.0.1", 21 "Socket": { "Port": 8008}, 22 "Limits": { 23 "Clients": 30, "Sources": 5, 24 "SourceIdleTimeOut": 5, "EmptyBufferIdleTimeOut": 5, "WriteTimeOut": 10 25 }, 26 "Auth": {"AdminPassword": "admin"}, 27 "Paths": {"Log": "log/", "Web":"html/"}, 28 "Logging": { 29 "Loglevel": 4, 30 "Logsize": 50000, 31 "UseMonitor": true, 32 "UseStat": true}, 33 "Mounts": [ 34 { 35 "Name": "RockRadio96", "User":"admin", "Password": "admin", "Genre":"Rock", 36 "Description": "Rock radio station, Saint Petersburg", "BitRate":96, 37 "BurstSize": 65536, "DumpFile": "rock96.mp3" 38 } 39 ] 40 } 41 ``` 42 43 #### Socket 44 - Port - the TCP port that will be used to accept client connections 45 46 #### Limits 47 - Clients - maximum clients per server 48 - Sources - maximum Sources per server 49 - SourceIdleTimeOut - data timeout for source 50 - EmptyBufferIdleTimeOut - silence timeout for client 51 - WriteTimeOut - timeout for writing data to client connection 52 53 #### Mounts 54 - Name - required, mount point name 55 - User - required, user name for source 56 - Password - required, password for source 57 - Genre - optional, Genre 58 - Description - optional, stream description 59 - BitRate - optional, stream bitrate 60 - BurstSize - number of bytes to collect before send to client on start streaming 61 - DumpFile - optional, detect filename in which audio data from source will be stored 62 63 #### Logging 64 - Loglevel - determine what will be stored in error.log 65 - 1 - Errors 66 - 2 - Warning 67 - 3 - Info 68 - 4 - Debug 69 - UseMonitor - activate online monitoring of server state 70 - UseStat - collect and save listeners count, cpu and memory usage to file log/stat.log 71 72 73 ## Load testing 74 I did'nt have a goal to measure the maximum number of listeners, but only to look at the overall picture of working server. The server has been tested for CPU and memory usage. For testing i used a simplified version of the client, which connects to the server and writes the resulting stream to files (first 30 listeners). Two test scripts was launched on two machines and create a new connections every 5 seconds until the number of listeners is not reached 13 thousand. Each connection listened the stream for 1:30 hour and then shuted down. Meanwhile, CPU and memory usage statistics collection has been enabled on PenguinCast and based on these data the following chart was constructed. After the test was completed, the resulting dump files were tested by mp3check for errors. 75 76 Radio server was broadcasting 96 Kb/s mp3 stream and also acted as listeners generator. 77 78 Server: Core2Duo E7500 2.93GHz, 4 GB RAM, Ubuntu Desktop 18.04 79 Another listeners generator: Intel Celeron(R) G540 2.50GHz, 1GB RAM, Ubuntu Server 18.04 80 All machines placed in gigabit local network. 81 82 